]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: (getino) skip namespace subtests when unshare is not supported
authorKarel Zak <kzak@redhat.com>
Tue, 12 May 2026 13:10:02 +0000 (15:10 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 12 May 2026 13:10:02 +0000 (15:10 +0200)
The namespace subtests use unshare to create isolated namespaces, but
this fails on QEMU and restricted CI containers where namespace
creation is not available. Skip the namespace subtests in this case.

Signed-off-by: Karel Zak <kzak@redhat.com>
tests/ts/getino/getino

index e0e4353233ce0f888e081111c32f0b2e7f054198..0dbd8ccd953b0e5a5b0dcf40f27868398ff589ad 100755 (executable)
@@ -64,6 +64,8 @@ if [ -n "$res" ]; then
 fi
 ts_finalize_subtest
 
+$TS_CMD_UNSHARE --ipc true &> /dev/null || ts_skip "no namespace support"
+
 ts_init_subtest "ipcns"
 ts_ipc_ns=$("$TS_CMD_GETINO" --ipcns $$ 2>>"$TS_ERRLOG")
 unshare_ipc_ns=$("$TS_CMD_UNSHARE" --ipc bash -c "$TS_CMD_GETINO --ipcns \$\$" 2>>"$TS_ERRLOG")