From patchwork Tue Nov 1 22:03:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13915 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp3233986wru; Tue, 1 Nov 2022 15:04:45 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6TzczHHOj1+1AwMTACE9IGfs4vjZLEStsCYNQIzvFaGVzzOrBp8yDte99wmkYY1OiBTrdE X-Received: by 2002:a17:903:32cf:b0:186:e114:be9c with SMTP id i15-20020a17090332cf00b00186e114be9cmr22041723plr.136.1667340284819; Tue, 01 Nov 2022 15:04:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667340284; cv=none; d=google.com; s=arc-20160816; b=i9oqhHNQ7SeO5wTJC69bK3xjKhgGH/PsE7P8HOjR9LQp8o3gUdScuV6ppujJv8W8fR LjbFI/A1EFFejLyGZQwFX6HfvjxU81ecXvyiCqOye/NpiBwwbq2Ol8l5RiQtvYYk8PoI Mylcit+ltcWNs3AQDLswdn3AWdI5aYvRTXt0MOzgQaVcnLmUGG7l9QK6+0ZBA+FfZ9Jo 5iLuE6EtPkgSPix1de1mqCzrUm5Wzb3YDpDWwhg9rBnOWDIwTTYf8fPdM43YPonu6zVL /tEH1MUcKcrQG5EWXYAICYnkQkS0Peh5wC/dmIJ07g/BJ+sGdQ+YmmDHlklrY2+pcSoV JQgg== 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=0mnNHQHnS5UMONrCQ+JY25XGOE4490loOGbbhlBwmLA=; b=vnCg98vufuzZchZMnEj9WoPUQrgiQHf+p5DUCG8YkRmuReKMiyEgWI3Db45XWZq4Oo NXJTHne5Bx/O/5ewiyn9OfFae4SFiUXAsK4G+ByOHp7x7f6Gv+g1nekXMEVjfp8ocGO1 Zo/uDCYVt5gz+j1CKF/8Ukpz7c8/2FrfGlUs1Lpm3S7qxnDu93RiY0UvqHj5alsWEXRF SKWxCv53Mg/YfEFTU2ATeANYEXkh6gTkmLzmTbudMVTKDvW0t+sGLoI5axIrYABsYjVg Mdy9soDgO8NxJp7mViFBAW1Iov9EAYMT4mjLgNB9Rz2hwpjlEoK5vWPdeXnaDKJmoqzi MMOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BB9iuPFm; 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 14-20020a63174e000000b0045a5d846af1si13586620pgx.134.2022.11.01.15.04.30; Tue, 01 Nov 2022 15:04:44 -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=BB9iuPFm; 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 S231249AbiKAWD7 (ORCPT + 99 others); Tue, 1 Nov 2022 18:03:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231149AbiKAWDj (ORCPT ); Tue, 1 Nov 2022 18:03:39 -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 E4BDE617A; Tue, 1 Nov 2022 15:03:37 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8241161733; Tue, 1 Nov 2022 22:03:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7192BC433B5; Tue, 1 Nov 2022 22:03:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667340216; bh=vHgDcIM2X6HC9Xa44Y3Kmnj3zbAk0A48a3qye0uZNww=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BB9iuPFmaCYxUJ2icGWtplwAv9fDjQQP8tssoMnF+QYSch4jkG2Gs9jcRHdDg0eLl UN8aSiWrnsriBYDwmlGxbAstIhanC5uEyC9Jlpqz+62z/zkh9J/rPvtRkVkQri7HTz vkQAMOPJG2EgQrODDLra5lazx51qMuIpWcddNcp2JSkKyg7YxGFaX6ZC+fU5aX61rP h6OeWNswACf+ieCA59Ivg5Jl6tF9P/qMwigIaQUxIlmwgrN5LNFsHwmCU8PibAHpaI lDTn7q6EgOXaDMN+LyyE4By4/ykc4vfJZ1mMCKzxY5Pf/etnSIXTU2t3JeollfAF/d JkLl+MMlB1/Mg== From: SeongJae Park To: Andrew Morton Cc: Shuah Khan , damon@lists.linux.dev, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, SeongJae Park Subject: [PATCH 6/8] tools/selftets/damon/sysfs: test tried_regions directory existence Date: Tue, 1 Nov 2022 22:03:26 +0000 Message-Id: <20221101220328.95765-7-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221101220328.95765-1-sj@kernel.org> References: <20221101220328.95765-1-sj@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-8.2 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 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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748333006188485305?= X-GMAIL-MSGID: =?utf-8?q?1748333006188485305?= Add a simple test case for ensuring tried_regions directory existence. Signed-off-by: SeongJae Park --- tools/testing/selftests/damon/sysfs.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/testing/selftests/damon/sysfs.sh b/tools/testing/selftests/damon/sysfs.sh index 89592c64462f..db4942383a50 100644 --- a/tools/testing/selftests/damon/sysfs.sh +++ b/tools/testing/selftests/damon/sysfs.sh @@ -80,6 +80,12 @@ test_range() ensure_file "$range_dir/max" "exist" 600 } +test_tried_regions() +{ + tried_regions_dir=$1 + ensure_dir "$tried_regions_dir" "exist" +} + test_stats() { stats_dir=$1 @@ -138,6 +144,7 @@ test_scheme() test_quotas "$scheme_dir/quotas" test_watermarks "$scheme_dir/watermarks" test_stats "$scheme_dir/stats" + test_tried_regions "$scheme_dir/tried_regions" } test_schemes()