linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: SeongJae Park <sj@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: SeongJae Park <sj@kernel.org>,
	Brendan Higgins <brendanhiggins@google.com>,
	David Gow <davidgow@google.com>,
	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	[thread overview]
Message-ID: <20240827030336.7930-9-sj@kernel.org> (raw)
In-Reply-To: <20240827030336.7930-1-sj@kernel.org>

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 <sj@kernel.org>
---
 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"
-- 
2.39.2



  parent reply	other threads:[~2024-08-27  3:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-27  3:03 [PATCH 0/9] misc fixups for DAMON {self,kunit} tests SeongJae Park
2024-08-27  3:03 ` [PATCH 1/9] selftests/damon: add access_memory_even to .gitignore SeongJae Park
2024-08-27  3:03 ` [PATCH 2/9] selftests/damon: cleanup __pycache__/ with 'make clean' SeongJae Park
2024-08-27  3:03 ` [PATCH 3/9] selftests/damon: add execute permissions to test scripts SeongJae Park
2024-08-27  3:03 ` [PATCH 4/9] mm/damon/core-test: test only vaddr case on ops registration test SeongJae Park
2024-08-27  3:03 ` [PATCH 5/9] mm/damon/core-test: fix damon_test_ops_registration() for DAMON_VADDR unset case SeongJae Park
2024-08-27  3:03 ` [PATCH 6/9] mm/damon/dbgfs-test: skip dbgfs_set_targets() test if PADDR is not registered SeongJae Park
2024-08-27  3:03 ` [PATCH 7/9] mm/damon/dbgfs-test: skip dbgfs_set_init_regions() " SeongJae Park
2024-08-27  3:03 ` SeongJae Park [this message]
2024-08-27  3:03 ` [PATCH 9/9] mm/damon/tests: add .kunitconfig file for DAMON kunit tests SeongJae Park

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240827030336.7930-9-sj@kernel.org \
    --to=sj@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=brendanhiggins@google.com \
    --cc=damon@lists.linux.dev \
    --cc=davidgow@google.com \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).