From patchwork Tue Aug 27 03:03:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13778786 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 6C648C5472D for ; Tue, 27 Aug 2024 03:04:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 709586B008C; Mon, 26 Aug 2024 23:03:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6917D6B0092; Mon, 26 Aug 2024 23:03:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 50F356B0096; Mon, 26 Aug 2024 23:03:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 2E9076B008C for ; Mon, 26 Aug 2024 23:03:54 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id DE13F4159A for ; Tue, 27 Aug 2024 03:03:53 +0000 (UTC) X-FDA: 82496530746.13.CED7CD4 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf11.hostedemail.com (Postfix) with ESMTP id E5DF840010 for ; Tue, 27 Aug 2024 03:03:51 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=vN3BAgGR; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf11.hostedemail.com: domain of sj@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1724727813; a=rsa-sha256; cv=none; b=uCyDmsCQ9R98Rvz8LTFQZ3XWBPGhv9ogLoGLYzPjj3hHkmTgQ98URGliIoyX2CdMzvKs/P nmsoyY1ZutrYPPPhwtlx8/MHxjG11gS8a7P/hd1naQUknwStah4Un2YXCnLrieYmvK0Ffr 6mJliO/qY3uoYkrKmpUO1Re8SUn/AYw= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=vN3BAgGR; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf11.hostedemail.com: domain of sj@kernel.org designates 145.40.73.55 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=1724727813; 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=36J8FLqUpPxXEuilmYNfWfIftQZaI2QetKrARcLQUf4=; b=vtOxr42qrP+C+nLPL5mu7k5OJU+h16qlgfs7ZjAs5ZR/ljfPl4lSzgkZcTVUcFRkbYe+PV 8Q6NSBgTjGhZLafQYR6T83qk8IdiNKIzeP+wucgY6IIRmboRr8oLbNic0jVVVRNwao4nqj wr4c/jTv5nEEkOTVfg7Ao80lUnENhxw= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 3E589CE1091; Tue, 27 Aug 2024 03:03:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C0F6EC8B7BC; Tue, 27 Aug 2024 03:03:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1724727828; bh=UIcEtsuF2oQygozWT/Xm716/UFpvZjJFMlGL0LY1swc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vN3BAgGR8uk5yCGefcqXr81gTPvEJR9+4CckN/1Z8Dp3mqKnHTsX+gXGeU+15of7x uVcEBYRigBYq0V2jRjyeXnYCQQdaVPNK7fASrI6H1Pzm2RAKD/hHDyVINmSGDLUoih WdNhBwHHF/Qkm2YtWPriYj17Wx2uxnwBy0YTbSI2kPpQCUhdTcwfeVfLxSZeP81ACZ W0wCD9/2S19ssGlhvehiXjNtT4nSE3HDm2REQZUoIBDttpxkv4f3gybyIXACLXucl+ kZXH1ki6pbeCeRA5TCSn7YgZQHHeNUQDRjhGuZX1mAHYic9iM2pVsf0DOKi38sbt+d yfdb4Yftbbstw== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , Brendan Higgins , David Gow , damon@lists.linux.dev, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, linux-kernel@vger.kernel.org Subject: [PATCH 4/9] mm/damon/core-test: test only vaddr case on ops registration test Date: Mon, 26 Aug 2024 20:03:31 -0700 Message-Id: <20240827030336.7930-5-sj@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240827030336.7930-1-sj@kernel.org> References: <20240827030336.7930-1-sj@kernel.org> MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Queue-Id: E5DF840010 X-Rspamd-Server: rspam01 X-Stat-Signature: iha3rbd54t6otubxetbbf1bsxp8c3imh X-HE-Tag: 1724727831-50248 X-HE-Meta: U2FsdGVkX1+7T2Pd5ubTP2fZ9s7oV31sVSranD2Kvk4v6iwGrRjhPzDS2X6fJi5EF8O/yIXyihizW0f48Xhoz8hQ75oFBtJdyW2W6mKplvNscLaH9eWEYmuoi5wffTObl8+6xj04d8mytVYWaojJepjS4CBT6Jw0ZntKeimFkvJkNAgmRKiw2NVKvt2D318gY5a/90v5NoDaBOiU01QEK+4OLiIv0EjZV7zKcOlAYiFUKS+QVU7LagaGLV+e0tw5WWLkmZbZH4u+T3Cb+7W9jZRUf0S9HHx96X3ZlaSR9GiBuGdjt7B7bgTqTG4wNHlgaRor/a585ArIrtWGWgr+E0CACaJX8N5TlituJ+nFduZE9fOhpqtLC+Wbfy7FQOcpkGJ6BilUrnXOzBdA93M6HDlqs6S0VgOrF9ph7MqG0+0zc+IzerTnrGhgh+gDyRBztn57AGZfbOPW0CDBj0SMmBbItByZAwkSPZ4bqFYzfiibtbWSPS9SeD57FntclXKBb6lCas5ScLOjZvBfeXy6E9McbU7pHBiAUaQa035IYDdIhMy0O3REEkcaerjqysGeE0Q0YivpswHLIYnZ4LqeiO+JDLgWsUfWcdP5Wl5YsKMH7Cqrte//4MO1PLG2Nwu8qVjtXC8d9rQY5j6zrExkoDjmG4bVeQHyo1zw5IOJSTC0iCtevqE8GgRYNyivfUVRt/8OARNBhMBxMWDZ7SuXqCXTNa3YrIFQPx0F3iu+EFl1ROGczQeYZTezY0BuuFE4I7n+2SpHgbqPxQ2dGquPSn9GdSDaBO1yyYDyNOSnPiDWAwIKtYfJpve+07ESuYQlxizENl1xlLMi3ER04H8Y2/5RHHr239Xf+wHEzxrpm4B5/PttM9YwIaGIihQW/RfVcUxnKWSctPVZoKvUZdTbcYFa9AzvG2/QHI7pjcP9feDFoZHVzB7o89YE6c1iYDX0AS1MpPTzHo11T7c25rD N/CHVC4G 5a+869cjKLO7tqZpAd6IVO2B+vnXXZbBf0uvxPjaHJAMqwx+bvM7EuG2obgQFoCeoekPzEIHtxhY/oGrSVybUaibOIeOXClcpUN1ZFAEq8rXZuQBIxm5eOO8yBkItH/ajNoE83sqip6CBrfw/4tPfq7Ghp7FBcRmsnpojDi6NdXskBHM9KhPi3l6Hcj+WMzKRJcVspCpSL+Ldgp0x4wSHxk6vWMsFAFvmqmqZ+ueWitU5AzOmzmHxLRdiXg== 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: List-Subscribe: List-Unsubscribe: DAMON ops registration kunit test tests both vaddr and paddr use cases in parts of the whole test cases. Basically testing only one ops use case is enough. Do the test with only vaddr use case. Signed-off-by: SeongJae Park --- mm/damon/core-test.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/mm/damon/core-test.h b/mm/damon/core-test.h index 0cee634f3544..ef36d586d6ee 100644 --- a/mm/damon/core-test.h +++ b/mm/damon/core-test.h @@ -246,16 +246,12 @@ static void damon_test_split_regions_of(struct kunit *test) static void damon_test_ops_registration(struct kunit *test) { struct damon_ctx *c = damon_new_ctx(); - struct damon_operations ops, bak; + struct damon_operations ops = {.id = DAMON_OPS_VADDR}, bak; - /* DAMON_OPS_{V,P}ADDR are registered on subsys_initcall */ + /* DAMON_OPS_VADDR is registered on subsys_initcall */ KUNIT_EXPECT_EQ(test, damon_select_ops(c, DAMON_OPS_VADDR), 0); - KUNIT_EXPECT_EQ(test, damon_select_ops(c, DAMON_OPS_PADDR), 0); /* Double-registration is prohibited */ - ops.id = DAMON_OPS_VADDR; - KUNIT_EXPECT_EQ(test, damon_register_ops(&ops), -EINVAL); - ops.id = DAMON_OPS_PADDR; KUNIT_EXPECT_EQ(test, damon_register_ops(&ops), -EINVAL); /* Unknown ops id cannot be registered */