From patchwork Thu Mar 23 16:04:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Teo Couprie Diaz X-Patchwork-Id: 1760413 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=) 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 (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Pj9Cj2T8Sz1yXq for ; Fri, 24 Mar 2023 03:05:05 +1100 (AEDT) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id D14D43CE2D8 for ; Thu, 23 Mar 2023 17:05:02 +0100 (CET) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-2.smtp.seeweb.it (in-2.smtp.seeweb.it [217.194.8.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id D37963C010E for ; Thu, 23 Mar 2023 17:05:00 +0100 (CET) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by in-2.smtp.seeweb.it (Postfix) with ESMTP id 2AA45601169 for ; Thu, 23 Mar 2023 17:04:58 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 75D981FB; Thu, 23 Mar 2023 09:05:40 -0700 (PDT) Received: from e126380.arm.com (unknown [10.57.53.10]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id BCAB23F766; Thu, 23 Mar 2023 09:04:55 -0700 (PDT) From: Teo Couprie Diaz To: ltp@lists.linux.it Date: Thu, 23 Mar 2023 16:04:42 +0000 Message-Id: <20230323160442.671164-1-teo.coupriediaz@arm.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-2.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.0 required=7.0 tests=SPF_HELO_NONE,SPF_PASS autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-2.smtp.seeweb.it Subject: [LTP] [PATCH] ipc/msgstress03: Assume all forks will run concurently 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: , Cc: Richard Palethorpe Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" It appears that msgstress03 doesn't account for all PIDs that its children can use, as it expects the tasks will terminate quickly and not reach the PID limit. On some systems, this assumption can be invalid and the PID limit will be hit. Change the limit to account for all possible children at once, knowning that each child will fork as well. Signed-off-by: Teo Couprie Diaz Reviewed-by: Richard Palethorpe Reviewed-by: Leo Yu-Chi Liang Reviewed-by: Li Wang --- This patch was already reviewed as part of a larger series[0]. The rest of the series needs a large rework to be merged, but I felt this patch was a simple and independnt enough to warrant a resend. No changes were made. CI Build: https://github.com/Teo-CD/ltp/actions/runs/4502197808 [0]: https://lists.linux.it/pipermail/ltp/2023-February/033007.html testcases/kernel/syscalls/ipc/msgstress/msgstress03.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testcases/kernel/syscalls/ipc/msgstress/msgstress03.c b/testcases/kernel/syscalls/ipc/msgstress/msgstress03.c index 3cb70ab18..0c46927b8 100644 --- a/testcases/kernel/syscalls/ipc/msgstress/msgstress03.c +++ b/testcases/kernel/syscalls/ipc/msgstress/msgstress03.c @@ -109,7 +109,7 @@ int main(int argc, char **argv) } } - free_pids = tst_get_free_pids(cleanup); + free_pids = tst_get_free_pids(cleanup) / 2; if (nprocs >= free_pids) { tst_resm(TINFO, "Requested number of processes higher than limit (%d > %d), "