From: Daan De Meyer Date: Sat, 27 May 2023 10:21:19 +0000 (+0200) Subject: test-udev: Skip running in container X-Git-Tag: v254-rc1~329^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc11107fd26768fbe3b1cddbd9fa3ef239420045;p=thirdparty%2Fsystemd.git test-udev: Skip running in container Containers generally don't have permission to mknod() which is required by test-udev so let's skip the test as well if we detect we're running in a container. --- diff --git a/test/test-udev.py b/test/test-udev.py index 7e9afc4fc8a..710aaed3a9b 100755 --- a/test/test-udev.py +++ b/test/test-udev.py @@ -2346,6 +2346,12 @@ def environment_issue(): check=False) if c.returncode == 0: return 'Running in a chroot, skipping the test' + + c = subprocess.run(['systemd-detect-virt', '-c', '-q'], + check=False) + if c.returncode == 0: + return 'Running in a container, skipping the test' + return None