mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-03-12 08:58:20 +03: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:
parent
5dcb40a1b0
commit
cc11107fd2
@ -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
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user