From patchwork Fri Feb 9 14:30:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 198924 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp896384dyd; Fri, 9 Feb 2024 06:38:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IG1ztps/0ieM9USM7EyKVEJpG8B5JB+yyaSxon6DtDXCvSZ74ZoLOqiTE9UNFaXTW4Q+HbN X-Received: by 2002:a0c:c988:0:b0:68c:aa95:bbe7 with SMTP id b8-20020a0cc988000000b0068caa95bbe7mr1444771qvk.11.1707489496726; Fri, 09 Feb 2024 06:38:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707489496; cv=pass; d=google.com; s=arc-20160816; b=Afkssl500hWdqaeQeALLlC9P9NmcpxmG+sYqqbyrgOW2Kb8bQC20n/GO3TEHxetIeZ AfTodeLi8XwPSd8OpHTQYRwquED/1vHk+yeky8h5T2RbY8pmPfNTuZl4IyNP7CiKXGio ewpKtcZnAUan0d0b5Jo5vKsdzhrATenKF8KxPn7pI10oAwAsxJsyWHPPG+M70yFQqlLF y0V1RL2N+bMJpIH4efZOyCMD+X8iYJlMYf1fvvI9aKDAahQR1VCaTVh9tjIyLa/s5aaO fX2mxHPrz/CJWR9qORZ5bieCy92plNq5H7BVOe9jzzPWbWkkF5M0GRKqHj4f7se3Yfci c1sg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=aKzTDahlVj8xRK0vIE1wscgclUuMUEExT5K2RbizY8k=; fh=acsJT+/0JO8i/R2M3vNFQ3C5Ync7dgAF02rOEpTZ3dU=; b=pv85amHsWcM237uJCXwr7AqEOEJgQ8xWybBaYvmHgMbI6hKduFakcKTlCP1h++elfo JAqpEdEiav/5B0kdGCp/rno+as2F2HtCVXT1c92KqAOe2AiJHh0t1khKaNiXlfZsHKHD 8P25C/jQ1Xltu4pfkBiIdtSFXRXVtOCv+J43aHycv6qIanouu4v1lhwcPLPPZUCA6eKs Lu6nNu+82ZJiVPc2Hv05So4Ts7SzCvUlwcsz9O8eDu/XZr9fAZmi9yOLLd1ubfVZOnwZ aAJh8GALu/vWb/QvT12EJd3d4f07RP9GD6X7ZlFb4+HU2aSBvnGyKL+9lAK0KeUt2WCe l8Jw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VKE8eD3s; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-59477-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59477-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCU7ElFlKQY/8uHnDX9n7rKsDbkyJeYQ5ca6sr3pqDAxfxsfj8IzEl4qZspkpptod2Jj44ULL4v112ZFauiOtbogDEE+Qw== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id jp11-20020ad45f8b000000b0068c4ee6bb81si2032343qvb.61.2024.02.09.06.38.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 06:38:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-59477-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VKE8eD3s; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-59477-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59477-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 7A2691C22476 for ; Fri, 9 Feb 2024 14:38:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5E20A12836B; Fri, 9 Feb 2024 14:32:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="VKE8eD3s" 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 A74B974E36; Fri, 9 Feb 2024 14:32:30 +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=1707489150; cv=none; b=YdMbO748tFRnjNw/B24OHj4mZVuVIaSwpOldteXyYIUgyfbAeq78otewa5ZRe3DR2A9MonssaN1yKjhWk5gUn6jYbSO07vIUOY14nArgSAwHVleePDvIVG6Do3xZeHUXfV3hpaZ2vu7APXv5KwmLpMdSYz9UrNfnns7wOpCSd6M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707489150; c=relaxed/simple; bh=SNdpuBCpO0JSkOWXvK3leOkPlkJ8pkETSJ0EjQBtI1E=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ivul2Iq+nuXgmCDC7LcQVCicC+f2hDT8mSfAjxYHoILu7bhIbKgDHgE/g4m1VambjG/56wucAm5T+G9dXShZk1etDHs1lq1l86v84VKCMryClKip53NQT+qoMm9KFMIyfSgqPGoaU2KvQe3IjijlbGdWgqBJIBx4RZHFFOjj1cY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=VKE8eD3s; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4CD0BC43390; Fri, 9 Feb 2024 14:32:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707489150; bh=SNdpuBCpO0JSkOWXvK3leOkPlkJ8pkETSJ0EjQBtI1E=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=VKE8eD3sZWW5fEQtWPkCRBNkQo3ehVIXsOA9fELaVSi3m9F+Vd0l32uyrCJX7/rkP Mod0j110Xyn45qDVbqHYvHZZ+2Q13WAbCjHuubA1INaigCrg+lNEzxm59Q174XvRqn Ot1IkZcWh1jHJaH2i2jaWhn3wi3Lrt6+C313F11LHm6Bz+O0jST3KdcV05uivd6LZ1 vGg0REiPgMH/tigU2ahFd/9XG8Ib4pMGtMVPIrPr++s09K4zvF7dh5wpayHnFPXLn5 AurgQWPdsp73phvU2MRxKY4oZ5a2eZvmV4T3/QkYw/LVwCyeb/O/eH/Id+gfxOmL3Y 3mubJ3UyNBKUg== From: Mark Brown Date: Fri, 09 Feb 2024 14:30:03 +0000 Subject: [PATCH 1/2] selftests/mm: Log skipped compaction test as a skip Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240209-kselftest-mm-cleanup-v1-1-a3c0386496b5@kernel.org> References: <20240209-kselftest-mm-cleanup-v1-0-a3c0386496b5@kernel.org> In-Reply-To: <20240209-kselftest-mm-cleanup-v1-0-a3c0386496b5@kernel.org> To: Andrew Morton , Shuah Khan Cc: Muhammad Usama Anjum , Ryan Roberts , linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Brown X-Mailer: b4 0.13-dev-0438c X-Developer-Signature: v=1; a=openpgp-sha256; l=940; i=broonie@kernel.org; h=from:subject:message-id; bh=SNdpuBCpO0JSkOWXvK3leOkPlkJ8pkETSJ0EjQBtI1E=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBlxjd2aWt1MZeqGP+Sjwd45kcKirLj+wtx0YjNP /5BRSewS8+JATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZcY3dgAKCRAk1otyXVSH 0Lr4B/4mqYsi2Lo6QA241MmfSg0cwBXmgg2LOHFVMA62X1zAB/NMIQYNAhSVIFZTrGaZg1+/KX5 u7pVXzG8Y5C2XmrXHeMCoeuUAkWeaVV+tojvjmG4WUTO+cWJuqPJi7K4V5HP+p7i8YcPyqp1sUB rWkO4mJC6DQ9QVk6Oho2B1IGG9BBEYNwxEJqsUzB4/6VAenIJj/unbUI/thLu8zUFCTFQqRMjjB zXDCW0PlErz9/y7xG/p3G3CNYRekFr+mMLtYNfIposkiQ8NtFiUeE2HCaOXMYwyrhDM0AcAwjGo w2LwNXEUk4eEeARHxe3VeOud4S6J5gVREjwhJdtSPy93sbMl X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790432506717484406 X-GMAIL-MSGID: 1790432506717484406 When the compaction test is run it checks to make sure that prerequistives the test requires are available and skips the tests if not. When this happens we log the test as a pass rather than a skip, log as a skip so that the distinction is clear and automation can see unexpected skips. Signed-off-by: Mark Brown --- tools/testing/selftests/mm/compaction_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/mm/compaction_test.c b/tools/testing/selftests/mm/compaction_test.c index 656afba02dbc..30150929c8c5 100644 --- a/tools/testing/selftests/mm/compaction_test.c +++ b/tools/testing/selftests/mm/compaction_test.c @@ -174,7 +174,7 @@ int main(int argc, char **argv) ksft_print_header(); if (prereq() || geteuid()) - return ksft_exit_pass(); + return ksft_exit_skip("Prerequisites unsatisfied\n"); ksft_set_plan(1); From patchwork Fri Feb 9 14:30:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 198925 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp896519dyd; Fri, 9 Feb 2024 06:38:31 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUt638cyczj4SqXxX+4SQhHrAA2YXAvLn6tgf/AfTfdeFcGm2urNQGe2EaoDvwGo+hddkR/ytAbP9Dh1NBiiS6PcPqL2g== X-Google-Smtp-Source: AGHT+IFQrXTAc3XPpYBvFuT1pwEAuQD08og9ZIfCD9RQ+mc4jTkuAE4MoSRHcApOXlgcaA+GsqWb X-Received: by 2002:a05:6102:4413:b0:46d:5ecf:bc2c with SMTP id df19-20020a056102441300b0046d5ecfbc2cmr2333862vsb.3.1707489511403; Fri, 09 Feb 2024 06:38:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707489511; cv=pass; d=google.com; s=arc-20160816; b=mI/n13vy6TAUL4NzMiL2nTMa/xF6I3fiIG0x25bSzZEe0J+c1a+LsQabfcgvkY09gj W5x7M4Nk2T1muig8Svmbyc0TqDl/lPg+vLMK6bknI6HsQRkFsJv7EIY1sna0yBuUNP23 m+FzXtGp1HkAnh/6EzMxriKLHkDk1NuA+jKVG4kXvafy1genF3IBiNI5hNEUVSOwT33x kGMRt9UoP7+Z7gIAseE00w+l4PdImc430H1TUV7htS5PYSIwJrS/aHDl+dwCZWg1RljU j/X92CEq00IS/Mb2FnrGsJyfpr9JjslwvRcI24zi7gAoNL3mac1xKUErk06yfISsLb8u sl8w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=VpdtrfYwERXZyrF0lVFzXyZyYmGof7PY9FJH8B/V6S0=; fh=j3P9zGfnjefkXGxNddILc+dSm8gN9Xkm/le6kFwId7M=; b=FZK7h3W0qYBzCngz/a9PuBJUHecO8+GCaz9oV2Ptcm/Z7FaHxGztJOuBy/obXNQTcw DGZ32fAVjzKz9R/E2OFeGCLxfjudwLejl2rSB7YPm4Ggipf9/zWiQu7QWCFzvM51Mv6I oCStmWdjFsm901hOLMMMIWvAUF5kn0iLaEP6zsQrATiKwPv1cebM331HfUk3sH7MLR0X W8mt1C6zWT+o1uxqf+cPgpsjJH7nDfd9HhS0tXVYeHrHsQ64/M+GuEvwhxvvniGdulwr N9/jhrrDSFn+lSMfeb834QNB+duRBPCL44q+eNlNYr7tBG56P2dtnSEiYAK2U79+1Ibz W3SA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Py2oq7OI; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-59478-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59478-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCUKkxfzDLQHlB+K9ujR70xIhfg30jLUPrp+9g1Xe6B4VFXFhW9S2J4pSX785Ak08PWyNC7dAhVmjmNn6Kb2jL8QWXOlHw== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id b13-20020a0561023a0d00b0046c9eb5c7fasi262726vsu.680.2024.02.09.06.38.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 06:38:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-59478-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Py2oq7OI; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-59478-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59478-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 22A031C2210C for ; Fri, 9 Feb 2024 14:38:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 60ECC12837F; Fri, 9 Feb 2024 14:32:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Py2oq7OI" 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 59A17128372; Fri, 9 Feb 2024 14:32:34 +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=1707489154; cv=none; b=dRDooECvdFxQ8OK6i5iNWwyy3Eyau22f6aEJmPEJJu6am51aEVMgbPQBpu6gAP9s90EXO5KXyAzP7/KihPKQAr9iSypA2avXftA3TvdXZP77ZyySvnFUFjC41pGMp/dsifEpoAjnMsCgL1oXa8OxToCcxT6tn0RgNeVRvP90cu0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707489154; c=relaxed/simple; bh=n2TkytHIU4mJGTYx0ffPU1nCUw4lDwT3it9P2hgZMPQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=h0oiLhkHQM4OpTWtFywK8FmuR5LnOHNLsdF/YabXnSurqU5TPutCaKJMz3ni6WkxgOEDgqgKiJlsbwRSZ4Cffe3m7GJPBhIKAue+uyOnf7O1rctcA0Je/5soL46Gy6JBXV7g8sU1Vya23p3r03B4AiV3MPku3pIWVvhULRcT7y4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Py2oq7OI; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id CBEFAC433C7; Fri, 9 Feb 2024 14:32:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707489153; bh=n2TkytHIU4mJGTYx0ffPU1nCUw4lDwT3it9P2hgZMPQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Py2oq7OIoqGE1rDSbcY4ohm7stPtta09azzXhVmXoVzbO/0KaU7eC/gGaa5B2uJya ghfwSgvu1WyV3AssZpBArKxQ+NDKA/FkPwQvRLA33obpvD//AicUslTMbDNKPdwq/7 3pSxLNPShKyL2QxN8mYrPjn3R1lPMGA5WQtFU3k5y3hsBmtb/zWUPtAlYtmo7OwXaw JqG6H1X3af1LE34qRQrwvFYTyzxlZPAvFngqjXCuvVBtzSAF8Hm7Fa1f9h78yRmHj+ QXZM6J/xZVntBQ2Sj2l4MtSYTOFd9Elk7ZC5ZpculubiLP4Pl0A5AeXzXhy12MtCNY ZSO7PdsEOP+oA== From: Mark Brown Date: Fri, 09 Feb 2024 14:30:04 +0000 Subject: [PATCH 2/2] selftests/mm: Log a consistent test name for check_compaction Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240209-kselftest-mm-cleanup-v1-2-a3c0386496b5@kernel.org> References: <20240209-kselftest-mm-cleanup-v1-0-a3c0386496b5@kernel.org> In-Reply-To: <20240209-kselftest-mm-cleanup-v1-0-a3c0386496b5@kernel.org> To: Andrew Morton , Shuah Khan Cc: Muhammad Usama Anjum , Ryan Roberts , linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Brown X-Mailer: b4 0.13-dev-0438c X-Developer-Signature: v=1; a=openpgp-sha256; l=4141; i=broonie@kernel.org; h=from:subject:message-id; bh=n2TkytHIU4mJGTYx0ffPU1nCUw4lDwT3it9P2hgZMPQ=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBlxjd2eHrNdRwA/quROZ5aC1w1CkozU3y7OQRiA QsCxUdoBAWJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZcY3dgAKCRAk1otyXVSH 0DfUB/95u6qaCHLmx6YhkYZFy0UOyUJinhJLQsXirmJrQvvovBbB+oDXMGLdYsHMTg7Li2TMAgS s9uH/dAJDcoVtf0eEPwd+ztweDP26Q9sz6YzdJee6nPykOnyult75zLJnVo5KKEf0QWOyCwWMIy MZkfeqsEkVfnsKnsrHIhM/y0iLAN/4mBO6IyPqFgDGHsmebtxKqR1AikuvhFWufo5KGG+9IxCh3 N5qgNq9ClC9mYgUoSc1eWSiK3bXEYPNilDhvNBJL+6y8GxPQEnMrp0hfSkWUx/1Uzx1ClkjOvYU kpSQ9jSaMDI5CrpuDlvw5E3MutDaeJHBIC+Avx/EqSx5H9FA X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790432521740757618 X-GMAIL-MSGID: 1790432521740757618 Every test result report in the compaction test prints a distinct log messae, and some of the reports print a name that varies at runtime. This causes problems for automation since a lot of automation software uses the printed string as the name of the test, if the name varies from run to run and from pass to fail then the automation software can't identify that a test changed result or that the same tests are being run. Refactor the logging to use a consistent name when printing the result of the test, printing the existing messages as diagnostic information instead so they are still available for people trying to interpret the results. Signed-off-by: Mark Brown --- tools/testing/selftests/mm/compaction_test.c | 35 +++++++++++++++------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/tools/testing/selftests/mm/compaction_test.c b/tools/testing/selftests/mm/compaction_test.c index 30150929c8c5..533999b6c284 100644 --- a/tools/testing/selftests/mm/compaction_test.c +++ b/tools/testing/selftests/mm/compaction_test.c @@ -95,21 +95,22 @@ int check_compaction(unsigned long mem_free, unsigned int hugepage_size) fd = open("/proc/sys/vm/nr_hugepages", O_RDWR | O_NONBLOCK); if (fd < 0) { - ksft_test_result_fail("Failed to open /proc/sys/vm/nr_hugepages: %s\n", - strerror(errno)); - return -1; + ksft_print_msg("Failed to open /proc/sys/vm/nr_hugepages: %s\n", + strerror(errno)); + ret = -1; + goto out; } if (read(fd, initial_nr_hugepages, sizeof(initial_nr_hugepages)) <= 0) { - ksft_test_result_fail("Failed to read from /proc/sys/vm/nr_hugepages: %s\n", - strerror(errno)); + ksft_print_msg("Failed to read from /proc/sys/vm/nr_hugepages: %s\n", + strerror(errno)); goto close_fd; } /* Start with the initial condition of 0 huge pages*/ if (write(fd, "0", sizeof(char)) != sizeof(char)) { - ksft_test_result_fail("Failed to write 0 to /proc/sys/vm/nr_hugepages: %s\n", - strerror(errno)); + ksft_print_msg("Failed to write 0 to /proc/sys/vm/nr_hugepages: %s\n", + strerror(errno)); goto close_fd; } @@ -118,16 +119,16 @@ int check_compaction(unsigned long mem_free, unsigned int hugepage_size) /* Request a large number of huge pages. The Kernel will allocate as much as it can */ if (write(fd, "100000", (6*sizeof(char))) != (6*sizeof(char))) { - ksft_test_result_fail("Failed to write 100000 to /proc/sys/vm/nr_hugepages: %s\n", - strerror(errno)); + ksft_print_msg("Failed to write 100000 to /proc/sys/vm/nr_hugepages: %s\n", + strerror(errno)); goto close_fd; } lseek(fd, 0, SEEK_SET); if (read(fd, nr_hugepages, sizeof(nr_hugepages)) <= 0) { - ksft_test_result_fail("Failed to re-read from /proc/sys/vm/nr_hugepages: %s\n", - strerror(errno)); + ksft_print_msg("Failed to re-read from /proc/sys/vm/nr_hugepages: %s\n", + strerror(errno)); goto close_fd; } @@ -139,24 +140,26 @@ int check_compaction(unsigned long mem_free, unsigned int hugepage_size) if (write(fd, initial_nr_hugepages, strlen(initial_nr_hugepages)) != strlen(initial_nr_hugepages)) { - ksft_test_result_fail("Failed to write value to /proc/sys/vm/nr_hugepages: %s\n", - strerror(errno)); + ksft_print_msg("Failed to write value to /proc/sys/vm/nr_hugepages: %s\n", + strerror(errno)); goto close_fd; } + ksft_print_msg("Number of huge pages allocated = %d\n", + atoi(nr_hugepages)); + if (compaction_index > 3) { ksft_print_msg("ERROR: Less that 1/%d of memory is available\n" "as huge pages\n", compaction_index); - ksft_test_result_fail("No of huge pages allocated = %d\n", (atoi(nr_hugepages))); goto close_fd; } - ksft_test_result_pass("Memory compaction succeeded. No of huge pages allocated = %d\n", - (atoi(nr_hugepages))); ret = 0; close_fd: close(fd); + out: + ksft_test_result(ret == 0, "check_compaction\n"); return ret; }