tests: require devices more strictly
This commit is contained in:
@@ -333,12 +333,6 @@ with subtest("(functional): published ports follow the container's lifetime"):
|
|||||||
with subtest("(functional): declared devices are usable in-container"):
|
with subtest("(functional): declared devices are usable in-container"):
|
||||||
for name, devices in DEVICES.items():
|
for name, devices in DEVICES.items():
|
||||||
for dev in devices:
|
for dev in devices:
|
||||||
if server.execute(f"test -e {dev}")[0] != 0:
|
|
||||||
# host lacks the device (e.g. /dev/kvm without nested
|
|
||||||
# virtualization, as in this test's own VM) - nspawn skips
|
|
||||||
# populating it in-container, so there's nothing to check.
|
|
||||||
continue
|
|
||||||
# opened, not stat'd: without DeviceAllow= the node is still visible
|
|
||||||
server.succeed(ct_cmd(name, f"exec 3<> {dev}"))
|
server.succeed(ct_cmd(name, f"exec 3<> {dev}"))
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user