From patchwork Fri Jul 28 20:34:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13332651 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 425CEC00528 for ; Fri, 28 Jul 2023 20:34:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EFD648D0006; Fri, 28 Jul 2023 16:34:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E88DF6B0075; Fri, 28 Jul 2023 16:34:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C636E8D0006; Fri, 28 Jul 2023 16:34:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 9B6236B0074 for ; Fri, 28 Jul 2023 16:34:54 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 62CCFB1F22 for ; Fri, 28 Jul 2023 20:34:54 +0000 (UTC) X-FDA: 81062174508.10.755C8AB Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf19.hostedemail.com (Postfix) with ESMTP id BAC2F1A0008 for ; Fri, 28 Jul 2023 20:34:52 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=kZVzJF7D; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf19.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1690576492; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=RQJieNk/pr3XHQEgPwJ68VYP9y4g7GJ/7AtQ8sbJiBc=; b=qRZED9C3OlPmBxnLi16SpEJePNZxxLa+sugxfq5RsqeJdf4IlA555Ib1vxfhlyFxCPoKqC J/1hoJEDG5tmlOtEYRpS94iWMVoEo/hGqKfLJ7JH8TE/m+gJqumjhWIp83GTqcL5vZBQBL fxKHroOpldjfCARwZ06lP5yI+8wf1Qs= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=kZVzJF7D; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf19.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1690576492; a=rsa-sha256; cv=none; b=8WcWfoM+mIT9tpu3XGBUpTtVfASkn5cFIesaOHR/Xc0Tv/lPqKwgPpba67hzeQuxa/qWwq 5hbrq8Xb7qfjR1JkzfW13qq0Q+0x3DKAMG2JkgGI3yhdqJh7zjuXmI6ovDRJnIfnU4/hiZ CLeFmbMsI26yEfap/+qvc7/OrTDgUr0= 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 DB4C06220A; 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 X-Rspamd-Queue-Id: BAC2F1A0008 X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: 3peed8zqpsompq41wtwebwh4xdihpkk9 X-HE-Tag: 1690576492-307982 X-HE-Meta: U2FsdGVkX1/IhJ834gJvuG2VCW4w17K8rKU505ddNTJbXRlVXuunGbd6E4gpTJFvHZNPsOTLfn0MmkhGM7499U6uRID4ZrdxV095P01Gt0jXqImll6pjQs0afdDX0lNspL9xwVVntlg191441Ne4bTKuTwaAPsMN3XKxRhqMU1OcDmUdo8xwHutvHXpZzmzq/WbU/7wcPnzReH0yLmP/ZeCAPwc1l3MGde02Fl2l5Fj/FyyI8d9jtLFmTupHjnY1v5enC/ZMzZXp/K6Ft7ESusmKco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== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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()