From patchwork Fri Jul 28 20:34:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 127874 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:918b:0:b0:3e4:2afc:c1 with SMTP id s11csp698848vqg; Fri, 28 Jul 2023 14:22:40 -0700 (PDT) X-Google-Smtp-Source: APBJJlHQGTYWKQdMX3esvgJ1M+pGPccw69ZAxnWjRQ7zyYkfG99XMplsWErTC2v1qtI6YOal6/2A X-Received: by 2002:a17:907:a0c6:b0:98e:2334:af12 with SMTP id hw6-20020a170907a0c600b0098e2334af12mr360352ejc.45.1690579360133; Fri, 28 Jul 2023 14:22:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690579360; cv=none; d=google.com; s=arc-20160816; b=xlBhSKA1vCwxbdHkJV/w/CbXrh0qpQtDfNWRfrfMY0ZVux/kN1SGZGPOcpZfrUL3Uh UPVfbcY+gOUwGbU8ynLbAeOJC6RXTFo2XCqgeoLS/xf/qCX2DCHlw8TEiO3LtwQZkc7U 4UV2P3t4GZRiGlySx8UyrKYGNOZ+DM1tlB8/g3eZXgb/6uwE7MCdtCyQJ63iazMwrphq cpSo7Kn94CApyGhapboEGyyEnl87P2ZyuYzvGxv0fGd1izKdOVwT2w1sDRRgn5xdxuVg 9vrhur9kB/cofdttqXvrHtHONAlMnk9OuQDqe4YAaYEjuNmRVePmbt4C+B4/DsvOAZ1j skkA== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y22-20020a170906071600b0099b7a166716si3204010ejb.245.2023.07.28.14.22.16; Fri, 28 Jul 2023 14:22:40 -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 S233254AbjG1Ufb (ORCPT + 99 others); Fri, 28 Jul 2023 16:35:31 -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 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772700943137350601 X-GMAIL-MSGID: 1772700943137350601 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()