]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: use KNOWN_FAIL for lsns/ioctl_ns
authorKarel Zak <kzak@redhat.com>
Fri, 9 Dec 2022 10:28:25 +0000 (11:28 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 9 Dec 2022 10:28:25 +0000 (11:28 +0100)
It seems 32bit userspace on 64bit kernel return ENOTTY for
NS_GET_USERNS ioctl (for example when execute tests in mock
environment).

Addresses: https://github.com/util-linux/util-linux/pull/1924
Signed-off-by: Karel Zak <kzak@redhat.com>
tests/ts/lsns/ioctl_ns

index 7cc3a95a3ceb60b3ed05a2b38466b5de4425092c..3385795198b2447ff0a96889926bfcda7c29518e 100755 (executable)
@@ -34,6 +34,15 @@ ts_check_prog "mkfifo"
 ts_check_prog "touch"
 ts_check_prog "uniq"
 
+# 32bit userspace (NS ioctls) does not work as expected with 64bit kernel
+WORDSIZE=$($TS_HELPER_SYSINFO WORDSIZE)
+if [ $WORDSIZE -eq 32 ]; then
+       uname -m | grep -q 64
+       if [ $? -eq 0 ]; then
+               TS_KNOWN_FAIL="yes"
+       fi
+fi
+
 $TS_CMD_UNSHARE --user --pid --mount-proc --fork true &> /dev/null || ts_skip "no namespace support"
 
 ts_cd "$TS_OUTDIR"