summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorFilipe Brandenburger <filbranden@google.com>2015-08-31 07:10:30 +0200
committerFilipe Brandenburger <filbranden@google.com>2015-08-31 07:10:30 +0200
commit4d55fc5b2116140b8d89cfc68cb793f1163a0f2c (patch)
tree90a55068e5e66a7c36c50eb452a0642b8e6e0720 /test
parentMerge pull request #1072 from piotrdrag/master (diff)
downloadsystemd-4d55fc5b2116140b8d89cfc68cb793f1163a0f2c.tar.xz
systemd-4d55fc5b2116140b8d89cfc68cb793f1163a0f2c.zip
test: udev - Signal that test was skipped when running as non-root
It is more accurate to report that the test was skipped rather than succeeded if we did not get to run it because it requires root. Tested by running `make check` and inspecting the log file: $ cat test/udev-test.pl.log Must have root permissions to run properly. SKIP test/udev-test.pl (exit status: 77) The `make check` output also reported: SKIP: test/udev-test.pl
Diffstat (limited to 'test')
-rwxr-xr-xtest/udev-test.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/udev-test.pl b/test/udev-test.pl
index 64d7f93444..0a89303570 100755
--- a/test/udev-test.pl
+++ b/test/udev-test.pl
@@ -1487,7 +1487,7 @@ sub run_test {
# due to mknod restrictions
if (!($<==0)) {
print "Must have root permissions to run properly.\n";
- exit;
+ exit($EXIT_TEST_SKIP);
}
# skip the test when running in a container