Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp1493316rwo; Wed, 2 Aug 2023 15:18:28 -0700 (PDT) X-Google-Smtp-Source: APBJJlF8dJ/ThX2mDgf4ZREpEeN7RK2TFPIcOH1aA0Vtrqlg5zzNnwfep7xymht7tPE69z1q3Pkn X-Received: by 2002:a17:906:3085:b0:99c:4cd:1a18 with SMTP id 5-20020a170906308500b0099c04cd1a18mr6465278ejv.38.1691014708311; Wed, 02 Aug 2023 15:18:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691014708; cv=none; d=google.com; s=arc-20160816; b=YiBJyNnhPoFg+DU3C+3NY3pLtZccfbYPgTA2tjnxjRTpj0k0w0qY4H7+acWrkUWwUZ h6Ai553jpl1i7BszfCQpt/bxDGzv3QzsrDhptSotFFEznuItOAvFtf3DMdgBSs+QMMRb Sj9tXmCvdvnA20Jv2Y37oxcHJGSuw8g04ue7ytx0+3yYzTOnGI6eRhEzYeN0N6cAMcX4 eSFIc5Sk1AwywFvWmTnvggl12ZU10wdhmlyo5vCjCZd+l0F55d+qurtcvqH2pG0zHZjN vYIKi5vFf1/xZErPZyFAfHI9swPU67It+8MKvJApec/NEMHgaSq9U74qpkYFQEMO1U14 5afA== 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=hY69pY7R7IUuuWCNZtUX880ddUMBlsC1zb3fwwODqRnfWKX0rIj0+NA7NFiBUMz6n4 xnncHQzjvDwMUkkrczMRVQsetLNWhtSvNPUMThI5j7ImmsWTj1PniPGC90hJ3E+LUO0T JL8HT9KXdbhbvaaagZQ4U9Ww9gqmnPzVPWqNsAPQK8Tbh5e6SqdtrtqU+S/P3HWeekpS 6pG08W3FCEN5RBxmDsMET0T3EXbSYq/L7raZnSG8povY9Wrvlp1kngFSdWW3MRz/sRxm 9GUHAFzariT3tpwMB9zu+6Ku8rpAIhorwDWHrsl3LlVD4NCxSjR07xTXqZtLrlTvYtj3 bM2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="ikb6ovw/"; 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 fi1-20020a170906da0100b00987383af65asi7186318ejb.582.2023.08.02.15.18.03; Wed, 02 Aug 2023 15:18:28 -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="ikb6ovw/"; 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 S233417AbjHBVna (ORCPT + 99 others); Wed, 2 Aug 2023 17:43:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231209AbjHBVnU (ORCPT ); Wed, 2 Aug 2023 17:43:20 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9F01198A; Wed, 2 Aug 2023 14:43:19 -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 47E3B61B38; Wed, 2 Aug 2023 21:43:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3A000C433CC; Wed, 2 Aug 2023 21:43:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691012598; bh=cjc8ooSUQ83tCK1u+lTmvslo5pngriB995qOBl2lfEU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ikb6ovw/+AobHS2orGwswuXn2tlkNHwauXcRV6Typ+Y049vivhXS52JNo31EJITXY emfTMVPVnHa84OqOMbZVTo5kbKeKGHOpjFsOIeWxAksOBD1KxT8ZuTuTDN9rHg/Wtg F6AsCQyf2TOaPUNj4vCWIaI9DFBrBCpREyoQkRdtVM0UMwWQZ0IvN7lTXtGoZETgG1 Zy9ankfs8/EVYFpEOb4r0JbOi6tvKYPa9H418hI6X4RnEuTQTALWYSvV2UiFkf7cm9 hWtnjYErjiGV3ODf3wRp8IeVQt7UDKHS7oVF7VZO8K+omnCY5RDlEJw9kWy79bTpag AZGMQFafNxOcQ== 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 04/13] selftests/damon/sysfs: test address range damos filter Date: Wed, 2 Aug 2023 21:43:03 +0000 Message-Id: <20230802214312.110532-5-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=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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