diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-08-01 04:01:43 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-08-01 04:06:09 +0200 |
commit | ce5fcc695e3c74599c6b8ab0d6160edf7dc41ebc (patch) | |
tree | 21b3d1751b3f7175b969e96153913c7322816425 /test/udev-test.pl | |
parent | test-path-util: check for /lt-test-path-util or /test-path-util (#3841) (diff) | |
parent | tests: don't run private device tests if running in a container (diff) | |
download | systemd-ce5fcc695e3c74599c6b8ab0d6160edf7dc41ebc.tar.xz systemd-ce5fcc695e3c74599c6b8ab0d6160edf7dc41ebc.zip |
Merge pull request 3821 from davide125/fix-tests
Diffstat (limited to 'test/udev-test.pl')
-rwxr-xr-x | test/udev-test.pl | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/test/udev-test.pl b/test/udev-test.pl index da0a4e1f6b..129af854f1 100755 --- a/test/udev-test.pl +++ b/test/udev-test.pl @@ -1535,11 +1535,18 @@ if (!($<==0)) { exit($EXIT_TEST_SKIP); } +# skip the test when running in a chroot +system("systemd-detect-virt", "-r", "-q"); +if ($? >> 8 == 0) { + print "Running in a chroot, skipping the test.\n"; + exit($EXIT_TEST_SKIP); +} + # skip the test when running in a container system("systemd-detect-virt", "-c", "-q"); if ($? >> 8 == 0) { - print "Running in a container, skipping the test.\n"; - exit($EXIT_TEST_SKIP); + print "Running in a container, skipping the test.\n"; + exit($EXIT_TEST_SKIP); } udev_setup(); |