1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-22 13:33:56 +03:00

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
This commit is contained in:
Filipe Brandenburger 2015-08-30 22:10:30 -07:00
parent 40ec276fdf
commit 4d55fc5b21

View File

@ -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