summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2019-10-08 07:12:53 -0600
committerJens Axboe <axboe@kernel.dk>2019-10-08 07:12:53 -0600
commit1053680d22ae1e047c65b49527e784ba6b4b7171 (patch)
tree49fd513fa0f46a7091e67211d7c2e4aee5e5398b
parentdd899de5643a54ba5570ea06d1898551e926ad79 (diff)
downloadliburing-1053680d22ae1e047c65b49527e784ba6b4b7171.tar.gz
liburing-1053680d22ae1e047c65b49527e784ba6b4b7171.tar.bz2
test/runtests.sh: check for root before using /dev/kmsg
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rwxr-xr-xtest/runtests.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/runtests.sh b/test/runtests.sh
index c9783b5..b2e5526 100755
--- a/test/runtests.sh
+++ b/test/runtests.sh
@@ -6,8 +6,17 @@ RET=0
TIMEOUT=30
FAILED=""
+do_kmsg="yes"
+if ! [ $(id -u) = 0 ]; then
+ do_kmsg="no"
+fi
+
for t in $TESTS; do
- echo Running test $t | tee > /dev/kmsg
+ if [ "$do_kmsg" = "yes" ]; then
+ echo Running test $t | tee > /dev/kmsg
+ else
+ echo Running test $t
+ fi
timeout -s INT $TIMEOUT ./$t
r=$?
if [ "${r}" -eq 124 ]; then