Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp1744597rwb; Fri, 28 Jul 2023 14:23:18 -0700 (PDT) X-Google-Smtp-Source: APBJJlEk/MLtVoLSh4eo9E8iFZ/0uouf3UGVSDN1thoN8ExdauIEzuULksWlp3ufjJdgBTCMKaLD X-Received: by 2002:a17:906:5357:b0:99b:f3ef:f084 with SMTP id j23-20020a170906535700b0099bf3eff084mr465876ejo.66.1690579397787; Fri, 28 Jul 2023 14:23:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690579397; cv=none; d=google.com; s=arc-20160816; b=gffDfbwsOosANwkvkl5GEMP9vJ50/VaRT+fLqVzkovoPKPzfYbYQtVWbUmdHXL7dbY PVb3N50Z7adFdmO6SvvnbZihWos6k4rv12KJU1MzzkwmcLO0bJCxNBum2GzMWUoRSRFA OwcdcHoAjjoG6jhv4XT4ojwWRkmmZEv+dsXrmhX9qHEC1JzoNyC3fCR7riusTaz5B4bP 7/5dD25T3EJ7anzE/wirudkTC9jjyliSKYc5t3ejPQMqMYjjkWjKVn4oUuOE4WQ7yxST 3DjH5UqmoPXqffQGPJcYM3WMKgqrLyJIvI2/LHwoF+imA1HPAm3Yt4ZYBkogjfduwr3c wv0A== 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=RQJieNk/pr3XHQEgPwJ68VYP9y4g7GJ/7AtQ8sbJiBc=; fh=hJpvtmYKYE0BOPLgUEDgOmGgYMxmJ79pj0vtAYRNCO4=; b=G73jc/zNCx9mS21/ajQXEkVm112pF98oTVI1weFRco5zWYM4aYAlG2zWITw7d6wGZr Qa+eTgdl7UClSDgI3z+ixViYupxn3RBOjpOaCTXd+9AFZxJ+FGwW0JT8Kqx/cFG7EvyZ RGU3cFclv6HuDKlb84Pnr96+bWX38n3cp7qFkhOuJbQX0HVGl3WLsq2+fWKx/WYdTTwk fbchdkoyDOJSdvui2BS4FFsTwy+avC2OqIV1GsDrS0Uw4KffIcv9NZflYiUguvukw5EV hInbvyNvt50bTdL8HC+6PDMYjNaYThyslW/uxYEze66ep3ILjWpO7CDYSw0EKwINYMgl jIRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kZVzJF7D; 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 g16-20020a17090613d000b009930d9d6b4csi3085388ejc.888.2023.07.28.14.22.53; Fri, 28 Jul 2023 14:23:17 -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=kZVzJF7D; 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 S232503AbjG1UfO (ORCPT + 99 others); Fri, 28 Jul 2023 16:35:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233672AbjG1Ue6 (ORCPT ); Fri, 28 Jul 2023 16:34:58 -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 2818544B9; Fri, 28 Jul 2023 13:34:53 -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 D4BD1621FD; Fri, 28 Jul 2023 20:34:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C68D0C433C8; Fri, 28 Jul 2023 20:34:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690576491; bh=cjc8ooSUQ83tCK1u+lTmvslo5pngriB995qOBl2lfEU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kZVzJF7D3covRVxGV8qlNVSYryTJADsCE2nkG3JlMM6KW9d11TNHzemNIWTQimTJK ffO0M4jAfUNnDSYV4c9DRRIB0VliGAVfq2/WXiijhELaaucip42BKwqrIHBcjqIaJD bVnh67z2b8iM5uSNPfJCZ1KxJ5yeEkYjeM8YTtQ4idTBJQzHSnwyViTad4T/Ago0h4 h1HmW4PEjGdHDzBE+c0WSscxqojOd5yWq1PEFp9djhuFqImKaV0iUCkHaYqWM+1D5U LEC5LNT0heATO0ErxPQA1r1Qhcp8va2vn+6A5rWmwm3Muli5fwkwIJopgiP201Ruvx 5GI/wU1T9CLGg== 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 04/13] selftests/damon/sysfs: test address range damos filter Date: Fri, 28 Jul 2023 20:34:35 +0000 Message-Id: <20230728203444.70703-5-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 Add a selftest for checking existence of addr_{start,end} files under DAMOS filter directory, and 'addr' damos filter type input of DAMON sysfs interface. Signed-off-by: SeongJae Park --- tools/testing/selftests/damon/sysfs.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/testing/selftests/damon/sysfs.sh b/tools/testing/selftests/damon/sysfs.sh index 967e27267549..5677cfd342fc 100644 --- a/tools/testing/selftests/damon/sysfs.sh +++ b/tools/testing/selftests/damon/sysfs.sh @@ -103,9 +103,12 @@ test_filter() ensure_file "$filter_dir/type" "exist" "600" 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_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" } test_filters() -- 2.25.1