mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user