From patchwork Tue Aug 27 03:03:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13778771 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 50FC2175AB; Tue, 27 Aug 2024 03:03:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724727827; cv=none; b=S8VpXKHJIqNKseYzQ2U5e0VcLlJ6C0dHkGD4n2WH29GSkV02MSyuYRNUDx/vJzj1oFtYpGdenhZRudgj9RAJXg/aLwkCtety9XAvtGT3GXN3reGE3EyE6Q63niX89apTpa4tzM5bMtIQHsxly51Dj4rFG+A1fXRjf24W9OTqKq4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724727827; c=relaxed/simple; bh=u2NvqBkkbAzeQS7kbk6mVRAqMmq/sCoTqOpDlC8ObH4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=CijCp6gYkeISpWn6sU78eGNVuW3bBYFcbF+jr4S4V6Kipey4VZljk/AoVxAeT+lSS4ftEciz3lKvPc5cUdcbo6ii8eLWHopaGcv1gjWBnLXMJnLeiNtJwSyfO80GC7p11FNBDgab8MmmGOHPv4p4hpt6hevmW8wPZvlRXRUN+c4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OY6a8RPd; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OY6a8RPd" Received: by smtp.kernel.org (Postfix) with ESMTPSA id ACFEFC8B7A1; Tue, 27 Aug 2024 03:03:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1724727826; bh=u2NvqBkkbAzeQS7kbk6mVRAqMmq/sCoTqOpDlC8ObH4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OY6a8RPdw9Luuff4EEXqoYQ20kM4cDnSH4oLzMmXmLvcp7zdWOu8f2pmGtUshmUuv ODo3sVqZm6X73X5o7hQ8YUmy1OKNAMLp3A5fY5MHeMevbNFuX9Z1O3qn8cSV2fm0Zx uQRc+l8/gyPycbhm0wvQnoAoFPPidRVKgkK4BK36GDyHyMWwyF8M4Ot8b1jnylzVUV Iep6rJFGZLUVItLG7qQGkwtxQRYOBESzs7U3xlM8lfti/5w++g2Rqnv3Jp2Wn5suQK CIM1D2b3yHRjAJlqhnHI8kEkEfLjhtDePNiW513jOuqY+gzFW++E3YvzSYjfNQvkMQ ncPu0O6S/4D4A== 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 1/9] selftests/damon: add access_memory_even to .gitignore Date: Mon, 26 Aug 2024 20:03:28 -0700 Message-Id: <20240827030336.7930-2-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> Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 DAMON selftests build access_memory_even, but its not on the .gitignore list. Add it to make 'git status' output cleaner. Fixes: commit c94df805c774 ("selftests/damon: implement a program for even-numbered memory regions access") Signed-off-by: SeongJae Park --- tools/testing/selftests/damon/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/damon/.gitignore b/tools/testing/selftests/damon/.gitignore index e65ef9d9cedc..2ab675fecb6b 100644 --- a/tools/testing/selftests/damon/.gitignore +++ b/tools/testing/selftests/damon/.gitignore @@ -3,3 +3,4 @@ huge_count_read_write debugfs_target_ids_read_before_terminate_race debugfs_target_ids_pid_leak access_memory +access_memory_even From patchwork Tue Aug 27 03:03:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13778770 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 50FF81773A; Tue, 27 Aug 2024 03:03:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724727827; cv=none; b=Az3V8kiDR9NaE2PHcmp0AwFeFyU6xNVI3yapO9TcWo5sKQBwNpgmHy5+d1qAnwziaqfKoMyj+N9tp8+sb4D9YwWlqib/DCaMhJDasKO6oswQW45GtAXekT5YrGcKUaGgWmgrPMd04kLcpirPORlbM1Z30NJ6Ez+jlbyOI0G81BE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724727827; c=relaxed/simple; bh=2F3Z7/FjUDbb0bRhSn31gWhRde7Fk7wSW3dzKpCxQOA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=qfgb/uYMnArHHYq4wslt7hh0CbeEaMs27R2H0OcWDhawMNAxgqMqHSP/1hyrafoK1/dt6KwapNmNgLBIX/d6fk2/5kZlHnV/3VKHUS/mhyoG2BEeLPMTPLBvfs9Mg267zYvGs8iW6g+6aldffMDk1HydU8vUx2bqKL1tCKR/X9c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=PxXg0aAY; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="PxXg0aAY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5D526C8B7A6; Tue, 27 Aug 2024 03:03:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1724727826; bh=2F3Z7/FjUDbb0bRhSn31gWhRde7Fk7wSW3dzKpCxQOA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PxXg0aAYfWgd67ktVrg98gx1cX4O+jFcp1Rx3rqPpBsIiAG9AwfrjAya2I25CL2Li E7oJnrkyFbOrFoaFOrBUPq9J5b594e6aQYCd3JzbsD2tblpSISLs2fiApEmiE/Itxh 5NIBKMsfaHLLZ+/Os61lJ4qxphcscOVwVMA/IIFy0fedHlWUjM/9S0tIN1m8iECbjU F/xNi/firvl5QiPm1QauCPN1Cj9n8nzeVfi1AGPHw8kU7lyLOezATpbzmIkzO8tbE5 mEHHxFXWrU27uBvurTrZk9Xx0Qkws9/Tc9uxiDi/UFVbrO3I3HtqCK9v+IPTEhvS9h Fv/L4NcANLh/A== 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 2/9] selftests/damon: cleanup __pycache__/ with 'make clean' Date: Mon, 26 Aug 2024 20:03:29 -0700 Message-Id: <20240827030336.7930-3-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> Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Python-based tests creates __pycache__/ directory. Remove it with 'make clean' by defining it as EXTRA_CLEAN. Fixes: b5906f5f7359 ("selftests/damon: add a test for update_schemes_tried_regions sysfs command") Signed-off-by: SeongJae Park --- tools/testing/selftests/damon/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/testing/selftests/damon/Makefile b/tools/testing/selftests/damon/Makefile index 1e2e98cc809d..5b2a6a5dd1af 100644 --- a/tools/testing/selftests/damon/Makefile +++ b/tools/testing/selftests/damon/Makefile @@ -25,4 +25,6 @@ TEST_PROGS += debugfs_target_ids_pid_leak.sh TEST_PROGS += sysfs_update_removed_scheme_dir.sh TEST_PROGS += sysfs_update_schemes_tried_regions_hang.py +EXTRA_CLEAN = __pycache__ + include ../lib.mk From patchwork Tue Aug 27 03:03:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13778772 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B2C3114A90; Tue, 27 Aug 2024 03:03:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724727827; cv=none; b=s85y+KXtHK5/mM2qmkkLII+dyqY7XtmSftrBBqY6ZN1Zko80qh8KPA2hySzHIHVv70yR1Lnongj7tTkMjcmCuiTBPGFHE4vEsyzuUvdY9P/wyDDUwzHuiBjq07z32QKxhaOk93m81J56fqglOVpAGaj9S9G264paHtC3Ys5KuZ0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724727827; c=relaxed/simple; bh=7gL6p1VlDvGym36gs1yc1aMIXOWSsJdQLUDxonxuf5U=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=tXeZvrRh9VYBNZf6rYblzhAH4E78z1ww+YvpRug6hPmsNWRnajG7Jqe7/9MBu1daGgeBdJ0ZGntPiAsO9XprQW8hgw4qmPCtz5xK4T/B1QXlJt/OhJGzq/By00ts6/CT8bT2LxZZXBskyzJJFRmOTeKry+NeKSbaK08vrpb4qeE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=paC+r9cp; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="paC+r9cp" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0DD5EC8B7B3; Tue, 27 Aug 2024 03:03:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1724727827; bh=7gL6p1VlDvGym36gs1yc1aMIXOWSsJdQLUDxonxuf5U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=paC+r9cpn7IVTlF+jU4zauq/8YM7Lb+Cl4FBTEHaY/U6d6YhjE7SlIJiPF33+guWo IkT34TNvb/6HejK6sBnPS7aH5vxH3yMB+CqN41Wu4brdSMDzPgAoiWOT2/xNM9mPbJ w+CYIdEazgEn4gdy8sbnlVwL1c3TpbzEe7R3qDaZmveAlBkgQDFKyrmr4P/RiXwpBj HYI1HCWiwiUoe9tWaA/RCtr/KsiuD2ZC312bAwYckYDCwJKzfDpc5oY3AmNDTry7oY kXltfkhImupOC6VkkEiVKE0Bfqf/MGqjBxuiTOIQstBDhk9GoxR8xeqNmtxEJyiCHC DzoJQZlrHb6aA== 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 3/9] selftests/damon: add execute permissions to test scripts Date: Mon, 26 Aug 2024 20:03:30 -0700 Message-Id: <20240827030336.7930-4-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> Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Some test scripts are missing executable permissions. It causes warnings that make the test output unnecessarily verbose. Add executable permissions. Signed-off-by: SeongJae Park --- Andrew, please note that this patch is for adding the execution permission to the files. I guess these need a special handling for your tooling. tools/testing/selftests/damon/damon_nr_regions.py | 0 tools/testing/selftests/damon/damos_apply_interval.py | 0 tools/testing/selftests/damon/damos_quota.py | 0 tools/testing/selftests/damon/damos_quota_goal.py | 0 tools/testing/selftests/damon/damos_tried_regions.py | 0 tools/testing/selftests/damon/debugfs_target_ids_pid_leak.sh | 0 .../damon/debugfs_target_ids_read_before_terminate_race.sh | 0 .../selftests/damon/sysfs_update_schemes_tried_regions_hang.py | 0 .../damon/sysfs_update_schemes_tried_regions_wss_estimation.py | 0 9 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 tools/testing/selftests/damon/damon_nr_regions.py mode change 100644 => 100755 tools/testing/selftests/damon/damos_apply_interval.py mode change 100644 => 100755 tools/testing/selftests/damon/damos_quota.py mode change 100644 => 100755 tools/testing/selftests/damon/damos_quota_goal.py mode change 100644 => 100755 tools/testing/selftests/damon/damos_tried_regions.py mode change 100644 => 100755 tools/testing/selftests/damon/debugfs_target_ids_pid_leak.sh mode change 100644 => 100755 tools/testing/selftests/damon/debugfs_target_ids_read_before_terminate_race.sh mode change 100644 => 100755 tools/testing/selftests/damon/sysfs_update_schemes_tried_regions_hang.py mode change 100644 => 100755 tools/testing/selftests/damon/sysfs_update_schemes_tried_regions_wss_estimation.py diff --git a/tools/testing/selftests/damon/damon_nr_regions.py b/tools/testing/selftests/damon/damon_nr_regions.py old mode 100644 new mode 100755 diff --git a/tools/testing/selftests/damon/damos_apply_interval.py b/tools/testing/selftests/damon/damos_apply_interval.py old mode 100644 new mode 100755 diff --git a/tools/testing/selftests/damon/damos_quota.py b/tools/testing/selftests/damon/damos_quota.py old mode 100644 new mode 100755 diff --git a/tools/testing/selftests/damon/damos_quota_goal.py b/tools/testing/selftests/damon/damos_quota_goal.py old mode 100644 new mode 100755 diff --git a/tools/testing/selftests/damon/damos_tried_regions.py b/tools/testing/selftests/damon/damos_tried_regions.py old mode 100644 new mode 100755 diff --git a/tools/testing/selftests/damon/debugfs_target_ids_pid_leak.sh b/tools/testing/selftests/damon/debugfs_target_ids_pid_leak.sh old mode 100644 new mode 100755 diff --git a/tools/testing/selftests/damon/debugfs_target_ids_read_before_terminate_race.sh b/tools/testing/selftests/damon/debugfs_target_ids_read_before_terminate_race.sh old mode 100644 new mode 100755 diff --git a/tools/testing/selftests/damon/sysfs_update_schemes_tried_regions_hang.py b/tools/testing/selftests/damon/sysfs_update_schemes_tried_regions_hang.py old mode 100644 new mode 100755 diff --git a/tools/testing/selftests/damon/sysfs_update_schemes_tried_regions_wss_estimation.py b/tools/testing/selftests/damon/sysfs_update_schemes_tried_regions_wss_estimation.py old mode 100644 new mode 100755 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: 13778773 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CE0163A27E; Tue, 27 Aug 2024 03:03:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724727828; cv=none; b=hfmhQM0vcAKddt1pqU0ekrr8A9wo8L60xPmD6eaPBR8429fXvCtF6whvUwJeDO3t22moV9vih0AZQvrhBeKpV7xOfU73TApjGv3KgxB83D+ruLm3H0eyi+yU3e4T+lGPcRGfJez89AnUziYqIA9tBnMl593C1nN8HMCMW+NHnBo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724727828; c=relaxed/simple; bh=UIcEtsuF2oQygozWT/Xm716/UFpvZjJFMlGL0LY1swc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=aA0azyFWE4phxBZc+lx0BzcdhTb9ZsGRR89ogveo6rbpk92TvgN26b/oJGwqffLTgKo9boyjW35Z45v1SP3IHqDqpsiNSlkwpWpQCLy71V6LdAf0+shlgrtHBA+n9H1Im6+FesGFn4Mm+DHzo+x/Md/AptjGMmZdrW8SAte1WCY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=vN3BAgGR; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="vN3BAgGR" 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> Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 */ From patchwork Tue Aug 27 03:03:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13778774 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A94F850271; Tue, 27 Aug 2024 03:03:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724727829; cv=none; b=E4H+pdY1CQkqWPcnSlLTOqdQxsCN9t5oslWfzI8l4Cj8qt7SwMi0AcUHe5Zj/yYdBVqi1kJqdWTH9SZ0rQWVgSZ8vb6sPhLikILX437p8xqeoLr14jH6qHg1N1mhvpjs9fjB1rpUq51+lenuhzQevEIp4vhvixCjMFMwAisfALQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724727829; c=relaxed/simple; bh=27cqGwuOVW8eGx/ZGwFvgMxuQ6m1KJSHIM8DINfBPro=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=n9aavlkQsFlwe2FkzspkrbS28fCutIGwOtGVIoh/f5l/HbUL+hZIltOxjH+1WB7WUAHFjBL7nacABFLOnPl/QGG3TsZjr2GhyblJzefEcShByDbke/ALeUhMCfL50xFSQowVbvEu8VPO4RO663JBZ0waTZ1v6/S+u2Pge2HS1/8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=eClTrHDs; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="eClTrHDs" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8FBE4C8B7A6; Tue, 27 Aug 2024 03:03:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1724727829; bh=27cqGwuOVW8eGx/ZGwFvgMxuQ6m1KJSHIM8DINfBPro=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eClTrHDsw5bze3VQM1izuo3k6Ruz46VEbDkR9eLTbtSzGk0Sn4iYhBaqh0F+D+rH1 OSMbS4v+PEaxr/ZZXlbFAnJy3XwPC4vOOS6GdmmZkCxU/ro8hLwdh2AY30ULWmqEyR xCd5s31I7vC16GUF4VGOFTMZQMNFzAc8mWZxxWuLOi73pRoQyb0lVQngW3BwDj9q0M 1qcrRQwpeUTK9JLwUvntkOFU5iL5pip0zw36zYm0YvvhMH72MzUYAp1sY/ZxDXVd7M InrrNfiZKRlVab5GMdTZqQU4lbJQjGqDznTvD5WNgHPJbKBLsEUbX9dWedDMFatali V1I0CsmY6EEtw== 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 5/9] mm/damon/core-test: fix damon_test_ops_registration() for DAMON_VADDR unset case Date: Mon, 26 Aug 2024 20:03:32 -0700 Message-Id: <20240827030336.7930-6-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> Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 DAMON core kunit test can be executed without CONFIG_DAMON_VADDR. In the case, vaddr DAMON ops is not registered. Meanwhile, ops registration kunit test assumes the vaddr ops is registered. Check and handle the case by registrering fake vaddr ops inside the test code. Fixes: 4f540f5ab4f2 ("mm/damon/core-test: add a kunit test case for ops registration") Signed-off-by: SeongJae Park --- mm/damon/core-test.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/mm/damon/core-test.h b/mm/damon/core-test.h index ef36d586d6ee..ae03df71737e 100644 --- a/mm/damon/core-test.h +++ b/mm/damon/core-test.h @@ -247,8 +247,16 @@ static void damon_test_ops_registration(struct kunit *test) { struct damon_ctx *c = damon_new_ctx(); struct damon_operations ops = {.id = DAMON_OPS_VADDR}, bak; + bool need_cleanup = false; - /* DAMON_OPS_VADDR is registered on subsys_initcall */ + /* DAMON_OPS_VADDR is registered only if CONFIG_DAMON_VADDR is set */ + if (!damon_is_registered_ops(DAMON_OPS_VADDR)) { + bak.id = DAMON_OPS_VADDR; + KUNIT_EXPECT_EQ(test, damon_register_ops(&bak), 0); + need_cleanup = true; + } + + /* DAMON_OPS_VADDR is ensured to be registered */ KUNIT_EXPECT_EQ(test, damon_select_ops(c, DAMON_OPS_VADDR), 0); /* Double-registration is prohibited */ @@ -274,6 +282,13 @@ static void damon_test_ops_registration(struct kunit *test) KUNIT_EXPECT_EQ(test, damon_register_ops(&ops), -EINVAL); damon_destroy_ctx(c); + + if (need_cleanup) { + mutex_lock(&damon_ops_lock); + damon_registered_ops[DAMON_OPS_VADDR] = + (struct damon_operations){}; + mutex_unlock(&damon_ops_lock); + } } static void damon_test_set_regions(struct kunit *test) From patchwork Tue Aug 27 03:03:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13778775 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 29BE877113; Tue, 27 Aug 2024 03:03:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724727830; cv=none; b=VKzF1lTe2JE6gZd4M7o1oCdXcsqw2b8tIrWRMFCjXDqUKL8hJ12aZ/LyVXa0P3jknumjYFUXBKdDW/hVLVjxQAw5h17OM9gBdX/QDXKicWUzvP0lqaQM0jMU6kc7JFvVPaSvBaq6vkwB1TcXrX0XmU5S0uPow+NJNcrf/4do9X8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724727830; c=relaxed/simple; bh=UByfltsl+0NKbRlC3XW64geq3UiMNgzqDTzx3r/unzQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=GYVj0QAN/bNaifg7xonDq+ERfVvZAD/Q3kvMrWEBTiwoYTueDLrm03F77dP3B0RYytboeQjETEImjy+iYp6D/3SDM0kBf8sOZuMvYELwXi3KeAxwkGG/vPNBHWkMX9W/EPOAqRsIzC6RSDxJVGdp1Y/l/BgGBF1J1bMvLBa97dU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=oHRDIBRY; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="oHRDIBRY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 616F4C8B7B4; Tue, 27 Aug 2024 03:03:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1724727830; bh=UByfltsl+0NKbRlC3XW64geq3UiMNgzqDTzx3r/unzQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oHRDIBRYwvoiaUxi62tRmC7xHEIuX4zUxcHBLqbd6VeALE2Q6nv+0pMEpPfRUpMsy FLEDnT/JyJ80ydIVI9/sSxyWOakamo1Tb0Ser+wP/UXZ3NC/MAHvPoskEJCcMCABI8 fEd8jb1AKXiAF48Wr1s2RT5c+PfV28DYDE6nN932/Hw2Y9kfinsKS7F3DQNpnGxOkr SErgum5KfTJIQNbmYxUMUOzs0+kWumrDwQ3F7OsWuK2i9WfSEhs9W5SmCF2PGk1fV4 h1X1/LJHzEJU0MaAplOD3KaxhoMOpnD/EoLZShohd8+cMyl0RoDOZclTTCiswo/Hsy VH9khOcXvGLXg== 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 6/9] mm/damon/dbgfs-test: skip dbgfs_set_targets() test if PADDR is not registered Date: Mon, 26 Aug 2024 20:03:33 -0700 Message-Id: <20240827030336.7930-7-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> Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The test depends on registration of DAMON_OPS_PADDR. It would be registered only when CONFIG_DAMON_PADDR is set. DAMON core kunit tests do fake ops registration for such case. However, the functions for such fake ops registration is not available to DAMON debugfs interface. Just skip the test in the case. Fixes: 999b9467974f ("mm/damon/dbgfs-test: fix is_target_id() change") Signed-off-by: SeongJae Park --- mm/damon/dbgfs-test.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mm/damon/dbgfs-test.h b/mm/damon/dbgfs-test.h index 2d85217f5ba4..9bd5dca5d4ad 100644 --- a/mm/damon/dbgfs-test.h +++ b/mm/damon/dbgfs-test.h @@ -73,6 +73,11 @@ static void damon_dbgfs_test_set_targets(struct kunit *test) struct damon_ctx *ctx = dbgfs_new_ctx(); char buf[64]; + if (!damon_is_registered_ops(DAMON_OPS_PADDR)) { + dbgfs_destroy_ctx(ctx); + kunit_skip(test, "PADDR not registered"); + } + /* Make DAMON consider target has no pid */ damon_select_ops(ctx, DAMON_OPS_PADDR); From patchwork Tue Aug 27 03:03:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13778776 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 41C6212E1C2; Tue, 27 Aug 2024 03:03:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724727831; cv=none; b=PY5zva+kzd9QyQxgmkuZew13bHRp2VkQ7gyd0K2oO71FxzAPOX1oFOBDTiqKRjSw2JdrB1A4MDlCUV7WiQMWrnSmAz0g4VTDdH9vDjuf/2lCVUA0rmbpBSpDpPBBaAxEeMVz6Y+q77VRd+zls59afXY+/hnCqvuMUD+EUAc1gXE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724727831; c=relaxed/simple; bh=IxpMWIJWc8lNeei5qcMinGRh56gQoVV53dw/oH9g9XY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=IvU50WanE9vSv9nN+pmmxLq2itBsQvvyzlFUOjMkVNakH9TeXvJvEz/TIPmeRvIhnshmR9YdQk2xx8LMg/c96eI+1E6E0XKmF5wo4U210Rk2GKgCEzvtcrScniWlEmKI1vtUcVPOFTmpvS/aTG8jNIKTUn5cuhRww5DkyIy0s2c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=MiviURUz; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="MiviURUz" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 37166C8B7A5; Tue, 27 Aug 2024 03:03:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1724727830; bh=IxpMWIJWc8lNeei5qcMinGRh56gQoVV53dw/oH9g9XY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MiviURUzk+69xkmiUshCH+Qi8dVAA/xCMLUfogwfkfbJUxQY1HGwZxk8lRXi73tQs XBngynWjeia092BrzXj2pGuzw0+ipJrLWg5NVe+JAP/VNxcug9W0sHHpzDv7A501Ka o/KfyFoT5INKzm/sVa350CYg2pNKt1EkaQhm80BR/b/wtEhhEKvOMOejygId9dm7Xo hnnVohkPkstiDwN7ZO/bkxPccj6CBdkjv9kEEDk8ZGVMNDnfmBByuep9+j6ZzveQIs PHr56HS4WJhMnvfezEgLoOHQxq93dkM9qQdV+vzJkzcncy/AR9xeqglpuNRaVfo0Ka XxgaKsNvtokdg== 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 7/9] mm/damon/dbgfs-test: skip dbgfs_set_init_regions() test if PADDR is not registered Date: Mon, 26 Aug 2024 20:03:34 -0700 Message-Id: <20240827030336.7930-8-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> Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The test depends on registration of DAMON_OPS_PADDR. It would be registered only when CONFIG_DAMON_PADDR is set. DAMON core kunit tests do fake ops registration for such case. However, the functions for such fake ops registration is not available to DAMON debugfs interface. Just skip the test in the case. Fixes: 999b9467974f ("mm/damon/dbgfs-test: fix is_target_id() change") Signed-off-by: SeongJae Park --- mm/damon/dbgfs-test.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mm/damon/dbgfs-test.h b/mm/damon/dbgfs-test.h index 9bd5dca5d4ad..d2ecfcc8db86 100644 --- a/mm/damon/dbgfs-test.h +++ b/mm/damon/dbgfs-test.h @@ -116,6 +116,11 @@ static void damon_dbgfs_test_set_init_regions(struct kunit *test) int i, rc; char buf[256]; + if (!damon_is_registered_ops(DAMON_OPS_PADDR)) { + damon_destroy_ctx(ctx); + kunit_skip(test, "PADDR not registered"); + } + damon_select_ops(ctx, DAMON_OPS_PADDR); dbgfs_set_targets(ctx, 3, NULL); From patchwork Tue Aug 27 03:03:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13778777 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0241613DB99; Tue, 27 Aug 2024 03:03:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724727832; cv=none; b=p3LYoDrZSQgngfVGpi8i4L2D9CgVxIp0L4GNcTRw54HJyIkIGhlXja5L5e74dJ3j3Rq0xNsctc7X6TZkzbgiaS2t+KRuXavd4uSydigRu3sSZvwqs8Z5NaHgvKf7yVjnvbLDAvnrSAEBKvlxjKwzfFBAxS3f6jux/lwyw7GQELI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724727832; c=relaxed/simple; bh=JEhQGi/c3/4g839WuUytPNlve2LqyXNGTGf1ZogtfsQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=h0+MFILNSQb1zZnlEoRmQvq6+EH1jq3ADW4zmpZ5AqS+4GF3cj7XWANI5Fl2AygYdVlzgKQCmVgOC6eL0a6g8mSSxkDCdfuNj4IKELXSlV1VQiIrHHgUOhXlQN6l85j0stCcyIVAUnV7I3JvdKd3rgEIhQE4EHIE/g8jEBAA8Wk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=IczrbT6R; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="IczrbT6R" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0EC5BC8B7A6; Tue, 27 Aug 2024 03:03:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1724727831; bh=JEhQGi/c3/4g839WuUytPNlve2LqyXNGTGf1ZogtfsQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IczrbT6R+LHP3ZBa3JKJtLLiR6WHgbj/C9Dboh6+GCb+92z9+N24+xktUiYK6dYqi 25HkOqFpJRytB/Apso5kbvD3+Lv1RuFa/jXhFTg7ezFuIl6OJyW8RCUB2VDncsmIq+ UPArIf1ELVzUZo31/xUklNdSlYz4Yi1XVT6wU83ASR+T/fiiDMntcItT9CeZotzia0 h0FQaXZq02txTzXKE1V5lA0nN0pZkTIp2o99e6ZMMex/oG+S2iHjMc7bIcXSYoJtdQ kB6YyrTdtUCUB9SlI0c+PTFKumZSx+n0ZPkm2SuBNdnFP2cM2xH83hJZ0HV3NIcCxR T+4iHExScOahw== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , Brendan Higgins , David Gow , damon@lists.linux.dev, linux-mm@kvack.org, kunit-dev@googlegroups.com, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 8/9] mm/damon: move kunit tests to tests/ subdirectory with _kunit suffix Date: Mon, 26 Aug 2024 20:03:35 -0700 Message-Id: <20240827030336.7930-9-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> Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 There was a discussion about better places for kunit test code[1] and test file name suffix[2]. Folowwing the conclusion, move kunit tests for DAMON to mm/damon/tests/ subdirectory and rename those. [1] https://lore.kernel.org/CABVgOS=pUdWb6NDHszuwb1HYws4a1-b1UmN=i8U_ED7HbDT0mg@mail.gmail.com [2] https://lore.kernel.org/CABVgOSmKwPq7JEpHfS6sbOwsR0B-DBDk_JP-ZD9s9ZizvpUjbQ@mail.gmail.com Signed-off-by: SeongJae Park --- mm/damon/core.c | 2 +- mm/damon/dbgfs.c | 2 +- mm/damon/sysfs.c | 2 +- mm/damon/{core-test.h => tests/core-kunit.h} | 0 mm/damon/{dbgfs-test.h => tests/dbgfs-kunit.h} | 0 mm/damon/{sysfs-test.h => tests/sysfs-kunit.h} | 0 mm/damon/{vaddr-test.h => tests/vaddr-kunit.h} | 0 mm/damon/vaddr.c | 2 +- 8 files changed, 4 insertions(+), 4 deletions(-) rename mm/damon/{core-test.h => tests/core-kunit.h} (100%) rename mm/damon/{dbgfs-test.h => tests/dbgfs-kunit.h} (100%) rename mm/damon/{sysfs-test.h => tests/sysfs-kunit.h} (100%) rename mm/damon/{vaddr-test.h => tests/vaddr-kunit.h} (100%) diff --git a/mm/damon/core.c b/mm/damon/core.c index a1c32becfc73..1d2c4daef157 100644 --- a/mm/damon/core.c +++ b/mm/damon/core.c @@ -2275,4 +2275,4 @@ static int __init damon_init(void) subsys_initcall(damon_init); -#include "core-test.h" +#include "tests/core-kunit.h" diff --git a/mm/damon/dbgfs.c b/mm/damon/dbgfs.c index 51a6f1cac385..b4213bc47e44 100644 --- a/mm/damon/dbgfs.c +++ b/mm/damon/dbgfs.c @@ -1145,4 +1145,4 @@ static int __init damon_dbgfs_init(void) module_init(damon_dbgfs_init); -#include "dbgfs-test.h" +#include "tests/dbgfs-kunit.h" diff --git a/mm/damon/sysfs.c b/mm/damon/sysfs.c index ecf0835e34b8..4daac92be30b 100644 --- a/mm/damon/sysfs.c +++ b/mm/damon/sysfs.c @@ -1908,4 +1908,4 @@ static int __init damon_sysfs_init(void) } subsys_initcall(damon_sysfs_init); -#include "sysfs-test.h" +#include "tests/sysfs-kunit.h" diff --git a/mm/damon/core-test.h b/mm/damon/tests/core-kunit.h similarity index 100% rename from mm/damon/core-test.h rename to mm/damon/tests/core-kunit.h diff --git a/mm/damon/dbgfs-test.h b/mm/damon/tests/dbgfs-kunit.h similarity index 100% rename from mm/damon/dbgfs-test.h rename to mm/damon/tests/dbgfs-kunit.h diff --git a/mm/damon/sysfs-test.h b/mm/damon/tests/sysfs-kunit.h similarity index 100% rename from mm/damon/sysfs-test.h rename to mm/damon/tests/sysfs-kunit.h diff --git a/mm/damon/vaddr-test.h b/mm/damon/tests/vaddr-kunit.h similarity index 100% rename from mm/damon/vaddr-test.h rename to mm/damon/tests/vaddr-kunit.h diff --git a/mm/damon/vaddr.c b/mm/damon/vaddr.c index 58829baf8b5d..b0e8b361891d 100644 --- a/mm/damon/vaddr.c +++ b/mm/damon/vaddr.c @@ -730,4 +730,4 @@ static int __init damon_va_initcall(void) subsys_initcall(damon_va_initcall); -#include "vaddr-test.h" +#include "tests/vaddr-kunit.h" From patchwork Tue Aug 27 03:03:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13778778 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CC186182B2; Tue, 27 Aug 2024 03:03:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724727832; cv=none; b=LO2mCsjYouRdXsrPLqT7Sqjitq5d9Ho6inisT5HOfWG1FxnIHwTNXgqZQDnqKzcgBmoDBthGPjJTtkXNGbx614GLWT/2JiPf1GsXm04NmMzPiYoHDP7qc1SL40ho4GkBaY/tnfBWB9tP5N5n94p+EyayRiGUaj3HJgsn+E+Y7Do= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724727832; c=relaxed/simple; bh=ZaGVTXIiI8PW6Ml6OfO+1JWaxqCvOdy/W/r1hHy96T4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=UydQCs7qmRmFqOZDlZu1kf6KXnSdgU30lpoNoSvMk3DTZQ/wVSSt/ttdfD6iKCdDgAWXDUoiOsPGP0NFkkxet9J/E/65SR9uxJYsBRXEw2tPHCxK7HYVIRnT2iIauTegw+BLYO48eEpkmPb4cW9jmmvAdQANj8nm1O1SNUk64bU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=sMu+YKfg; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="sMu+YKfg" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D19B5C8B7A1; Tue, 27 Aug 2024 03:03:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1724727832; bh=ZaGVTXIiI8PW6Ml6OfO+1JWaxqCvOdy/W/r1hHy96T4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sMu+YKfg4RqNEUEeEU1xo7yEGptZoWTq6zET4EtB7FTt76Ox0VabnKIEZx4VWJQvK Hg4mBubK6R/gHCjai+on24wQaH3xRu8CfHOzZVKTxLRUoW+FIMy4lJH8ND2jur9o6F o6UyON1x+rNlZ9GpowuGLSUWbCkrhIIBBKTnVVPLwmGgxnj3bqA+bjFuCO4vP2PRTY jyhZMiQHzkKvlEEsJXZ5b8U/7nqGmREL3CLIzxJXLYsOIQjLmwNbR8JSsPuO+1GeKw vnvF/tBu2RAi3vQjnWlXlIVAxPEwQLXJu04BEngDYwYpnRPMwuUTyz3jVXgge61NWo CSsXW6sEug/1Q== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , Brendan Higgins , David Gow , damon@lists.linux.dev, linux-mm@kvack.org, kunit-dev@googlegroups.com, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 9/9] mm/damon/tests: add .kunitconfig file for DAMON kunit tests Date: Mon, 26 Aug 2024 20:03:36 -0700 Message-Id: <20240827030336.7930-10-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> Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 '--kunitconfig' option of 'kunit.py run' supports '.kunitconfig' file name convention. Add the file for DAMON kunit tests for more convenient kunit run. Signed-off-by: SeongJae Park --- mm/damon/tests/.kunitconfig | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 mm/damon/tests/.kunitconfig diff --git a/mm/damon/tests/.kunitconfig b/mm/damon/tests/.kunitconfig new file mode 100644 index 000000000000..a73be044fc9b --- /dev/null +++ b/mm/damon/tests/.kunitconfig @@ -0,0 +1,22 @@ +# for DAMON core +CONFIG_KUNIT=y +CONFIG_DAMON=y +CONFIG_DAMON_KUNIT_TEST=y + +# for DAMON vaddr ops +CONFIG_MMU=y +CONFIG_PAGE_IDLE_FLAG=y +CONFIG_DAMON_VADDR=y +CONFIG_DAMON_VADDR_KUNIT_TEST=y + +# for DAMON sysfs interface +CONFIG_SYSFS=y +CONFIG_DAMON_SYSFS=y +CONFIG_DAMON_SYSFS_KUNIT_TEST=y + +# for DAMON debugfs interface +CONFIG_DEBUG_FS=y +CONFIG_DAMON_PADDR=y +CONFIG_DAMON_DBGFS_DEPRECATED=y +CONFIG_DAMON_DBGFS=y +CONFIG_DAMON_DBGFS_KUNIT_TEST=y