Skip to content

Commit

Permalink
tests: use KNOWN_FAIL for lsns/ioctl_ns
Browse files Browse the repository at this point in the history
It seems 32bit userspace on 64bit kernel return ENOTTY for
NS_GET_USERNS ioctl (for example when execute tests in mock
environment).

Addresses: #1924
Signed-off-by: Karel Zak <kzak@redhat.com>
  • Loading branch information
karelzak committed Dec 9, 2022
1 parent 85a956a commit 857038d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/ts/lsns/ioctl_ns
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 857038d

Please sign in to comment.