From patchwork Wed Dec 1 15:04:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 12650153 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 8A02EC433F5 for ; Wed, 1 Dec 2021 15:10:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5F4E76B0082; Wed, 1 Dec 2021 10:07:28 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 57A646B0083; Wed, 1 Dec 2021 10:07:28 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 41C226B0085; Wed, 1 Dec 2021 10:07:28 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0073.hostedemail.com [216.40.44.73]) by kanga.kvack.org (Postfix) with ESMTP id 2A96F6B0082 for ; Wed, 1 Dec 2021 10:07:28 -0500 (EST) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id DBBCE8249980 for ; Wed, 1 Dec 2021 15:07:17 +0000 (UTC) X-FDA: 78869553714.06.B446AE0 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf26.hostedemail.com (Postfix) with ESMTP id E5B7120275F0 for ; Wed, 1 Dec 2021 15:05:05 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 1024EB8200F; Wed, 1 Dec 2021 15:05:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0D460C53FCC; Wed, 1 Dec 2021 15:05:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638371104; bh=YjXMqJsAM3rfUd7mH+zkWhp7VeCDe+o7nOiWHutAaY8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RiNuqg7NkzJI7j6wUZfGzHMLxdJiRLVTfD6TuCgWXcYT+Yhz2ZmTchyuPuVwBIn0L ymL7lMQhBx93dJPVyzKOkO2rwIstfeXp3MFozilY1Ukex5IlXRoO05OLJKAXtFvSQ4 o+4FuxIiq3BZHsrk5q/LsC3qEFUIoI5p3ahoJ5PXGk2lRu/517QNSoSlPbTWcCXmym MG4FWogp/dJCpTzjymUs6ky/a0VJv/zPqJMb/8zogRzcB4UAkVvbSo98CcdSA5eXjo e2p/SqHr9xaHmEVOv1njjrlMj2dayI5XH/1aIpVytl5CgWHAhLgoR1NFkcUPRnBBO6 Zkq6/fj+AN7fg== From: SeongJae Park To: akpm@linux-foundation.org Cc: shuah@kernel.org, brendanhiggins@google.com, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, SeongJae Park Subject: [PATCH 07/11] selftests/damon: Skip test if DAMON is running Date: Wed, 1 Dec 2021 15:04:36 +0000 Message-Id: <20211201150440.1088-8-sj@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211201150440.1088-1-sj@kernel.org> References: <20211201150440.1088-1-sj@kernel.org> X-Stat-Signature: gka8cbnmte83r1damg11c7opbqwfduw8 X-Rspamd-Queue-Id: E5B7120275F0 X-Rspamd-Server: rspam07 Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=RiNuqg7N; spf=pass (imf26.hostedemail.com: domain of sj@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org X-HE-Tag: 1638371105-429716 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: Testing the DAMON debugfs files while DAMON is running makes no sense, as any write to the debugfs files will fails. This commit makes the test be skipped in the case. Signed-off-by: SeongJae Park --- tools/testing/selftests/damon/debugfs_attrs.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/testing/selftests/damon/debugfs_attrs.sh b/tools/testing/selftests/damon/debugfs_attrs.sh index 196b6640bf37..fc80380c59f0 100644 --- a/tools/testing/selftests/damon/debugfs_attrs.sh +++ b/tools/testing/selftests/damon/debugfs_attrs.sh @@ -44,6 +44,15 @@ test_content() { source ./_chk_dependency.sh +ksft_skip=4 + +damon_onoff="$DBGFS/monitor_on" +if [ $(cat "$damon_onoff") = "on" ] +then + echo "monitoring is on" + exit $ksft_skip +fi + # Test attrs file # ===============