Received: by 2002:a05:7412:2a8a:b0:fc:a2b0:25d7 with SMTP id u10csp553924rdh; Wed, 7 Feb 2024 12:33:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IFlcUZhAgJMqgumFvcfP4DNZi+PGQd7h1QDwX6I/s0UYHp6eWNjkDFPmWVxlQYHycgJopyX X-Received: by 2002:a50:ef04:0:b0:55f:495c:c4d0 with SMTP id m4-20020a50ef04000000b0055f495cc4d0mr5376439eds.19.1707338008353; Wed, 07 Feb 2024 12:33:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707338008; cv=pass; d=google.com; s=arc-20160816; b=hjXvKayJCZpywdwehEhNPKU0uL3CwPhT2kdEbzOhT9qINAvNNRklJuZnSIPV6rBnva gDeX+gAhNIl9wUbFQA5rRHC/3meXQnxAD8/bXN9H+/GGC82AGxmmiUHhKGwiO3Ye8ez9 AbVOWLQHFER2Uys2c+zDk4ZJmbcJTxAtjDTQWG4n271A+9WdotJqMFIX1CggyjdXoQXN 8cFUAE00Q73lAi/0FtjqB3YXPrAvjtd2GAUNpyaKBMQ6U+S3HypUzjFAsIuWODMSRymt Y2yfNS3cKll7iqSk1mzSoJTVrbomCqlSWZgjyIU93D7tMFr6JFG5RF5Hdj/AcdbUSQfS JA2w== 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=hOvzljU+wcB7YaIwzFDSc4lAKqxlqEeOsLjeAAJBtHI=; b=MfhAX3t17WoPZNc1oVoVaOPXP7E6G3uQgLzyDRDtRCDp1Vg1wF/CKPe/4dqAyWpQGN 1vPVpcR4yc/mt5NXFMxqOtk4hR6RmUg9XCl8Ni9B0zs0OIwG/MQ4z6Di1HtGC+lwNL/h MfJJuT0b+gVezvxswbCg9ikpMteBv6VVzDa0fOuJZq7ONeAsYM4H5V18NHqco+W6afMy YWQ+vNw1q/2seZcczI4TbceNM2UqhioU8f2NhUd0Cz/aMZqs/1blmLhrDA1zxFPNd6j7 Y7N6NisEwKtzZhzNFI+z/erJMP/tZTe33TBwWRAH9I0Fx9CPXdrKwoLqqFVgF1/g1k6b 8N8A==; 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-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57034-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCXVzB7inOWckrrtO6IsFGTSJaTjJJ4wgkBIGwmWhmhGHbJoH2fSisHI6Gk3yirBsRTB0flTimePkNOzpiF4dmeZEOmlfIPTrTakgPdpUQ== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id w25-20020a056402071900b00560c7914c6dsi85714edx.8.2024.02.07.12.33.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 12:33:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-57034-linux.lists.archive=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-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57034-linux.lists.archive=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 16CFA1F263DE for ; Wed, 7 Feb 2024 20:33:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 606BA12BF1D; Wed, 7 Feb 2024 20:31:48 +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 To: Andrew Morton Cc: SeongJae Park , Shuah Khan , 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: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- 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 -- 2.39.2