From patchwork Mon Apr 8 07:18:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mina Chou X-Patchwork-Id: 1920675 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=lists.linux.it header.i=@lists.linux.it header.a=rsa-sha256 header.s=picard header.b=HvmYjHmj; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=patchwork.ozlabs.org) Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VCh6H3q5rz1yYT for ; Mon, 8 Apr 2024 17:48:23 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.linux.it; i=@lists.linux.it; q=dns/txt; s=picard; t=1712562500; h=to : date : message-id : mime-version : subject : list-id : list-unsubscribe : list-archive : list-post : list-help : list-subscribe : from : reply-to : cc : content-type : content-transfer-encoding : sender : from; bh=TLSmtFNMPI8zqC0kOtH4ke0QNAGELGg4aTs/ijUpO6k=; b=HvmYjHmj/ksLlCLAQnhXZpH5Iq/ffBt6rOO4czX2BLrva3RvRGGichNnR1VzFvY7LHsgh cJxxLRY68tqKYKfTmZ5Iou9JLQI002fUypbkw43eHU+sDe42Yu8QgsN3jB4RAM6oihzniSB 31tHqmFCgW4MNbOO9KRSjKgXc+Qz/lA= Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id B7A3D3CF449 for ; Mon, 8 Apr 2024 09:48:20 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-7.smtp.seeweb.it (in-7.smtp.seeweb.it [217.194.8.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id D85F53CF448 for ; Mon, 8 Apr 2024 09:48:16 +0200 (CEST) Authentication-Results: in-7.smtp.seeweb.it; spf=pass (sender SPF authorized) smtp.mailfrom=andestech.com (client-ip=60.248.80.70; helo=atcsqr.andestech.com; envelope-from=minachou@andestech.com; receiver=lists.linux.it) Received: from Atcsqr.andestech.com (60-248-80-70.hinet-ip.hinet.net [60.248.80.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-7.smtp.seeweb.it (Postfix) with ESMTPS id 8FF4E2001D2 for ; Mon, 8 Apr 2024 09:48:12 +0200 (CEST) Received: from Atcsqr.andestech.com (localhost [127.0.0.2] (may be forged)) by Atcsqr.andestech.com with ESMTP id 4387Jdem076086 for ; Mon, 8 Apr 2024 15:19:39 +0800 (+08) (envelope-from minachou@andestech.com) Received: from mail.andestech.com (ATCPCS16.andestech.com [10.0.1.222]) by Atcsqr.andestech.com with ESMTP id 4387IxVS075503; Mon, 8 Apr 2024 15:18:59 +0800 (+08) (envelope-from minachou@andestech.com) Received: from swlinux02.andestech.com (10.0.15.183) by ATCPCS16.andestech.com (10.0.1.222) with Microsoft SMTP Server id 14.3.498.0; Mon, 8 Apr 2024 15:18:55 +0800 To: Date: Mon, 8 Apr 2024 15:18:48 +0800 Message-ID: <20240408071848.80862-1-minachou@andestech.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Originating-IP: [10.0.15.183] X-DNSRBL: X-SPAM-SOURCE-CHECK: pass X-MAIL: Atcsqr.andestech.com 4387Jdem076086 X-Spam-Status: No, score=0.4 required=7.0 tests=RDNS_DYNAMIC,SPF_HELO_NONE, SPF_PASS shortcircuit=no autolearn=disabled version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on in-7.smtp.seeweb.it X-Virus-Scanned: clamav-milter 1.0.3 at in-7.smtp.seeweb.it X-Virus-Status: Clean Subject: [LTP] [PATCH v3] waitid10: Add .needs_tmpdir=1 to run test in temporary directory X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Hui Min Mina Chou via ltp From: Mina Chou Reply-To: Hui Min Mina Chou Cc: Hui Min Mina Chou , tim609@andestech.com, cynthia@andestech.com, az70021@gmail.com Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" 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 Reviewed-by: Li Wang --- 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, };