Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp1483019rwo; Wed, 2 Aug 2023 15:07:00 -0700 (PDT) X-Google-Smtp-Source: APBJJlEqGuxwnSHs96S6p476rrm74KNhOzI/fcrYHvEZrtKS26UshGFMdhGG2ccqtxDqUIhtFpJy X-Received: by 2002:a17:902:c402:b0:1b6:783d:9ba7 with SMTP id k2-20020a170902c40200b001b6783d9ba7mr22738919plk.27.1691014020006; Wed, 02 Aug 2023 15:07:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691014019; cv=none; d=google.com; s=arc-20160816; b=OkZt/OSPWRsWSLWHxT04NNfJLi1SHusRfO3sR7OeoZ0goftTDLfDYLgAGVxTYQNMOA GoJaQ8aS883cdLequZdXNQ4cc/1QNgP3cBRnPTqYqAF04jyqXDOGFhT3aj2ZIGC8GGKO Gt4CdxtAyjME2uAvK99cOuMcP25bGB1rTWGxZvv9ZbaPPp/dDO9+GwvmGEigZS6I91hR nunfxg8I03vy/n0sh9i+ynqKFv60h8OAwZdKZrawCctyfkz07alZOlO72hmcHfmx5l0f elqTRdd2XLlppAGDWDUZuoigjSZV05m56ZeY2V5+DsI6N6IXdGAiK7P5rpmdyV3hT3Hh nh8Q== 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=nLZ0qNK+bojbiKRCCDYD+tXWyWbGU5TcDTSeA6V43ffpMI8WCo6obFidMRJg2eDzAi osWd9DLdwD+YiR2rBPCUHPKiFIDe0UeS8JWkpFKjq8Om+SIeTclWdmc8CzL0BONvtyk0 Gm7R30izzQVQMk6tAcT04ibz30Z3zP+POVkv94DseoNRFjdthJD/aNjOA3A9mdukzaiI +RPhCiTsWsFE9OSCZqCv9SWesUaJXYCaG8WzyPEDkBe5c45NYGYVoEuRjzhh9vB5afIa Eu6J+OPwmH+MS9QY0QGhTynMYe1ndDsULGzPopmMkjcOjdBkkT8BkVuQHwtjLnmIKT8p 2dMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KNpNnySG; 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 l14-20020a170903120e00b001b7ea20dbf2si11791017plh.224.2023.08.02.15.06.31; Wed, 02 Aug 2023 15:06:59 -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=KNpNnySG; 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 S233594AbjHBVno (ORCPT + 99 others); Wed, 2 Aug 2023 17:43:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233242AbjHBVnY (ORCPT ); Wed, 2 Aug 2023 17:43:24 -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 530CFE7D; Wed, 2 Aug 2023 14:43:23 -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) server-digest SHA256) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3320061B3B; Wed, 2 Aug 2023 21:43:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1C740C433CB; Wed, 2 Aug 2023 21:43:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691012602; bh=MiKQzUem1fzoQJpnZETahxS4bhAx7AKf5JO3KUUBnl8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KNpNnySGcLwwD9KynrkvcNXQaBRN2V1X98Grk3mr3pGzY865PxRj0dR3+DzNO+I8w hHZqYL0RWX3o6cMHKlY52OMbqe/PwKTQf9K1he85PgX4Ig5eyxoKnhKINzRLDWc2qL c8AI/p7rQnIUnRc0f3gWXf8qhLlPWJgZWRQFlDUpg8b4HwYKp/bXNLjWHBMHceg1HF eQwQPwGIOaDkkp4rfC4gyN4uKtsW0FW1oIMg/ImKkJNj9cNfIImyaYUs2S3ofFaBqm wcAefhDChku+yGHFBeObxNq15C5S2UX6piTUqZRuEoBQWjgEL2GG8msiTo028SJJuP epEhbvqJedrjQ== 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: [PATCH 10/13] selftests/damon/sysfs: test damon_target filter Date: Wed, 2 Aug 2023 21:43:09 +0000 Message-Id: <20230802214312.110532-11-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230802214312.110532-1-sj@kernel.org> References: <20230802214312.110532-1-sj@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,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