]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tests: skip udev-test if running inside a chroot
authorDavide Cavalca <dcavalca@fb.com>
Wed, 27 Jul 2016 21:17:52 +0000 (14:17 -0700)
committerDavide Cavalca <dcavalca@fb.com>
Fri, 29 Jul 2016 16:20:11 +0000 (09:20 -0700)
test/udev-test.pl

index da0a4e1f6b4c8dc5b78aa62ea20f0abc90e4ecfd..35a2668fb32305be44b7821a2cb31424289abd36 100755 (executable)
@@ -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) {