Skip to contentSkip to conversation

Skip lsns/ioctl_ns test if unshare fails

PATCH In review Chris Hofstaedtler 2 participants 3 messages Aug 20, 2021 – Aug 31, 2021 Util-Linux package

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Skip lsns/ioctl_ns test if unshare fails

Some parts of the Debian build infrastructure uses unshare to run the package build, and that appears to cause a "nested" unshare in the lsns/ioctl_ns test to fail. Unfortunately the tests then hang at this point.

Try running unshare before the actual test, and skip the test if unshare already fails.

---
 tests/ts/lsns/ioctl_ns | 2 ++
 1 file changed, 2 insertions(+)
tests/ts/lsns/ioctl_ns +2 -0
index ef6360607..15dd1af74 100755
@@ -34,6 +34,8 @@ ts_check_prog "mkfifo"
 ts_check_prog "touch"
 ts_check_prog "uniq"
 
+$TS_CMD_UNSHARE --user --pid --mount-proc true || ts_skip "Namespace support failure"
+
 ts_cd "$TS_OUTDIR"
 
 # The parent process receives namespaces ids via FIFO_DATA from bash
Signature · 1 line
2.33.0
#1 lore raw

Sorry, I missed to add my own signoff.

Quoted 8 lines · Chris Hofstaedtler

Some parts of the Debian build infrastructure uses unshare to run the package build, and that appears to cause a "nested" unshare in the lsns/ioctl_ns test to fail. Unfortunately the tests then hang at this point.

Try running unshare before the actual test, and skip the test if unshare already fails.

Quoted 20 lines
---
 tests/ts/lsns/ioctl_ns | 2 ++
 1 file changed, 2 insertions(+)
tests/ts/lsns/ioctl_ns +2 -0
index ef6360607..15dd1af74 100755
@@ -34,6 +34,8 @@ ts_check_prog "mkfifo"
 ts_check_prog "touch"
 ts_check_prog "uniq"
 
+$TS_CMD_UNSHARE --user --pid --mount-proc true || ts_skip "Namespace support failure"
+
 ts_cd "$TS_OUTDIR"
 
 # The parent process receives namespaces ids via FIFO_DATA from bash
Signature · 1 line
2.33.0