From patchwork Wed Jun 5 22:36:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13687641 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 E2743C27C53 for ; Wed, 5 Jun 2024 22:37:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 63B116B0088; Wed, 5 Jun 2024 18:37:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5EB626B0098; Wed, 5 Jun 2024 18:37:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4B2C36B00A7; Wed, 5 Jun 2024 18:37:18 -0400 (EDT) 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 2EB676B0088 for ; Wed, 5 Jun 2024 18:37:18 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id A4BD5A07DB for ; Wed, 5 Jun 2024 22:37:17 +0000 (UTC) X-FDA: 82198297314.10.84394A7 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf02.hostedemail.com (Postfix) with ESMTP id 4FA4280008 for ; Wed, 5 Jun 2024 22:37:14 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=jFNBiP+0; spf=pass (imf02.hostedemail.com: domain of broonie@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=broonie@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1717627036; a=rsa-sha256; cv=none; b=WzaLqI2KI3mdcxkLSltEg8g8BOcLjF9Q5OhciGh7buVgY50XHAYqLKLc+h27vN8E9D23wr RH8TazCtvimAioVLICLo2ZYIdmcznbFHujw3LD/17TfX8GVF/o1qAaHEEgtrN/Y4a+qfV0 ooZqY4BY9SiSsCPl/7ACWptkOTLq548= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=jFNBiP+0; spf=pass (imf02.hostedemail.com: domain of broonie@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=broonie@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1717627036; 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=Ob6qEOmMdbUSBiAPphAeS1Y9Rtq6xo99j5d/BuTlb2Y=; b=N1oJnEVYy1EkGviOZE7e3ASQsUEXp+MCfO21WATr4GN34+ygE+dMyEh6Pr0iv3xQ3+Tt/H sfkgLSORFLj0J7i+3XAL09NXFXKfJWrDHb4x7kpV7INJSCJytdxTc3xHS1a/zAbZqN5amE pWfHcsyOG2UyXu3SdfWBFX6keq81XmI= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 55A7CCE19B2; Wed, 5 Jun 2024 22:37:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C6B20C2BD11; Wed, 5 Jun 2024 22:37:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717627031; bh=dVVjuhrnk9rcVfTcckSF8nLr2PRkHx3HB+XsjZZpYsM=; h=From:Date:Subject:To:Cc:From; b=jFNBiP+0gNWI3mAtVSdDqJoB/4RQB/VGMHi6gTI7OPrtjkTcttXv9KwJ5PMZ9RVTJ XG6qNJ4pu1qHMIz1TefEqYX1CgK5NE4jIfzOPcR71DSLWVMNNr1IxSzU0zPYH/z0BP gIONW7IaVGoU1Cv/5vpWo8bYVkQ1A8SeU9g5Dwh21+TqFRmp2e4HDiqBQCPDXH9o0o xu5DDBZktkrkagHNTtH/PGPP0CxigN0hRcxQyFATU2kbh7zXassKbOnUFRB4Vnr6Jy zksN1gVNaDfMzFzb0nmV0ANhEOcKDYQ5X7/N8DFjpV74lBTwPm5GXWhYk6ahfxpayA 8nHMkz6Ph1Dxg== From: Mark Brown Date: Wed, 05 Jun 2024 23:36:12 +0100 Subject: [PATCH] selftests: mm: Make map_fixed_noreplace test names stable MIME-Version: 1.0 Message-Id: <20240605-kselftest-mm-fixed-noreplace-v1-1-a235db8b9be9@kernel.org> X-B4-Tracking: v=1; b=H4sIAFvoYGYC/xXMQQqDMBBG4avIrB2IkqTFq4iLEP+0QzVKRkpBv Hvj8oPHO0lRBEpDc1LBV1S2XNG1DcV3yC+wzNXUm94abxx/FEs6oAevKyf5Yea8FexLiGBr8YB z8em7QHWxF9zJvR+n6/oDN+K3yG4AAAA= To: Andrew Morton , Shuah Khan , Muhammad Usama Anjum Cc: Ryan Roberts , linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Brown X-Mailer: b4 0.14-dev-d4707 X-Developer-Signature: v=1; a=openpgp-sha256; l=4850; i=broonie@kernel.org; h=from:subject:message-id; bh=dVVjuhrnk9rcVfTcckSF8nLr2PRkHx3HB+XsjZZpYsM=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBmYOiUCt0+i/NP4Ix1ci7NExxF8e79RLps0+Fa+d71 5yBnE46JATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZmDolAAKCRAk1otyXVSH0F56B/ 9+XCV+81OEz6Gnn6s5XC8fRlmAChtPCuWw2nbJKMi6EU2jycWSs+/C5eUzRrFLWZ2F+8x4ub6CGsrY j2hSaL0z78nnEkf0dN/BT+Seggg5aJyY1IUjlScKrUTdY0TuZ3l4eUcnJlv7OQcjJmQKDaTOP0uuMw 2qHCOTwF1BagPNuAckJYgZ4c6V9JNNgdq6fN2Rb0d/4RlTuniG7zzafhn4K6KXhJvwuxmdsaxG37E0 H4FxxJ3Eap2IClToMNoclf5DizIBQg4eTVPrSmTGS5Xp88b7i2OvxWDerUaxXuDJ3VUUcgxN/v3osU W//sDueyMuBF/tw+G+m8W91t3UOcl8 X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-Rspamd-Queue-Id: 4FA4280008 X-Rspam-User: X-Rspamd-Server: rspam12 X-Stat-Signature: 5hbi9ifhsi93wuuk78196i1anaw9hs8u X-HE-Tag: 1717627034-613858 X-HE-Meta: U2FsdGVkX1+9N1qtrF4Sx203yuGxLegjirw8KdJFVZHnqcWw4tzlDXGyva6AVfx0Aj0Ue8CCRcKsWBZJv7xLS+3juZqo+agUmIuGx1JkaBlwc9hPDTIm6aSVBek0zVsMQ26JBvx1fCoOFUB62vVk3C9y7+p+M8mnv7Oo91fgGfrUAtf8t12tso/CjWO/nnAp8a5qBMUXUmfJW6gLI6wq+9k6wJNzI+fEQCXTMgHn4iF6bkG8Wnf3tyPG8c077kQLFsgdecEz78+lKtHxsJUrCXyq3kBYIRJ7/DxJodQ8/2Jo+VdDvcI+Mh6nB9EJvwAfm8EO3wxVRU+qLlBFL46j3F4z4jqeIEticStYx05XiEQjUFb7rZ2ru3EGVz6SiSEFYpxjY1WJw4k8WQADCIJ//etCN86Y3HsJpircpxIrQCPhpKwaWD+K/OKxRflWrdkAm69sTyxzHUVEOMD/4xM9CEesdjMqSjqdC+1tBpfiBIbWSczBMVsZ6LsDmPw7whH5LFUPe+okErXAEEUHFAtTjK47QQUDFfnV5XLXeMXhGy7eZGFJJrwFg25a9zoFMfwe/wrgYbWWPD3O0ozlLlCXhFCqhqgzdlIPgmibQtkECRZyAMqsw/GoOgFu0d3L6sH2sgkCGuRPmijEzpvu5byLSs/1WlhgM/JgkxqIubw+yg5rbbKiuM2g+0MIbrrRkzBBGAUM+hhda8kUMEYpap5u00o5pffOfvYKJS8vlekZgWMmg/PLmHMXLrq8jQQxVO++iD1/Q+EoIYaXBA6Jtk18c28YIuquVyFqWoxxG02c/37VDwPOxOxhGNqsEsb/x2ANffzW5iodVS3UUZ3Biotd7jJfdCKmtVfEVWtkYxQAL+z02K+XzDSDRXOuIXqKbAq8a4TE/fo4pdQXB6QVpFj5u/ZT0qXLrEd27EfZrES8SvaulXMdWgd1HNH0r2wSV1zF7ZNFYmWdOsrzzbISOfJ 3wXgK79r gwqtlw95qPMzzopbpEq7ZH6zVN3WAwzviPmXem+BG5iFkddTKO6Dj9/rX3GfXCMIngxrpTbpeIS2diVz92mo5BZPgaajfT3j8QDccgSLle/cfnjN1EJBt0APFb2BIdVN2CWYsvOT79WA1aBl4t90/1PNyUzYSuflG7exMjKHIF+Mqt78VARRKPnmnUjSi7M+x6bzbuIQpJG0kj2BfozyL8J4xGEnnamEjbUbgp5/h/mgXWtJts68X8MhKHlhVW1D7kneOrE41axCK+fQa4Sd/+0tLY5o0g0YA7qlryStbjMSmnt4= 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: KTAP parsers interpret the output of ksft_test_result_*() as being the name of the test. The map_fixed_noreplace test uses a dynamically allocated base address for the mmap()s that it tests and currently includes this in the test names that it logs so the test names that are logged are not stable between runs. It also uses multiples of PAGE_SIZE which mean that runs for kernels with different PAGE_SIZE configurations can't be directly compared. Both these factors cause issues for CI systems when interpreting and displaying results. Fix this by replacing the current test names with fixed strings describing the intent of the mappings that are logged, the existing messages with the actual addresses and sizes are retained as diagnostic prints to aid in debugging. Fixes: 4838cf70e539 ("selftests/mm: map_fixed_noreplace: conform test to TAP format output") Signed-off-by: Mark Brown Reviewed-by: Muhammad Usama Anjum Reviewed-by: Ryan Roberts --- tools/testing/selftests/mm/map_fixed_noreplace.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) --- base-commit: c3f38fa61af77b49866b006939479069cd451173 change-id: 20240605-kselftest-mm-fixed-noreplace-44e7e55c861a Best regards, diff --git a/tools/testing/selftests/mm/map_fixed_noreplace.c b/tools/testing/selftests/mm/map_fixed_noreplace.c index b74813fdc951..d53de2486080 100644 --- a/tools/testing/selftests/mm/map_fixed_noreplace.c +++ b/tools/testing/selftests/mm/map_fixed_noreplace.c @@ -67,7 +67,8 @@ int main(void) dump_maps(); ksft_exit_fail_msg("Error: munmap failed!?\n"); } - ksft_test_result_pass("mmap() @ 0x%lx-0x%lx p=%p result=%m\n", addr, addr + size, p); + ksft_print_msg("mmap() @ 0x%lx-0x%lx p=%p result=%m\n", addr, addr + size, p); + ksft_test_result_pass("mmap() 5*PAGE_SIZE at base\n"); addr = base_addr + page_size; size = 3 * page_size; @@ -76,7 +77,8 @@ int main(void) dump_maps(); ksft_exit_fail_msg("Error: first mmap() failed unexpectedly\n"); } - ksft_test_result_pass("mmap() @ 0x%lx-0x%lx p=%p result=%m\n", addr, addr + size, p); + ksft_print_msg("mmap() @ 0x%lx-0x%lx p=%p result=%m\n", addr, addr + size, p); + ksft_test_result_pass("mmap() 3*PAGE_SIZE at base+PAGE_SIZE\n"); /* * Exact same mapping again: @@ -93,7 +95,8 @@ int main(void) dump_maps(); ksft_exit_fail_msg("Error:1: mmap() succeeded when it shouldn't have\n"); } - ksft_test_result_pass("mmap() @ 0x%lx-0x%lx p=%p result=%m\n", addr, addr + size, p); + ksft_print_msg("mmap() @ 0x%lx-0x%lx p=%p result=%m\n", addr, addr + size, p); + ksft_test_result_pass("mmap() 5*PAGE_SIZE at base\n"); /* * Second mapping contained within first: @@ -111,7 +114,8 @@ int main(void) dump_maps(); ksft_exit_fail_msg("Error:2: mmap() succeeded when it shouldn't have\n"); } - ksft_test_result_pass("mmap() @ 0x%lx-0x%lx p=%p result=%m\n", addr, addr + size, p); + ksft_print_msg("mmap() @ 0x%lx-0x%lx p=%p result=%m\n", addr, addr + size, p); + ksft_test_result_pass("mmap() 2*PAGE_SIZE at base+PAGE_SIZE\n"); /* * Overlap end of existing mapping: @@ -128,7 +132,8 @@ int main(void) dump_maps(); ksft_exit_fail_msg("Error:3: mmap() succeeded when it shouldn't have\n"); } - ksft_test_result_pass("mmap() @ 0x%lx-0x%lx p=%p result=%m\n", addr, addr + size, p); + ksft_print_msg("mmap() @ 0x%lx-0x%lx p=%p result=%m\n", addr, addr + size, p); + ksft_test_result_pass("mmap() 2*PAGE_SIZE at base+(3*PAGE_SIZE)\n"); /* * Overlap start of existing mapping: @@ -145,7 +150,8 @@ int main(void) dump_maps(); ksft_exit_fail_msg("Error:4: mmap() succeeded when it shouldn't have\n"); } - ksft_test_result_pass("mmap() @ 0x%lx-0x%lx p=%p result=%m\n", addr, addr + size, p); + ksft_print_msg("mmap() @ 0x%lx-0x%lx p=%p result=%m\n", addr, addr + size, p); + ksft_test_result_pass("mmap() 2*PAGE_SIZE bytes at base\n"); /* * Adjacent to start of existing mapping: @@ -162,7 +168,8 @@ int main(void) dump_maps(); ksft_exit_fail_msg("Error:5: mmap() failed when it shouldn't have\n"); } - ksft_test_result_pass("mmap() @ 0x%lx-0x%lx p=%p result=%m\n", addr, addr + size, p); + ksft_print_msg("mmap() @ 0x%lx-0x%lx p=%p result=%m\n", addr, addr + size, p); + ksft_test_result_pass("mmap() PAGE_SIZE at base\n"); /* * Adjacent to end of existing mapping: @@ -179,7 +186,8 @@ int main(void) dump_maps(); ksft_exit_fail_msg("Error:6: mmap() failed when it shouldn't have\n"); } - ksft_test_result_pass("mmap() @ 0x%lx-0x%lx p=%p result=%m\n", addr, addr + size, p); + ksft_print_msg("mmap() @ 0x%lx-0x%lx p=%p result=%m\n", addr, addr + size, p); + ksft_test_result_pass("mmap() PAGE_SIZE at base+(4*PAGE_SIZE)\n"); addr = base_addr; size = 5 * page_size;