[LTP] [PATCH V2 3/3] syscalls: finit_module: Add tests

Cyril Hrubis chrubis@suse.cz
Thu Dec 17 11:09:26 CET 2020


Hi!
This finit_module02 fails for me:

tst_test.c:1261: TINFO: Timeout per run is 0h 05m 00s
finit_module02.c:66: TPASS: finit_module(*tc->fd, tc->param, tc->flags): EINVAL (22)
finit_module02.c:66: TFAIL: finit_module(*tc->fd, tc->param, tc->flags) expected ENOEXEC: EBADF (9)
finit_module02.c:66: TPASS: finit_module(*tc->fd, tc->param, tc->flags): EFAULT (14)
finit_module02.c:66: TPASS: finit_module(*tc->fd, tc->param, tc->flags): EINVAL (22)
finit_module02.c:66: TPASS: finit_module(*tc->fd, tc->param, tc->flags): EINVAL (22)
tst_capability.c:29: TINFO: Dropping CAP_SYS_MODULE(16)
finit_module02.c:66: TPASS: finit_module(*tc->fd, tc->param, tc->flags): EPERM (1)
tst_capability.c:41: TINFO: Permitting CAP_SYS_MODULE(16)
finit_module02.c:59: TPASS: finit_module(*tc->fd, tc->param, tc->flags) passed
finit_module02.c:63: TPASS: finit_module(*tc->fd, tc->param, tc->flags): EEXIST (17)
finit_module02.c:66: TFAIL: finit_module(*tc->fd, tc->param, tc->flags) expected EBADF: ETXTBSY (26)

Linux 5.9.12

Also it looks to me like EBADF is more reasonable error for fd set to -1
also ETXTBSY sounds more reasonable for a file opened for writing.

I guess that someone cleaned up the kernel implementation but forget to
update the manual pages?

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list