From patchwork Wed Aug 2 21:43:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 130204 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f41:0:b0:3e4:2afc:c1 with SMTP id v1csp784124vqx; Wed, 2 Aug 2023 16:10:55 -0700 (PDT) X-Google-Smtp-Source: APBJJlERzFSa+BSjRJyY76IKPCIo13fG/D7KSSuOhE/90gJNyrMxk01zo+aAuTSj5V0KpJab/TUx X-Received: by 2002:a05:6402:5111:b0:514:ab8b:ee78 with SMTP id m17-20020a056402511100b00514ab8bee78mr14039361edd.3.1691017855200; Wed, 02 Aug 2023 16:10:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691017855; cv=none; d=google.com; s=arc-20160816; b=DxJVk2ssenrAjdwjfMzBbM0WMKiJtqapxxw0QkSCi3KIKv2CVfypoe2IY/QsYnRu4w JhlTdRsMo5lwlZrjYSPMeITmZKjcidF4QFOyUw4FhskakCUYtic/OrJCdvtGrotpRJmY iPhgX/OdBi1IfusR3Io0LZLwJiG5QHk5zyDFbFGsktxmOCH1h2YuyhXh4CanQFNpQjlG 7uOZELpFYoexFBfhtl4mEZ5BxEUDuVBLOnJ3lJB9+JKZ1mw+jAQ2xuCm5VSA28mqbnDu ZWs2uT2abYAuahy1mNcle0DPWJ+e0kLafybT0oFUKkOMQHuo2npF5qvx2AyTVmVW6qaq rfTA== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s1-20020aa7c541000000b005222af11ff3si10804173edr.509.2023.08.02.16.10.31; Wed, 02 Aug 2023 16:10:55 -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 S233613AbjHBVno (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 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773160738564173867 X-GMAIL-MSGID: 1773160738564173867 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()