From patchwork Wed Dec 1 15:04:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 12650147 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 8B998C433F5 for ; Wed, 1 Dec 2021 15:08:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CD1EA6B007D; Wed, 1 Dec 2021 10:07:01 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C58846B007E; Wed, 1 Dec 2021 10:07:01 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AF9946B0080; Wed, 1 Dec 2021 10:07:01 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0029.hostedemail.com [216.40.44.29]) by kanga.kvack.org (Postfix) with ESMTP id 978D86B007D for ; Wed, 1 Dec 2021 10:07:01 -0500 (EST) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 6275A886C5 for ; Wed, 1 Dec 2021 15:06:51 +0000 (UTC) X-FDA: 78869552622.28.6EFC235 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf12.hostedemail.com (Postfix) with ESMTP id EDF811001C30 for ; Wed, 1 Dec 2021 15:05:07 +0000 (UTC) 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 ams.source.kernel.org (Postfix) with ESMTPS id 626FFB81DF7; Wed, 1 Dec 2021 15:05:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8AAF0C53FCD; Wed, 1 Dec 2021 15:05:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638371106; bh=0vdcMyUQGuwcxJbQPs8RdnvesQ4Ampc8D6OYRBEjNxw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l9McXxE2OjcxknwERNHehKK7ECaWNllnE7932jLxeibsb31zhE65+Tl9aj+OXo+bv WPw3jvfYhvR9YFcE5dPmI773d7/FUihCflK2pBmVDyGXlksIqH0nuxUxMK2FPOf44W i35T0zWst3ZdBJh8sp18kjmPwt58qaw6pEBN/7+S80qNcS4ReKCM+rjQi6TRag08d7 /VR74cDuiM4JNkCaTGCrufgd3poEaboNw3bVNsBrhdJMYoIOVb7x//kwM+BbSQ/JAB z1nWF9xI6P4gYRNFHhTRAvYTxNFchr+2O9zyflzUltgwsRdIbQHqOCjoO+M1Acudnf WoOSX5zPF6olg== From: SeongJae Park To: akpm@linux-foundation.org Cc: shuah@kernel.org, brendanhiggins@google.com, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, SeongJae Park Subject: [PATCH 09/11] selftests/damon: Test wrong DAMOS condition ranges input Date: Wed, 1 Dec 2021 15:04:38 +0000 Message-Id: <20211201150440.1088-10-sj@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211201150440.1088-1-sj@kernel.org> References: <20211201150440.1088-1-sj@kernel.org> X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: EDF811001C30 X-Stat-Signature: 7sdy1sr1i3m8du7dzb5ikdtxuur53zni Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=l9McXxE2; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf12.hostedemail.com: domain of sj@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=sj@kernel.org X-HE-Tag: 1638371107-576644 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: A patch titled "mm/damon/schemes: add the validity judgment of thresholds"[1] makes DAMON debugfs interface to validate DAMON scheme inputs. This commit adds a test case for the validation logic in DAMON selftests. [1] https://lore.kernel.org/linux-mm/d78360e52158d786fcbf20bc62c96785742e76d3.1637239568.git.xhao@linux.alibaba.com/ Signed-off-by: SeongJae Park --- tools/testing/selftests/damon/debugfs_attrs.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/testing/selftests/damon/debugfs_attrs.sh b/tools/testing/selftests/damon/debugfs_attrs.sh index d0916373f310..1ef118617167 100644 --- a/tools/testing/selftests/damon/debugfs_attrs.sh +++ b/tools/testing/selftests/damon/debugfs_attrs.sh @@ -77,6 +77,8 @@ test_write_succ "$file" "1 2 3 4 5 6 4 0 0 0 1 2 3 1 100 3 2 1" \ test_write_fail "$file" "1 2 3 4 5 6 3 0 0 0 1 2 3 1 100 3 2 1" "$orig_content" "multi lines" test_write_succ "$file" "" "$orig_content" "disabling" +test_write_fail "$file" "2 1 2 1 10 1 3 10 1 1 1 1 1 1 1 1 2 3" \ + "$orig_content" "wrong condition ranges" echo "$orig_content" > "$file" # Test target_ids file