test: skip test-cgroup-id on ENOSYS from cg_cgroupid_open
authorNick Rosbrook <enr0n@ubuntu.com>
Thu, 20 Jun 2024 15:27:03 +0000 (11:27 -0400)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 5 Jul 2024 18:00:04 +0000 (20:00 +0200)
commit778034f42e1e615e35e0c8e121f63ecb64d63d01
tree61bcb2a1cb94c91c1650e2951229e2b1764c42ea
parent3174fae67beeae49f71eda09c9fa844316440522
test: skip test-cgroup-id on ENOSYS from cg_cgroupid_open

Most container managers will block open_by_handle_at with seccomp to
mitigate a container escape attack. LXD in particular returns ENOSYS
rather than e.g. EPERM like nspawn. Skip this test if we get ENOSYS
from open_by_handle_at via cg_cgroupid_open.

(cherry picked from commit 82f57401d933596746c32a955773bc70be53b0ac)
src/test/test-cgroup.c