Message ID | 20240207203134.69976-9-sj@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-57034-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp2489358dyb; Wed, 7 Feb 2024 12:33:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IFETJpRuzsDQ/IS35/PWKFmeApPXPYW5d7WsZj2010kydIFvPNpip6pVwm3/a4hTIjzfrW1 X-Received: by 2002:aa7:dac5:0:b0:55f:f41a:2484 with SMTP id x5-20020aa7dac5000000b0055ff41a2484mr5356572eds.37.1707338031625; Wed, 07 Feb 2024 12:33:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707338031; cv=pass; d=google.com; s=arc-20160816; b=CwhOZ7/OP1P4iukcS5su6vEpOsw1sBoAH3W0JjSu5kK3GaKntG27gUuZlU8uI+k1hQ GntXrqI33pP2pcgGakplBCO6+dM1cvhvtqMup/yJvQo10HQUrAPq+pD4qrYDUVueygzP XDbX6lPRd9IGtkh7KeZrgeAXxEKjYvkX8lYEZag5TTg5CzszmUciNht6jL09p7O2yq1Y UMFGKLLIM4SayJHyKl0x+hK1E1X/s4/x0BcMbx/6mozWbb/IQwtYlk2zZ/v4DBLoL/1h hbuWrMtLw8G/8+mbCXeXrlrI0d19USJg3SKcWH0dQzGCJddHtIPMu9thY5saxu9xDZlb gQUQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=fX7x7KF5C9VADl9D4i1WzsxN5l8ADYMGFpSB6bu2YWE=; fh=TU7kRMdBYG3g9CXP4mtOpGTGILiit7zafzz1lCFGWZU=; b=f+JcSO3d2Jg7OkagP/PmMKwq4p51GDqvxdLeWiI+NOJzlh6jScm5xu/BRBo2eGY0qC vTmhmuOScdYMoqXAqSt6O3Nn40xTCQku2itCkJUcw+GCel0ayeF+X1/LVhIKu1wOJmCF fDG3p7l6ouahmaI59nAJtn/RlRy/l88sCIQZwYv6OWWTlcO4au4SJUHliX+rPppM+6ld EqCpLlYxdryxhHavP2Jh6a5sQY/Dh5/oy4ikFRhcvSkOGAsusXAI5Qh0vRuZ1bhJxq2B dGlr5vyrU9Gj3DF/lCWMLwDA7Oy56WAdzmLG9nvkCmASbKTQc3ztvyFm6FNStOB153xx Iziw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bZjKuePx; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-57034-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57034-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCXQ9ywR5046xSbJi3xooUbKlKa/wetxApFZXCFvM+muQv0nDVFe9VzvFAQAVTPTdPVccUKaIFEFRCaYmb5udEIL1Sid4A== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id c6-20020a50f606000000b00560a88b3908si77143edn.94.2024.02.07.12.33.51 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 12:33:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-57034-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bZjKuePx; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-57034-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57034-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 3104B1F2609D for <ouuuleilei@gmail.com>; Wed, 7 Feb 2024 20:33:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3F6FB12A15F; Wed, 7 Feb 2024 20:31:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="bZjKuePx" 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 7F23512B17F; Wed, 7 Feb 2024 20:31:47 +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=1707337907; cv=none; b=Ld9jZNUPmjqGaUia2x5O3i7BSZLejcelEe9MRHOibqQVs0VtZgQROFBSZxV9g9BmEjQFar9DQNXqUCWQF4zO0v4okCMOHHyz8IJlMeg0DuYO+xPIvoonZXW4VhXpITWodXkSuRlW7Pipq2qhdo5SVw94iREazeEfTTR2YCm83uM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707337907; c=relaxed/simple; bh=bo48Sw4QueorxjSh+Ck9B6Mrnc7pi7WnA/Re94O6ZTo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=UkGcCbrRz3Bmwg9aO8HjpxCS5sKst6esVmfucd2uAw28n3x1loMo05ivyXZzxat9uCOAPgm3W1Ja6aY66E9INT6FMP/3MXBzZ54uUQZPIE9OmVDAsjpF5e80ChL0I1nmop6eBjPnyaby7X2yLGCzReWu8pAXxBCQ1GLrkVNaWIg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=bZjKuePx; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7BA0CC43142; Wed, 7 Feb 2024 20:31:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707337907; bh=bo48Sw4QueorxjSh+Ck9B6Mrnc7pi7WnA/Re94O6ZTo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bZjKuePxNwzjVi/Qv2DXVeStIOUrZJHJYuqVTzb+TgaleSHCdDc57bdrDp2DxAX3q tRduOaVNfL1p6H56MRwykS5lAAwln08xpqJTJn8U1LGaVj6v8Db2XM9nwyrpve4Yu8 zMqsG+ifH1Z5Zo9j7NpyGkqJBhe1nZv2ZrGOSUQxJrqtNZYdBHNOIoDC4yEUOrdBDU TWkYBjx1+scE9tW43zJLFEApIyP2qJQRoBwtAzZMKV3eaqJHrkrFio8N8hlKJTpB4Y 2PAJKPUeIiNECiNtD0y1VJ5z3hBfdLm+eqHH24vbuI+smXyAFJaXUuwPzkLoORW1rb vBYeGFwVYMdZg== From: SeongJae Park <sj@kernel.org> To: Andrew Morton <akpm@linux-foundation.org> Cc: SeongJae Park <sj@kernel.org>, Shuah Khan <shuah@kernel.org>, damon@lists.linux.dev, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 8/8] selftests/damon/_chk_dependency: get debugfs mount point from /proc/mounts Date: Wed, 7 Feb 2024 12:31:34 -0800 Message-Id: <20240207203134.69976-9-sj@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240207203134.69976-1-sj@kernel.org> References: <20240207203134.69976-1-sj@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790273683602461113 X-GMAIL-MSGID: 1790273683602461113 |
Series |
selftests/damon: add more tests for core functionalities and corner cases
|
|
Commit Message
SeongJae Park
Feb. 7, 2024, 8:31 p.m. UTC
DAMON debugfs selftests dependency checker assumes debugfs would be
mounted at /sys/kernel/debug. That would be ok for many cases, but some
systems might mounted the file system on some different places. Parse
the real mount point using /proc/mounts file.
Signed-off-by: SeongJae Park <sj@kernel.org>
---
tools/testing/selftests/damon/_chk_dependency.sh | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/damon/_chk_dependency.sh b/tools/testing/selftests/damon/_chk_dependency.sh index 350f8c2b071d..dda3a87dc00a 100644 --- a/tools/testing/selftests/damon/_chk_dependency.sh +++ b/tools/testing/selftests/damon/_chk_dependency.sh @@ -4,7 +4,14 @@ # Kselftest framework requirement - SKIP code is 4. ksft_skip=4 -DBGFS=/sys/kernel/debug/damon +DBGFS=$(grep debugfs /proc/mounts --max-count 1 | awk '{print $2}') +if [ "$DBGFS" = "" ] +then + echo "debugfs not mounted" + exit $ksft_skip +fi + +DBGFS+="/damon" if [ $EUID -ne 0 ]; then