From: Davide Cavalca Date: Wed, 27 Jul 2016 21:17:52 +0000 (-0700) Subject: tests: skip udev-test if running inside a chroot X-Git-Tag: v232~356^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e4d214efc20245c37d9b1e3a7e35c6a4443da131;p=thirdparty%2Fsystemd.git tests: skip udev-test if running inside a chroot --- diff --git a/test/udev-test.pl b/test/udev-test.pl index da0a4e1f6b4..35a2668fb32 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) {