From patchwork Fri Oct 11 14:36:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13832611 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7968CD0D79C for ; Fri, 11 Oct 2024 14:42:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:Message-Id: Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=TXnyS4b7Hxjj/+qnRn0TM5wriNQf1jTyzDKRKUahxGw=; b=t8rrT9Obp0gUDiHtcsXPCTpwuh JAMB52s+Fk/jrOp3U8AwNEJmSsxY8Gml/MQ4zZaf1gDnjnuvSz55p73PsYQMmWb6P8Mn0ZvVPjumz mqyXZd4HY0+R0TENXKurqksnyuv/AHUM+c0OaMlEPsjr6ofrz5hyTkWm76QtLEx9ydSOJHtmgrc35 d/dXKlaE0uYJs4nRBP5kPiTjhFL5gxyYAub5ZRkX46TB8fxBuc+TLpQWBLp+BGHLs/7wXcXgtn1nF HRasEXSWZk0cZzZ8Vh8U2pyasJ3ocDOXF2W0u17pEyLKSZkyHEDZ5ZGxIBoeVqY+UArauFKA7oTKs wio0+ZXw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1szGqE-0000000Ge4U-1M7d; Fri, 11 Oct 2024 14:42:06 +0000 Received: from nyc.source.kernel.org ([147.75.193.91]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1szGl7-0000000Gco5-1hiM for linux-arm-kernel@lists.infradead.org; Fri, 11 Oct 2024 14:36:50 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id AC328A44922; Fri, 11 Oct 2024 14:36:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 822EDC4CEC3; Fri, 11 Oct 2024 14:36:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1728657408; bh=1ea53qrez4o6hsa0y87C5X/KVCdb6cASptIkacZH8m0=; h=From:Date:Subject:To:Cc:From; b=XCAMeVr0Tbz5GecDr6+K2LhRuVVAfZIiblGVVc9KXFC9OxCWBHZZP+9k3wIzxMekA 5xFwZxDdUapCLjieW6Y0TtGNrjdURu5QKXRLJ8Y2N4phF2zvV4fWclDuNDaXN9OUE/ 4pVHnVRSaRhuODKkgMoZkw380G8PyAjk0t/jYSYLAdDk2856GhcPMZ9/m7UIQRGTNH i6cuVpkIw+YBDOV8Rys/BtUodnY2qB6a4DYy4jZhog+u/rUZktumA+H3MKx++4965V SXViH2EJ/01zrXdat+Mp4mBnCe+zRT+cOMXMP1apMnLtfOPuVkf3DTiaoIKf09xT6Z hk+R1LwmmAuOA== From: Mark Brown Date: Fri, 11 Oct 2024 15:36:25 +0100 Subject: [PATCH] kselftest/arm64: Ensure stable names for GCS stress test results MIME-Version: 1.0 Message-Id: <20241011-arm64-gcs-stress-stable-name-v1-1-4950f226218e@kernel.org> X-B4-Tracking: v=1; b=H4sIAOg3CWcC/x3MQQrCQAxG4auUrA1Mho5UryIuxvq3DdhRklIKp Xd3dPX4Nm8nhymcrs1OhlVd36VCTg31Uy4jWJ/VFENsJYhwtvnc8tg7+2LwX/LjBS55BncphSS XAZIi1cXHMOj239/ux/EFj731xW4AAAA= To: Catalin Marinas , Will Deacon , Shuah Khan Cc: linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Brown X-Mailer: b4 0.15-dev-99b12 X-Developer-Signature: v=1; a=openpgp-sha256; l=1617; i=broonie@kernel.org; h=from:subject:message-id; bh=1ea53qrez4o6hsa0y87C5X/KVCdb6cASptIkacZH8m0=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBnCTf9xKXHIf3VCZybYDBM5exrPgRIKfvh8ASb+ uO9a8tZhfqJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZwk3/QAKCRAk1otyXVSH 0ObYB/9jOh8/jfo6HTYkE3K1TuGikVIeQBcVGtfmoSKn2BF5bjyyYwBejF5GwRv49vFtvkV6Nhc 2Ce+699mHrGBQdPaJH/hHMMMBPykaxkKcXvqnUVF42HGmGzsXMMD1DksmbnzSJII9Tjm+FqxQ7f UvadFRd59rahPn7GGj+UmaN7bGB/99cFbnXKz50Qylevjbi4ZlIfL/ajPniPfiZyL6NYjnJMoSD 8fea38JZCr+rNNF2KrbIleOZnB8H84YHrNrMjHppBMHOI83nwu3pXIqLLM6YwbKXwGVNNWgGxFy sOlhTs1+RiiRYrs+o7LzW6et60XxudRC0W0NrT+LPm0sRLh2 X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241011_073649_549389_7DF1B7DB X-CRM114-Status: GOOD ( 10.91 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The GCS stress test program currently uses the PID of the threads it creates in the test names it reports, resulting in unstable test names between runs. Fix this by using a thread number instead. Signed-off-by: Mark Brown --- tools/testing/selftests/arm64/gcs/gcs-stress.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- base-commit: bb9ae1a66c85eeb626864efd812c62026e126ec0 change-id: 20241011-arm64-gcs-stress-stable-name-8550519fe152 Best regards, diff --git a/tools/testing/selftests/arm64/gcs/gcs-stress.c b/tools/testing/selftests/arm64/gcs/gcs-stress.c index bdec7ee8cfd5..03222c36c436 100644 --- a/tools/testing/selftests/arm64/gcs/gcs-stress.c +++ b/tools/testing/selftests/arm64/gcs/gcs-stress.c @@ -56,7 +56,7 @@ static int num_processors(void) return nproc; } -static void start_thread(struct child_data *child) +static void start_thread(struct child_data *child, int id) { int ret, pipefd[2], i; struct epoll_event ev; @@ -132,7 +132,7 @@ static void start_thread(struct child_data *child) ev.events = EPOLLIN | EPOLLHUP; ev.data.ptr = child; - ret = asprintf(&child->name, "Thread-%d", child->pid); + ret = asprintf(&child->name, "Thread-%d", id); if (ret == -1) ksft_exit_fail_msg("asprintf() failed\n"); @@ -437,7 +437,7 @@ int main(int argc, char **argv) tests); for (i = 0; i < gcs_threads; i++) - start_thread(&children[i]); + start_thread(&children[i], i); /* * All children started, close the startup pipe and let them