From patchwork Wed Nov 27 16:14:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13887190 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72C5BD6ACF2 for ; Wed, 27 Nov 2024 16:19:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1142E6B0085; Wed, 27 Nov 2024 11:19:25 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0C5066B008C; Wed, 27 Nov 2024 11:19:25 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id ECE236B0092; Wed, 27 Nov 2024 11:19:24 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id CD10A6B0085 for ; Wed, 27 Nov 2024 11:19:24 -0500 (EST) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 4C3181616FC for ; Wed, 27 Nov 2024 16:19:24 +0000 (UTC) X-FDA: 82832384754.19.BFEF7C6 Received: from nyc.source.kernel.org (nyc.source.kernel.org [147.75.193.91]) by imf23.hostedemail.com (Postfix) with ESMTP id 98BED14001A for ; Wed, 27 Nov 2024 16:19:18 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=ZODDARKZ; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf23.hostedemail.com: domain of broonie@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=broonie@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1732724357; a=rsa-sha256; cv=none; b=gCFB7smjmksMtckYt9L51uHTuJEt7zevRkIjlagBZAweevr1E4/+VUbUz3LoyJupepV36+ cx1i7xdVauZPOJDnv1T7V7nicVS42XnPurN08fSk7F14cpOi7bFMhrVsAoYSQrQdDAZH89 wUVMzMxIqssbRqKUQ3CRzl2bPY01pAg= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=ZODDARKZ; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf23.hostedemail.com: domain of broonie@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=broonie@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1732724357; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=dmTjiQLtRN52d/oYtLMUlZt1LgKFAu9U7Kz4feB8mbA=; b=QsGOLKNSoU7PnQ4Br++Ff9XQNsVzE4LbsZhG6n3JZw5ZLal0p2y3Z+OQeU1Z5oVLdhe5IZ QW6DHnqUmT+01iyaQbCz3sp3Eh/09DN3SKO2X47ZbKXyj5VgAJuQRbgRNQqlDt+CFZI60A faTjMJG5ZEehCkkNgNeZzEyZwkljlkU= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id F226FA43968; Wed, 27 Nov 2024 16:17:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B566EC4CECC; Wed, 27 Nov 2024 16:19:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1732724361; bh=VGj1urPXgirpBpZCxUml45/Ecma/LMtwQIvuA1d+HWU=; h=From:Date:Subject:To:Cc:From; b=ZODDARKZqOaZ1pX5mdF+8lESiPPu26IFoeJJ+jUXkoS6wgmmf6cFMVMwjTgrom1Dq CP2nImVWHee4L9XcNysL6T0f0LGmkXAmk79bUnRRf0b72fWWPLthGn+f8SjdyLNLcB Muj+ww/dy9Yb1mCCATRzr+Gw8q9ja+OMRl/gBwBSMxuIo0tFju0oCKqmKJtPMc4QJC DaCgOTsJsf0dUQg8HCLsQZHPMxwnObb71zSnvuR7GNuA2dQ8iBCEvgaMTG9Qofu5K8 ahiZEJFzedhA9MWMUW37jijXDAfFmbDdxquA2WtxK4d/lzsw9Yd46hAWO0xRDhn1IA ZM59faMXJ4M7w== From: Mark Brown Date: Wed, 27 Nov 2024 16:14:22 +0000 Subject: [PATCH] selftest: hugetlb_dio: Fix test naming MIME-Version: 1.0 Message-Id: <20241127-kselftest-mm-hugetlb-dio-names-v1-1-22aab01bf550@kernel.org> X-B4-Tracking: v=1; b=H4sIAF1FR2cC/x3NQQrCMBBG4auUWTvgRMHiVcRFk/xtB5tUMqkIp Xc3uPw27+1kKAqje7dTwUdN19wgp47CPOQJrLGZ3NldRdyNX4ZlrLDKKfG8TaiL56gr5yHBWOB D8Oilv0RqkXfBqN//4PE8jh8E4SxGcAAAAA== X-Change-ID: 20241127-kselftest-mm-hugetlb-dio-names-1ebccbe8183d To: Andrew Morton , Shuah Khan , Donet Tom Cc: "Ritesh Harjani (IBM)" , Muhammad Usama Anjum , linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Brown X-Mailer: b4 0.15-dev-9b746 X-Developer-Signature: v=1; a=openpgp-sha256; l=2481; i=broonie@kernel.org; h=from:subject:message-id; bh=VGj1urPXgirpBpZCxUml45/Ecma/LMtwQIvuA1d+HWU=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBnR0aGmTf7TspLsdIwd/JO0KQoZMrjSCzXVD3QifL/ FxQZOs+JATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZ0dGhgAKCRAk1otyXVSH0A80B/ 9gzQZWA4bpLSHy9xmV1ACmwxzXU0aUm/3V6gLW3quSihlXjcvvGorD7iPK0HrSFI0vQX4i714pryKC GqXkjOkf9Za6BktApVHHinWYlMgq3b8C0Hkdtze81kH+RVbXHeCEf/3jW3qDROO30c0IW/eVj7ro2B KXSEF4ihnWNgHKY/0oJwaKTj5BuuCLSjYdTRFRSFDnES6ZqwxywS6M+khXpfRbTJSOA1EkHYnz5j/0 42goxcDxwH+dw715SRmJuOfGGYsFvKL6f9XnBODMSEtqXwc4uL8Qr0wHIelQTUiybH4+Rz/91LpP4L l8md8cT6uZygXnoD1VCEeVzGZAc0t3 X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 98BED14001A X-Stat-Signature: nodj8t8o98ewaj1eppruq5h9zadwt738 X-Rspam-User: X-HE-Tag: 1732724358-219208 X-HE-Meta: U2FsdGVkX1+P6nSek9ayY03TlzF5kExzAZAx3lP71Wnheu5Z8ZlbFxGsY5JNG0EiLD91RRkSuAcnrXXv7eBY2lb9pxB12CpjbhKMh8CJRn+QwbtAr4lrM7Ba8IimjO/35z9OT9nP9NmTzszhyRgFciXjKoBqzh9fTa/QvWtBMX/+aBJqcecEVckivEjiBu03Xgfy5q30vs5SrTiKEXb0Hx+yEeqPT0ngDrBUt6enfVeaYNDscGGer/uQ3Q2sVacCeLg23ShXCSQjlti3vUx7lwrOi/zuVDb+QFTfqi2bZ7iMRAJcp/KBPNtZpV5sw9GdW8DyjGuwyY7+dSO9RpQW9PnZq+qSmzhudg7iXbifjuhIWZ4KJleGi+2X3+dAKydHDBB7T+yoEI8b1TG/VWLmN7ZfHY9cpQxzfzIFN/JJnAV/34x72ufhsHObiJAKBdQ35WJumnJ0JS/2ASDvj9OuKgZRw/7kH9QdIDEVMG+cMWU+sKkTnu5uDCS1oYdnL0fOTJhF0VoPDVioStE4WBKUeiLfz0e/U0c18UpoCugKJEYbhTZ5HqmJOgL0K2pV7o2/XCzpUXmyECvR82nZvmMhuS0UYULmXYDhYtDTJ/Li8VLcoj7dcdNyjCa1hNHIHk/CYL22+cpprRRu52Ov2rfOIJ0yyXGDxQZD58miULkzOSryyA9DAUFMsIzDRIzt9ZTGIBo2ICxr+wJR5+7+7c2MBf5Vcn6mXMnDlDsdHlub+1SHPBCJt/XC4wCh320a5urEgYk5zMum422H0vze7IMqakduu9/e0sevdZ7Y6QedjpZ+su/qTjHMjmYafE0TDCJV3fvziQvH/YRuOuuGfalXLvUF+UqHFyUJGMbfJUlSSVvuEDZ5LHvMzHlx+WIHnpyNLewa5vya8crcz2dt0VTHsIP3WwA4+/IsJThgHVMtPeVaF2p9WiH/tMTRNHZwOfy7xJfA8xO1Hkun1kajuEE emP20q0l 86uh/P9PIknYr9+D39n4oe3POF9O8yFY2ed9JvUh8g9OnDOUEwo0lr5b7NKQPY2LZGSrv6DCtxorTIyE7I30/yhb82e2AcKr6be36AP2g+RtVT35EwBLTx7YS1fuEPX7nWj5Uem/AqjdSMvKHL0NLyfmBsI2J/XS/WeNJK30ucRDrOKuB9Vg32lul951CuTzn2o4PaB3Cv3XwzH6B5bFx/VOxOdPcAVb225xi8s6snDPKnvgThtntjT/4WHYriSUKVwNRRhqDyqllTYzjr9aabngDrlSn1Sj3NgCov/8tgrQ/Ivwx4zRsDujkwZhERhApS4R8X1bVr9agc7gNjBI/UhpOyKt30d1GMU2gjSbRWQYvFcs= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: The string logged when a test passes or fails is used by the selftest framework to identify which test is being reported. The hugetlb_dio test not only uses the same strings for every test that is run but it also uses different strings for test passes and failures which means that test automation is unable to follow what the test is doing at all. Pull the existing duplicated logging of the number of free huge pages before and after the test out of the conditional and replace that and the logging of the result with a single ksft_print_result() which incorporates the parameters passed into the test into the output. Fixes: fae1980347bf ("selftests: hugetlb_dio: fixup check for initial conditions to skip in the start") Signed-off-by: Mark Brown --- tools/testing/selftests/mm/hugetlb_dio.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) --- base-commit: 6f3d2b5299b0a8bcb8a9405a8d3fceb24f79c4f0 change-id: 20241127-kselftest-mm-hugetlb-dio-names-1ebccbe8183d Best regards, diff --git a/tools/testing/selftests/mm/hugetlb_dio.c b/tools/testing/selftests/mm/hugetlb_dio.c index 432d5af15e66b7d6cac0273fb244d6696d7c9ddc..db63abe5ee5e85ff7795d3ea176c3ac47184bf4f 100644 --- a/tools/testing/selftests/mm/hugetlb_dio.c +++ b/tools/testing/selftests/mm/hugetlb_dio.c @@ -76,19 +76,15 @@ void run_dio_using_hugetlb(unsigned int start_off, unsigned int end_off) /* Get the free huge pages after unmap*/ free_hpage_a = get_free_hugepages(); + ksft_print_msg("No. Free pages before allocation : %d\n", free_hpage_b); + ksft_print_msg("No. Free pages after munmap : %d\n", free_hpage_a); + /* * If the no. of free hugepages before allocation and after unmap does * not match - that means there could still be a page which is pinned. */ - if (free_hpage_a != free_hpage_b) { - ksft_print_msg("No. Free pages before allocation : %d\n", free_hpage_b); - ksft_print_msg("No. Free pages after munmap : %d\n", free_hpage_a); - ksft_test_result_fail(": Huge pages not freed!\n"); - } else { - ksft_print_msg("No. Free pages before allocation : %d\n", free_hpage_b); - ksft_print_msg("No. Free pages after munmap : %d\n", free_hpage_a); - ksft_test_result_pass(": Huge pages freed successfully !\n"); - } + ksft_test_result(free_hpage_a == free_hpage_b, + "free huge pages from %u-%u\n", start_off, end_off); } int main(void)