diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-07-31 22:01:43 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-07-31 22:06:09 -0400 |
commit | ce5fcc695e3c74599c6b8ab0d6160edf7dc41ebc (patch) | |
tree | 21b3d1751b3f7175b969e96153913c7322816425 /test | |
parent | 6d1e2ddd59f929ce98e400cb14fba7a873e2b409 (diff) | |
parent | 4dd4cb8fe40baea007336a346ec2aa645890eec3 (diff) |
Merge pull request 3821 from davide125/fix-tests
Diffstat (limited to 'test')
-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(); |