summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavide Cavalca <dcavalca@fb.com>2016-07-27 14:17:52 -0700
committerDavide Cavalca <dcavalca@fb.com>2016-07-29 09:20:11 -0700
commite4d214efc20245c37d9b1e3a7e35c6a4443da131 (patch)
treed3e26b4e03142035fe27ace28ab96921f4978ece /test
parentb6b609dbc202e5645fc58e87b8a7d46426ee4bb7 (diff)
tests: skip udev-test if running inside a chroot
Diffstat (limited to 'test')
-rwxr-xr-xtest/udev-test.pl7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/udev-test.pl b/test/udev-test.pl
index da0a4e1f6b..35a2668fb3 100755
--- a/test/udev-test.pl
+++ b/test/udev-test.pl
@@ -1535,6 +1535,13 @@ 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) {