From patchwork Fri Dec 10 22:46:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12671283 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 597D9C433EF for ; Fri, 10 Dec 2021 22:53:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CBB116B0087; Fri, 10 Dec 2021 17:47:02 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C69D76B0088; Fri, 10 Dec 2021 17:47:02 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B31F56B0089; Fri, 10 Dec 2021 17:47:02 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0062.hostedemail.com [216.40.44.62]) by kanga.kvack.org (Postfix) with ESMTP id A4BE26B0087 for ; Fri, 10 Dec 2021 17:47:02 -0500 (EST) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 6C5B8181AEF3F for ; Fri, 10 Dec 2021 22:46:52 +0000 (UTC) X-FDA: 78903371064.08.957C202 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf17.hostedemail.com (Postfix) with ESMTP id 203C740004 for ; Fri, 10 Dec 2021 22:46:48 +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 sin.source.kernel.org (Postfix) with ESMTPS id 34716CE2AC8; Fri, 10 Dec 2021 22:46:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2BB20C341C8; Fri, 10 Dec 2021 22:46:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1639176407; bh=VLkLtXlpkYiZ81jh2+NSPYaD1/az52smLdLFAuiFZJc=; h=Date:From:To:Subject:In-Reply-To:From; b=qj1O84joWGN/dNKho65HWyaYtS0S1RVnmoxLNtGGvMkP35DsRTJKXMuF37SMrnAM5 92784A23Vk1uwa8qtwvt41P3n8gl3kfm/q7Qozy7DspvnkfMs06LaZnEW/1Eu37sYL DZ4xfoMBBBz4FiO49Qo5PiUW5N7dOfdV94zNIy+s= Date: Fri, 10 Dec 2021 14:46:46 -0800 From: Andrew Morton To: akpm@linux-foundation.org, brendanhiggins@google.com, linux-mm@kvack.org, mm-commits@vger.kernel.org, shuah@kernel.org, sj@kernel.org, torvalds@linux-foundation.org Subject: [patch 13/21] selftests/damon: skip test if DAMON is running Message-ID: <20211210224646.fzWaFcACO%akpm@linux-foundation.org> In-Reply-To: <20211210144539.663efee2c80d8450e6180230@linux-foundation.org> User-Agent: s-nail v14.8.16 X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 203C740004 X-Stat-Signature: tc5i46okr16qy8terf78f9czek7nyuu6 Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=qj1O84jo; spf=pass (imf17.hostedemail.com: domain of akpm@linux-foundation.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-HE-Tag: 1639176408-88296 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: From: SeongJae Park Subject: selftests/damon: skip test if DAMON is running Testing the DAMON debugfs files while DAMON is running makes no sense, as any write to the debugfs files will fail. This commit makes the test be skipped in this case. Link: https://lkml.kernel.org/r/20211201150440.1088-8-sj@kernel.org Signed-off-by: SeongJae Park Cc: Brendan Higgins Cc: Shuah Khan Signed-off-by: Andrew Morton --- tools/testing/selftests/damon/debugfs_attrs.sh | 9 +++++++++ 1 file changed, 9 insertions(+) --- a/tools/testing/selftests/damon/debugfs_attrs.sh~selftests-damon-skip-test-if-damon-is-running +++ a/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 # ===============