Message ID | 20240408071848.80862-1-minachou@andestech.com |
---|---|
State | Accepted |
Headers | show |
Series | [v3] waitid10: Add .needs_tmpdir=1 to run test in temporary directory | expand |
On Mon, Apr 8, 2024 at 3:48 PM Hui Min Mina Chou via ltp <ltp@lists.linux.it> wrote: > When testing via NFS mount LTP folder on the board, with the NFS server > configured using 'anonuid' and 'anongid' options to set specific > uid/gid, waitid10 fails. This is due to a uid mismatch during core dump > file creation, leading to an aborted dump, resulting in the child > process receiving the signal CLD_KILLED instead of CLD_DUMPED. > > # ./waitid10 > tst_buffers.c:56: TINFO: Test is using guarded buffers > tst_test.c:1732: TINFO: LTP version: 20240129 > tst_test.c:1616: TINFO: Timeout per run is 0h 05m 00s > waitid10.c:64: TINFO: Raising RLIMIT_CORE rlim_cur=0 -> 0 > [ 296.482665] mnt_uid= 1036, curr_uid= 0 > [ 296.483041] Core dump to core aborted: cannot preserve file owner > waitid10.c:36: TPASS: waitid(P_ALL, 0, infop, WEXITED) passed > waitid10.c:37: TPASS: infop->si_pid == pidchild (149) > waitid10.c:38: TPASS: infop->si_status == SIGFPE (8) > waitid10.c:39: TPASS: infop->si_signo == SIGCHLD (17) > waitid10.c:42: TFAIL: infop->si_code (2) != CLD_DUMPED (3) > > Therefore, add .needs_tmpdir = 1 relocates the working directory to > temporary directory, preventing core file creation failures due to > NFS server settings. > > Signed-off-by: Hui Min Mina Chou <minachou@andestech.com> > Reviewed-by: Li Wang <liwang@redhat.com> --- > testcases/kernel/syscalls/waitid/waitid10.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/testcases/kernel/syscalls/waitid/waitid10.c > b/testcases/kernel/syscalls/waitid/waitid10.c > index e55e88c2325e..9100cc2d7a54 100644 > --- a/testcases/kernel/syscalls/waitid/waitid10.c > +++ b/testcases/kernel/syscalls/waitid/waitid10.c > @@ -76,4 +76,5 @@ static struct tst_test test = { > {&infop, .size = sizeof(*infop)}, > {}, > }, > + .needs_tmpdir = 1, > }; > -- > 2.34.1 > > > -- > Mailing list info: https://lists.linux.it/listinfo/ltp > >
Hi! Applied, thanks.
diff --git a/testcases/kernel/syscalls/waitid/waitid10.c b/testcases/kernel/syscalls/waitid/waitid10.c index e55e88c2325e..9100cc2d7a54 100644 --- a/testcases/kernel/syscalls/waitid/waitid10.c +++ b/testcases/kernel/syscalls/waitid/waitid10.c @@ -76,4 +76,5 @@ static struct tst_test test = { {&infop, .size = sizeof(*infop)}, {}, }, + .needs_tmpdir = 1, };
When testing via NFS mount LTP folder on the board, with the NFS server configured using 'anonuid' and 'anongid' options to set specific uid/gid, waitid10 fails. This is due to a uid mismatch during core dump file creation, leading to an aborted dump, resulting in the child process receiving the signal CLD_KILLED instead of CLD_DUMPED. # ./waitid10 tst_buffers.c:56: TINFO: Test is using guarded buffers tst_test.c:1732: TINFO: LTP version: 20240129 tst_test.c:1616: TINFO: Timeout per run is 0h 05m 00s waitid10.c:64: TINFO: Raising RLIMIT_CORE rlim_cur=0 -> 0 [ 296.482665] mnt_uid= 1036, curr_uid= 0 [ 296.483041] Core dump to core aborted: cannot preserve file owner waitid10.c:36: TPASS: waitid(P_ALL, 0, infop, WEXITED) passed waitid10.c:37: TPASS: infop->si_pid == pidchild (149) waitid10.c:38: TPASS: infop->si_status == SIGFPE (8) waitid10.c:39: TPASS: infop->si_signo == SIGCHLD (17) waitid10.c:42: TFAIL: infop->si_code (2) != CLD_DUMPED (3) Therefore, add .needs_tmpdir = 1 relocates the working directory to temporary directory, preventing core file creation failures due to NFS server settings. Signed-off-by: Hui Min Mina Chou <minachou@andestech.com> --- testcases/kernel/syscalls/waitid/waitid10.c | 1 + 1 file changed, 1 insertion(+)