From patchwork Tue Feb 13 19:06:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 200580 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp764105dyb; Tue, 13 Feb 2024 11:32:50 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUNJih2+1fHIPg4lx6k1UhwKYdZZRAXekraBE+XwFQ5eh6M1ELicChTHBZpbrc/0LWJZc+atJuMGY5N75H6Qn0nbzSXgQ== X-Google-Smtp-Source: AGHT+IGNj9Ggk8ViTYRp4jSSwmUe7P1aXEGV+MJqR1949Zy4HibZbU80PP8b2Os9vKoe7znlW9Vg X-Received: by 2002:a05:6a00:194c:b0:6e0:6aaf:5e57 with SMTP id s12-20020a056a00194c00b006e06aaf5e57mr4698650pfk.8.1707852769937; Tue, 13 Feb 2024 11:32:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707852769; cv=pass; d=google.com; s=arc-20160816; b=tDVVIYhIagM/UGTLyUCeVIqAaIEdgoUoZNYH3Mj0OULJ5Q5n+QLtGrhHOsIrwxbLCM QnS6Q1H8iw5khBXK9sniB7igT7VCNHL1v96dqDDbmzQ1o84/xml5mRaASnZQ6ULn4cEP MBrh9Ws4uvRLH9gq+upWfWtCD/fIs3spWGG5+YR/RCjGmVbPg+b+MB1wG97r/gbCF5z+ G0KPDHHIi6gTC5Mz23YBWKIplgmwGk3Ys/cPjDF8cOBoURlhvM1TznLExPVH7YjZ8QfG tz3AtW4QvMYyMOhNCW0QpYmAnrO9259ITyNeZ72+g34PTAWCiDrcE8R6wJY06QVviAE9 W0nw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:message-id:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:subject:date :from:dkim-signature; bh=rEzNXteR9zfff/1Ood7WX85mil4C8ACfYfZlWrZpH0M=; fh=VRYYK71Xmuw+2wPIfI7a9oiBOXS3Y3uGycnqFjebpxA=; b=e0KHR+lB6AijnXmqEdXAdCOJGpKEIhihNnW6xUrPjsobuq29cXON3ndA40KBYTwkQp UwshcTg7uYVtrl3Fv+6ZMXyyT99Y0mfPQ1ZlutqGH9JRTTl2dX6Eg3awT95QRHpA7bUI EgReOz/8IDTQ8CoqVb1FOcLpKWS26k8BYOyR8ViV22D3EHhLc6b14vNvE42Y5Hi4l12a s4laslNKIZuGvMa7Q5D/2RTNeN1ERSGtLh4h6PxHb3AXQBSSgCcq3C5x4erGWkVK/X6a qDNq6erylFpj7TvdcxtzcdCyHV1f1CdBgN9D/uRQijHsv5PfHrRNJL/8daUDZkBezihC sEWw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=a7jFgM4X; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-64134-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64134-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCX761whO8EMqHRS/28qK4Lqoovq/t7PJWI05RLeIeqzSLmLNBkwaiR+H4mrBAVkr/dFYmiMwgCla3aV5AoU8QXBz/OhRA== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id z25-20020a637e19000000b005dc50f61543si2431828pgc.427.2024.02.13.11.32.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 11:32:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-64134-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=a7jFgM4X; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-64134-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64134-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id C14D6B22C94 for ; Tue, 13 Feb 2024 19:06:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9ADB31F618; Tue, 13 Feb 2024 19:06:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="a7jFgM4X" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0191510A1F; Tue, 13 Feb 2024 19:06:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707851200; cv=none; b=ieMHEKwQ0OQVTN9hmFqnPwtYJNYaaBLTeEg3E/MWrh/315dbZ3KBZO7DIpt65rQ9CQ7lB5wEWRGB4yCE3IaOIuBfvSR5sxoI0SnU42+SjiN+vcBQfOmfuqTZXAIYyi/U4lg2yUxmpL0Tjqpl18OjUFGCceE5rCIMhx9aMTvAjhw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707851200; c=relaxed/simple; bh=Gw1CLABHdLSREPjmsGpSQgxQ33jFrHLiGLWyntbYGi0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=TW1XgblMfGFNQHy419Es0LPb362JNx75lqYfXEa3JhchHY3PqzlzTTIGGCBdJYSsSXlBmAONGaqhlxSf3Jbm5/EveUNOkYj7I5ZFH3/SLMcL0G8jPqFZpvI2YF1NXXiRvW19Mx/6w3dVChIo+e4tH2qSxQx19zpJdRbk7svP6Ug= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=a7jFgM4X; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 837ABC433F1; Tue, 13 Feb 2024 19:06:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707851199; bh=Gw1CLABHdLSREPjmsGpSQgxQ33jFrHLiGLWyntbYGi0=; h=From:Date:Subject:To:Cc:From; b=a7jFgM4XnoeYLMbIPH4dAgz9wqsxVhQLSq71J9dKwBX24pVefaP3OEibgi/5+ju6s OMHKa1YNoqYKjjfmMgYtnJkwhaTmSKbA+vwruPwmQdXmMZq8uifPEHptUDWFsOm3f6 tVOFLYUzEaGH+Yfr9hZCZpBYUnQJDTpc/BZ72VxWlg8fE7vcBJP01oAHIcFfaZjT3p +NCvEtIow59l9Yo6k618+cTAPu3S3Og8jrKLP9/29Wckfiq277piMo7+mhglpDMkVf tIX/4SfJ0sEJeYauiatpJSgNnYV924oUAOBvKnZxgGQ6xOrl3MurG78hqb4Y5N7jEK ZtRMMccRxiXjA== From: Mark Brown Date: Tue, 13 Feb 2024 19:06:02 +0000 Subject: [PATCH] selftests: fuxex: Report a unique test name per run of futex_requeue_pi Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240213-kselftest-futex-requeue-pi-unique-v1-1-fa160a4a7ade@kernel.org> X-B4-Tracking: v=1; b=H4sIAJm9y2UC/x2NzQqDMBAGX0X23IWYWA++SunBny92aYk2m4ggv rvB28xl5iBFFCh11UERm6gsoUj9qGj89GEGy1ScrLGNsbXjr+LnEzSxzwk7R/wzMngVzkEK87N vWuuM8+0wUumsEV72+/F6n+cFU419zXMAAAA= To: Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Darren Hart , Davidlohr Bueso , =?utf-8?q?Andr=C3=A9_Almeida?= , Shuah Khan Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Mark Brown X-Mailer: b4 0.13-dev-a684c X-Developer-Signature: v=1; a=openpgp-sha256; l=2490; i=broonie@kernel.org; h=from:subject:message-id; bh=Gw1CLABHdLSREPjmsGpSQgxQ33jFrHLiGLWyntbYGi0=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBly728JE9/sjpLA+molsY4IjLnMKEYeBb56mcXOoZg 43+xunCJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZcu9vAAKCRAk1otyXVSH0KU5B/ kBnOH3XDHuaEfjvWSGla+lUJwLaB4ISoxk8/P3UFtpjh8t+MI2uV+b+Fia6XOf3TSMBgEXPaBO8kgp zPmhDiI/tCqy6nD4I8SlaOfWkZPwgpp+pD2Zlaoe4uOxD/Id6Mvgih1LWSq/VyyqkmdAKgDoBGgpQw 7YKNhCGmdZytZ9nErrgaUF3lrs/g9d/9yx0yHCscIzcgx9tNS9xzCiKQ/CPYes9JSXYQ4I68Xpkda4 w+D2OPPsaSdMet7zmQomdF73SV1S6C3JK4JWrH9dq8pzThNU2ShLvrVNbKVBzCoeIS3hi7P9z62/9H p92U7NYdmDc9RtwoxyxefCnKYfj6RK X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790813426304798719 X-GMAIL-MSGID: 1790813426304798719 The futex_requeue_pi test program is run a number of times with different options to provide multiple test cases. Currently every time it runs it reports the result with a consistent string, meaning that automated systems parsing the TAP output from a test run have difficulty in distinguishing which test is which. The parameters used for the test are already logged as part of the test output, let's use the same format to roll them into the test name that we use with KTAP so that automated systems can follow the results of the individual cases that get run. Signed-off-by: Mark Brown Acked-by: Davidlohr Bueso Acked-by: Thomas Gleixner --- tools/testing/selftests/futex/functional/futex_requeue_pi.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) --- base-commit: 54be6c6c5ae8e0d93a6c4641cb7528eb0b6ba478 change-id: 20240213-kselftest-futex-requeue-pi-unique-5a462303f6bc Best regards, diff --git a/tools/testing/selftests/futex/functional/futex_requeue_pi.c b/tools/testing/selftests/futex/functional/futex_requeue_pi.c index 1ee5518ee6b7..7f3ca5c78df1 100644 --- a/tools/testing/selftests/futex/functional/futex_requeue_pi.c +++ b/tools/testing/selftests/futex/functional/futex_requeue_pi.c @@ -17,6 +17,8 @@ * *****************************************************************************/ +#define _GNU_SOURCE + #include #include #include @@ -358,6 +360,7 @@ int unit_test(int broadcast, long lock, int third_party_owner, long timeout_ns) int main(int argc, char *argv[]) { + const char *test_name; int c, ret; while ((c = getopt(argc, argv, "bchlot:v:")) != -1) { @@ -397,6 +400,14 @@ int main(int argc, char *argv[]) "\tArguments: broadcast=%d locked=%d owner=%d timeout=%ldns\n", broadcast, locked, owner, timeout_ns); + ret = asprintf(&test_name, + "%s broadcast=%d locked=%d owner=%d timeout=%ldns", + TEST_NAME, broadcast, locked, owner, timeout_ns); + if (ret < 0) { + ksft_print_msg("Failed to generate test name\n"); + test_name = TEST_NAME; + } + /* * FIXME: unit_test is obsolete now that we parse options and the * various style of runs are done by run.sh - simplify the code and move @@ -404,6 +415,6 @@ int main(int argc, char *argv[]) */ ret = unit_test(broadcast, locked, owner, timeout_ns); - print_result(TEST_NAME, ret); + print_result(test_name, ret); return ret; }