Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp1716593rwb; Fri, 28 Jul 2023 13:51:47 -0700 (PDT) X-Google-Smtp-Source: APBJJlH4AL6Qg4yCfIiL59jyoLmf3M1DQaMhvnDD+XF/zJmARdpJcdG1+2Y0aNBSZwZRZo4Twcfi X-Received: by 2002:a17:902:e741:b0:1b8:28f4:f259 with SMTP id p1-20020a170902e74100b001b828f4f259mr2729472plf.69.1690577507495; Fri, 28 Jul 2023 13:51:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690577507; cv=none; d=google.com; s=arc-20160816; b=y1H2fIGA6PrOOkiu/Hqm+RBqKK3lExqPZ8gLZeTMAEdMFVRchtWqhc6O/r1t4YFI0x cixwY3EZ7vXdt0exzb9dRL/NCiGOZ39SK2kSNcWcdFfDsc2wjFgGJHJ5W/HXbpTPW4du KOb3qhQdKHiAPtYvRP8YA3uxrBKZrkCPml/8C9Y3iH3tIVKatLoAx2bCGCHi+TfP3FpY Hz0A6skUz2xu1C6trvPZxy31gUnWDZkKQVBLYcqCDeF6MlVe7UAwhtMVOqaOzmwMWNIB LeQ9Dc9iAJCrY/GWPR5pBg8teAlF9Rf/vjB6BgyaHF9qymuGUwNlO5haLaEy5QD6QFfB 2vGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=fdzWJripOcM/GiUUkWYEsIFDFoKl4JpaJcuoDMjVXR8=; fh=hJpvtmYKYE0BOPLgUEDgOmGgYMxmJ79pj0vtAYRNCO4=; b=Q1odiuk5l6eEH2rJ17sBTr00d9EvxSmu06VYHq7MkppTJgsZ1TSgs99wLBxhtJPx6P t4TmqggQFu78Ynumoo589v51cyW7FW56y/+Jsx6d6J3xEevT7+y9f9+FTkzmVJlB3MTI Bz8QfzFqJ568RcA8aTHatHqf7x4/ojqVr72S1wmd5dknH+IP2S+nJzTfL8jkSyVK3tGL c5Bv5018VtuOSEgA/KLJlVwRsxlWLLnKbfySTeDm5VztqyNN0IWBxTGVY2VbVUmo6W8F dMZXTJwXTmnzoFsZ/oWpL47BoJZtjPbBkHWnAyS89hOmy2UgqiduH4NEPOIiOaza2WQl 54pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EECfAg33; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e2-20020a170902f10200b001b8a699d248si3372974plb.389.2023.07.28.13.51.34; Fri, 28 Jul 2023 13:51:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EECfAg33; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235347AbjG1Ufa (ORCPT + 99 others); Fri, 28 Jul 2023 16:35:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234725AbjG1UfE (ORCPT ); Fri, 28 Jul 2023 16:35:04 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67E3C449E; Fri, 28 Jul 2023 13:34:56 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E9F6362203; Fri, 28 Jul 2023 20:34:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D9C1FC433C7; Fri, 28 Jul 2023 20:34:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690576495; bh=MiKQzUem1fzoQJpnZETahxS4bhAx7AKf5JO3KUUBnl8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EECfAg33GG9SqqlWc+wrfsEImXkF6d6ycMp0inrJhToqWOJS5w+mziQY6qM1+VzOW yJAIbvcLzdspQMARFZjzy3AmCo6BqmfM3NWAvL0pkpWx7Yt6sRBXwoVkE5fusXqmub w5oLIoINT3xsuDNIolN8nJBcIRzbtGocgGMwepvXDhuG2FYfsA9T8hDMGzLkIvm22b FoyimEg865ElGcknEIKuhd5UsKo6vGoFtEtm1IFw/No6ZJIxShh4HmDL7Oe645TXVZ Lrkivg25m27CUtgTcmVblB1UPsAmTCbpO+ItKQ5IVNkZpQ7/X7HRuBHnbgzbf/ZajY NNTeUXrLf0J4w== 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: [RFC PATCH 10/13] selftests/damon/sysfs: test damon_target filter Date: Fri, 28 Jul 2023 20:34:41 +0000 Message-Id: <20230728203444.70703-11-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230728203444.70703-1-sj@kernel.org> References: <20230728203444.70703-1-sj@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Test existence of files and validity of input keyword for DAMON monitoring target based DAMOS filter on DAMON sysfs interface. Signed-off-by: SeongJae Park --- tools/testing/selftests/damon/sysfs.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/testing/selftests/damon/sysfs.sh b/tools/testing/selftests/damon/sysfs.sh index 5677cfd342fc..60a9a305aef0 100644 --- a/tools/testing/selftests/damon/sysfs.sh +++ b/tools/testing/selftests/damon/sysfs.sh @@ -104,11 +104,13 @@ test_filter() ensure_write_succ "$filter_dir/type" "anon" "valid input" ensure_write_succ "$filter_dir/type" "memcg" "valid input" ensure_write_succ "$filter_dir/type" "addr" "valid input" + ensure_write_succ "$filter_dir/type" "target" "valid input" ensure_write_fail "$filter_dir/type" "foo" "invalid input" ensure_file "$filter_dir/matching" "exist" "600" ensure_file "$filter_dir/memcg_path" "exist" "600" ensure_file "$filter_dir/addr_start" "exist" "600" ensure_file "$filter_dir/addr_end" "exist" "600" + ensure_file "$filter_dir/damon_target_idx" "exist" "600" } test_filters() -- 2.25.1