summaryrefslogtreecommitdiff
path: root/test/udev-test.pl
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-07-31 22:01:43 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-07-31 22:06:09 -0400
commitce5fcc695e3c74599c6b8ab0d6160edf7dc41ebc (patch)
tree21b3d1751b3f7175b969e96153913c7322816425 /test/udev-test.pl
parent6d1e2ddd59f929ce98e400cb14fba7a873e2b409 (diff)
parent4dd4cb8fe40baea007336a346ec2aa645890eec3 (diff)
Merge pull request 3821 from davide125/fix-tests
Diffstat (limited to 'test/udev-test.pl')
-rwxr-xr-xtest/udev-test.pl11
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();