Repository: linux-test-project/ltp

Issue #1156: splice07 fails on kernels <5.10
Created: 2024-04-29T22:42:39Z
splice07 seems to depend on torvalds/linux@36e2c74 ("fs: don't allow splice read/write without explicit ops") to pass.  I've compiled a list of failing combinations on 5.4, but I'm not sure what's the right approach to modifying the test:



in_fd
out_fd
error




TST_FD_PIPE_READ
TST_FD_EPOLL
hangs


TST_FD_PIPE_READ
TST_FD_EVENTFD
hangs


TST_FD_PIPE_READ
TST_FD_SIGNALFD
hangs


TST_FD_PIPE_READ
TST_FD_TIMERFD
hangs


TST_FD_PIPE_READ
TST_FD_PIDFD
hangs


TST_FD_PIPE_READ
TST_FD_PERF_EVENT
hangs


TST_FD_PIPE_READ
TST_FD_IO_URING
hangs


TST_FD_PIPE_READ
TST_FD_BPF_MAP
hangs


TST_FD_PIPE_READ
TST_FD_FSOPEN
hangs


TST_FD_PIPE_READ
TST_FD_FSPICK
hangs


TST_FD_INOTIFY
TST_FD_PIPE_WRITE
hangs


TST_FD_DIR
TST_FD_PIPE_WRITE
EISDIR


TST_FD_PERF_EVENT
TST_FD_PIPE_WRITE
ENODATA


TST_FD_FSOPEN
TST_FD_PIPE_WRITE
ENODATA


TST_FD_FSPICK
TST_FD_PIPE_WRITE
ENODATA



Should it just be gated by kernel version or is there a preferred way to modify it so that it is backwards compatible?

Duplicate issue #1145: arm32: Test killed by SIGILL : readahead01 accept03 splice07 
Created: 2024-03-14T05:29:18Z
On arm32 archtecture with kernel-6.6.20, the readahead01 accept03 splice07 cases are killed by SIGILL.
After checking the kernel log, seems memfd_create() failed due to no  MFD_EXEC or MFD_NOEXEC_SEAL flag.
Using accept03 as an example, the following is the error log:
From kernel:
accept03[541]: memfd_create() called without MFD_EXEC or MFD_NOEXEC_SEAL set

accept03 output:
tst_test.c:1709: TINFO: LTP version: 20240129
tst_test.c:1593: TINFO: Timeout per run is 0h 00m 30s
accept03.c:48: TPASS: accept() on file : ENOTSOCK (88)
accept03.c:48: TPASS: accept() on O_PATH file : EBADF (9)
accept03.c:48: TPASS: accept() on directory : ENOTSOCK (88)
accept03.c:48: TPASS: accept() on /dev/zero : ENOTSOCK (88)
accept03.c:48: TPASS: accept() on /proc/self/maps : ENOTSOCK (88)
accept03.c:48: TPASS: accept() on pipe read end : ENOTSOCK (88)
accept03.c:48: TPASS: accept() on pipe write end : ENOTSOCK (88)
accept03.c:48: TPASS: accept() on epoll : ENOTSOCK (88)
accept03.c:48: TPASS: accept() on eventfd : ENOTSOCK (88)
accept03.c:48: TPASS: accept() on signalfd : ENOTSOCK (88)
accept03.c:48: TPASS: accept() on timerfd : ENOTSOCK (88)
accept03.c:48: TPASS: accept() on pidfd : ENOTSOCK (88)
tst_fd.c:151: TCONF: Skipping fanotify: ENOSYS (38)
accept03.c:48: TPASS: accept() on inotify : ENOTSOCK (88)
tst_fd.c:170: TCONF: Skipping userfaultfd: ENOSYS (38)
accept03.c:48: TPASS: accept() on perf event : ENOTSOCK (88)
accept03.c:48: TPASS: accept() on io uring : ENOTSOCK (88)
accept03.c:48: TPASS: accept() on bpf map : ENOTSOCK (88)
accept03.c:48: TPASS: accept() on fsopen : ENOTSOCK (88)
accept03.c:48: TPASS: accept() on fspick : ENOTSOCK (88)
accept03.c:48: TPASS: accept() on open_tree : EBADF (9)
accept03.c:48: TPASS: accept() on memfd : ENOTSOCK (88)
tst_test.c:1653: TBROK: Test killed by SIGILL!

So is there special options need to be set on arm32 SoC? Thanks!

Closing comment (2024-06-19T17:17:03Z): @metan-ucw @mdoucha @edliaw FYI https://patchwork.ozlabs.org/project/ltp/patch/1718701782-18077-1-git-send-email-nobuhiro1.iwamatsu@toshiba.co.jp/
@chenxy1988 Somehow related to #1156.