From patchwork Tue Apr 26 20:38:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 12827958 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 9404DC433FE for ; Tue, 26 Apr 2022 20:39:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2FAFA6B007B; Tue, 26 Apr 2022 16:39:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2B9CB6B007E; Tue, 26 Apr 2022 16:39:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 122016B0080; Tue, 26 Apr 2022 16:39:00 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.25]) by kanga.kvack.org (Postfix) with ESMTP id 03ED96B007B for ; Tue, 26 Apr 2022 16:39:00 -0400 (EDT) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id CE286274E2 for ; Tue, 26 Apr 2022 20:38:59 +0000 (UTC) X-FDA: 79400194398.30.A3A826B Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf15.hostedemail.com (Postfix) with ESMTP id 8911DA0042 for ; Tue, 26 Apr 2022 20:38:54 +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 F1995B8215C; Tue, 26 Apr 2022 20:38:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 61090C385B0; Tue, 26 Apr 2022 20:38:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651005534; bh=m1JQep2b3SfKr/7CLSAk47zNdHFQtwIgsoJpy0lNAxA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uTodtTo6ikP4OlRCyuSvS3rYtbIvHfD5TYO6ziMIaZ2XfUP/Icb71yug7SCjb/P5s XxIvu3pqLwHIEUZrWK9GNGeYmgmqsPegkgyfCJhEfkkU5QhJl2QWnUp+nGRAOosRQR SPoYDrFwEyV73nFHKcWZ/mPOwqrMPJCGUi5zDjGfKnUaMRLaXXj9dASP9VxGS1x5UG gJsaryztCRzWlWQcg+I9kGv/KWCKFVavsRYELr/ECIQj0a00ovvmZTb2UMlbmaHowS Nw3QywFEE8NWZ4xKBd+5Ce+9YjhmvfpUMbTRe/CcwViLCCeF3mPTAALXD+d2rWjrWq Xc7u3KtYAicJQ== From: sj@kernel.org To: akpm@linux-foundation.org Cc: linux-damon@amazon.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, SeongJae Park Subject: [PATCH 3/4] selftets/damon/sysfs: test existence and permission of avail_operations Date: Tue, 26 Apr 2022 20:38:42 +0000 Message-Id: <20220426203843.45238-4-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220426203843.45238-1-sj@kernel.org> References: <20220426203843.45238-1-sj@kernel.org> MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 8911DA0042 X-Stat-Signature: et349izttpdwmcqmyst7r98gznh9bxoc Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=uTodtTo6; spf=pass (imf15.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: 1651005534-865031 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 This commit adds a selftest test case for ensuring the existence and the permission (read-only) of the 'avail_oprations' DAMON sysfs file. Signed-off-by: SeongJae Park --- tools/testing/selftests/damon/sysfs.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/damon/sysfs.sh b/tools/testing/selftests/damon/sysfs.sh index 2e3ae77cb6db..89592c64462f 100644 --- a/tools/testing/selftests/damon/sysfs.sh +++ b/tools/testing/selftests/damon/sysfs.sh @@ -231,6 +231,7 @@ test_context() { context_dir=$1 ensure_dir "$context_dir" "exist" + ensure_file "$context_dir/avail_operations" "exit" 400 ensure_file "$context_dir/operations" "exist" 600 test_monitoring_attrs "$context_dir/monitoring_attrs" test_targets "$context_dir/targets"