* [PATCH] selftests/damon: fix damon selftests by installing _common.sh
@ 2025-08-12 8:12 Alexandre Ghiti
2025-08-12 12:32 ` Sang-Heon Jeon
2025-08-12 17:13 ` [PATCH] " SeongJae Park
0 siblings, 2 replies; 7+ messages in thread
From: Alexandre Ghiti @ 2025-08-12 8:12 UTC (permalink / raw)
To: SeongJae Park, Shuah Khan, Andrew Morton, Enze Li
Cc: damon, linux-mm, linux-kselftest, linux-kernel, Alexandre Ghiti
_common.sh was recently introduced but is not installed and then
triggers an error when trying to run the damon selftests:
selftests: damon: sysfs.sh
./sysfs.sh: line 4: _common.sh: No such file or directory
Install this file to avoid this error.
Fixes: 511914506d19 ("selftests/damon: introduce _common.sh to host shared function")
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
---
tools/testing/selftests/damon/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/damon/Makefile b/tools/testing/selftests/damon/Makefile
index 5b230deb19e8ee6cee56eb8f18c35e12f331e8b7..ddc69e8bde2905ff1c461a08f2ad008e6b28ac87 100644
--- a/tools/testing/selftests/damon/Makefile
+++ b/tools/testing/selftests/damon/Makefile
@@ -4,6 +4,7 @@
TEST_GEN_FILES += access_memory access_memory_even
TEST_FILES = _damon_sysfs.py
+TEST_FILES += _common.sh
# functionality tests
TEST_PROGS += sysfs.sh
---
base-commit: 2754d549af31f8f029f02d02cd8e574676229b3d
change-id: 20250812-alex-fixes_manual-aed3ef75dd83
Best regards,
--
Alexandre Ghiti <alexghiti@rivosinc.com>
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] selftests/damon: fix damon selftests by installing _common.sh
2025-08-12 8:12 [PATCH] selftests/damon: fix damon selftests by installing _common.sh Alexandre Ghiti
@ 2025-08-12 12:32 ` Sang-Heon Jeon
2025-08-12 13:27 ` Sang-Heon Jeon
2025-08-12 17:13 ` [PATCH] " SeongJae Park
1 sibling, 1 reply; 7+ messages in thread
From: Sang-Heon Jeon @ 2025-08-12 12:32 UTC (permalink / raw)
To: Alexandre Ghiti
Cc: SeongJae Park, Shuah Khan, Andrew Morton, Enze Li, damon,
linux-mm, linux-kselftest, linux-kernel
Hello, Alexandre
On Tue, Aug 12, 2025 at 5:13 PM Alexandre Ghiti <alexghiti@rivosinc.com> wrote:
>
> _common.sh was recently introduced but is not installed and then
> triggers an error when trying to run the damon selftests:
>
> selftests: damon: sysfs.sh
> ./sysfs.sh: line 4: _common.sh: No such file or directory
>
> Install this file to avoid this error.
I tried to reproduce those error with my vm environment but I failed;
with my workaround test method, it doesn't exist.
If you're okay, could you please tell me line by line how you execute
tests in what environment?
I'm also struggling with the test environment, as well.
> Fixes: 511914506d19 ("selftests/damon: introduce _common.sh to host shared function")
> Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
> ---
> tools/testing/selftests/damon/Makefile | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/testing/selftests/damon/Makefile b/tools/testing/selftests/damon/Makefile
> index 5b230deb19e8ee6cee56eb8f18c35e12f331e8b7..ddc69e8bde2905ff1c461a08f2ad008e6b28ac87 100644
> --- a/tools/testing/selftests/damon/Makefile
> +++ b/tools/testing/selftests/damon/Makefile
> @@ -4,6 +4,7 @@
> TEST_GEN_FILES += access_memory access_memory_even
>
> TEST_FILES = _damon_sysfs.py
> +TEST_FILES += _common.sh
>
> # functionality tests
> TEST_PROGS += sysfs.sh
>
> ---
> base-commit: 2754d549af31f8f029f02d02cd8e574676229b3d
Does this commit exist in `mm-new` or `damon-next`? I failed to setup
the same base-commit environment.
> change-id: 20250812-alex-fixes_manual-aed3ef75dd83
>
> Best regards,
> --
> Alexandre Ghiti <alexghiti@rivosinc.com>
>
>
Thank you for great work!
Best Regards.
Sang-Heon Jeon
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] selftests/damon: fix damon selftests by installing _common.sh
2025-08-12 12:32 ` Sang-Heon Jeon
@ 2025-08-12 13:27 ` Sang-Heon Jeon
2025-08-12 17:20 ` SeongJae Park
2025-08-13 3:04 ` q[PATCH] " Enze Li
0 siblings, 2 replies; 7+ messages in thread
From: Sang-Heon Jeon @ 2025-08-12 13:27 UTC (permalink / raw)
To: Alexandre Ghiti
Cc: SeongJae Park, Shuah Khan, Andrew Morton, Enze Li, damon,
linux-mm, linux-kselftest, linux-kernel
Hello, Alexandre
On Tue, Aug 12, 2025 at 9:32 PM Sang-Heon Jeon <ekffu200098@gmail.com> wrote:
>
> Hello, Alexandre
>
> On Tue, Aug 12, 2025 at 5:13 PM Alexandre Ghiti <alexghiti@rivosinc.com> wrote:
> >
> > _common.sh was recently introduced but is not installed and then
> > triggers an error when trying to run the damon selftests:
> >
> > selftests: damon: sysfs.sh
> > ./sysfs.sh: line 4: _common.sh: No such file or directory
> >
> > Install this file to avoid this error.
>
> I tried to reproduce those error with my vm environment but I failed;
> with my workaround test method, it doesn't exist.
> If you're okay, could you please tell me line by line how you execute
> tests in what environment?
> I'm also struggling with the test environment, as well.
I succeeded to reproduce and also check that this patch removes those errors.
> > Fixes: 511914506d19 ("selftests/damon: introduce _common.sh to host shared function")
> > Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
> > ---
Tested-by: Sang-Heon Jeon <ekffu200098@gmail.com>
> > tools/testing/selftests/damon/Makefile | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/tools/testing/selftests/damon/Makefile b/tools/testing/selftests/damon/Makefile
> > index 5b230deb19e8ee6cee56eb8f18c35e12f331e8b7..ddc69e8bde2905ff1c461a08f2ad008e6b28ac87 100644
> > --- a/tools/testing/selftests/damon/Makefile
> > +++ b/tools/testing/selftests/damon/Makefile
> > @@ -4,6 +4,7 @@
> > TEST_GEN_FILES += access_memory access_memory_even
> >
> > TEST_FILES = _damon_sysfs.py
> > +TEST_FILES += _common.sh
> >
> > # functionality tests
> > TEST_PROGS += sysfs.sh
> >
> > ---
> > base-commit: 2754d549af31f8f029f02d02cd8e574676229b3d
>
> Does this commit exist in `mm-new` or `damon-next`? I failed to setup
> the same base-commit environment.
However, I'm still not sure that this patch is in the correct
baseline. maybe it will not cause any problems with the merge
though... but I'm not sure. So I didn't add a reviewed-by tag.
> > change-id: 20250812-alex-fixes_manual-aed3ef75dd83
> >
> > Best regards,
> > --
> > Alexandre Ghiti <alexghiti@rivosinc.com>
> >
> >
>
> Thank you for great work!
>
> Best Regards.
> Sang-Heon Jeon
Best Regards.
Sang-Heon Jeon
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] selftests/damon: fix damon selftests by installing _common.sh
2025-08-12 8:12 [PATCH] selftests/damon: fix damon selftests by installing _common.sh Alexandre Ghiti
2025-08-12 12:32 ` Sang-Heon Jeon
@ 2025-08-12 17:13 ` SeongJae Park
1 sibling, 0 replies; 7+ messages in thread
From: SeongJae Park @ 2025-08-12 17:13 UTC (permalink / raw)
To: Alexandre Ghiti
Cc: SeongJae Park, Shuah Khan, Andrew Morton, Enze Li, damon,
linux-mm, linux-kselftest, linux-kernel
On Tue, 12 Aug 2025 08:12:11 +0000 Alexandre Ghiti <alexghiti@rivosinc.com> wrote:
> _common.sh was recently introduced but is not installed and then
> triggers an error when trying to run the damon selftests:
>
> selftests: damon: sysfs.sh
> ./sysfs.sh: line 4: _common.sh: No such file or directory
>
> Install this file to avoid this error.
>
> Fixes: 511914506d19 ("selftests/damon: introduce _common.sh to host shared function")
Thank you for catching and fixing this!
> Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Reviewed-by: SeongJae Park <sj@kernel.org>
Thanks,
SJ
[...]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] selftests/damon: fix damon selftests by installing _common.sh
2025-08-12 13:27 ` Sang-Heon Jeon
@ 2025-08-12 17:20 ` SeongJae Park
2025-08-13 1:49 ` Sang-Heon Jeon
2025-08-13 3:04 ` q[PATCH] " Enze Li
1 sibling, 1 reply; 7+ messages in thread
From: SeongJae Park @ 2025-08-12 17:20 UTC (permalink / raw)
To: Sang-Heon Jeon
Cc: SeongJae Park, Alexandre Ghiti, Shuah Khan, Andrew Morton,
Enze Li, damon, linux-mm, linux-kselftest, linux-kernel
On Tue, 12 Aug 2025 22:27:00 +0900 Sang-Heon Jeon <ekffu200098@gmail.com> wrote:
> Hello, Alexandre
>
> On Tue, Aug 12, 2025 at 9:32 PM Sang-Heon Jeon <ekffu200098@gmail.com> wrote:
> >
> > Hello, Alexandre
> >
> > On Tue, Aug 12, 2025 at 5:13 PM Alexandre Ghiti <alexghiti@rivosinc.com> wrote:
> > >
> > > _common.sh was recently introduced but is not installed and then
> > > triggers an error when trying to run the damon selftests:
> > >
> > > selftests: damon: sysfs.sh
> > > ./sysfs.sh: line 4: _common.sh: No such file or directory
> > >
> > > Install this file to avoid this error.
> >
> > I tried to reproduce those error with my vm environment but I failed;
> > with my workaround test method, it doesn't exist.
> > If you're okay, could you please tell me line by line how you execute
> > tests in what environment?
> > I'm also struggling with the test environment, as well.
>
> I succeeded to reproduce and also check that this patch removes those errors.
>
> > > Fixes: 511914506d19 ("selftests/damon: introduce _common.sh to host shared function")
> > > Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
> > > ---
>
> Tested-by: Sang-Heon Jeon <ekffu200098@gmail.com>
Thank you, Sang-Heon :)
[...]
> > > ---
> > > base-commit: 2754d549af31f8f029f02d02cd8e574676229b3d
> >
> > Does this commit exist in `mm-new` or `damon-next`? I failed to setup
> > the same base-commit environment.
>
> However, I'm still not sure that this patch is in the correct
> baseline. maybe it will not cause any problems with the merge
> though... but I'm not sure. So I didn't add a reviewed-by tag.
I think unclear baseline of a patch shouldn't be a blocker of Reviewed-by tags.
Since most DAMON patches are recommended to use mm-new[1], as long as the patch
can cleanly applied on latest mm-new and you don't see anything wrong, I think
you can assume it is based on mm-new.
[1] https://origin.kernel.org/doc/html/latest/mm/damon/maintainer-profile.html#scm-trees
Thanks,
SJ
[...]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] selftests/damon: fix damon selftests by installing _common.sh
2025-08-12 17:20 ` SeongJae Park
@ 2025-08-13 1:49 ` Sang-Heon Jeon
0 siblings, 0 replies; 7+ messages in thread
From: Sang-Heon Jeon @ 2025-08-13 1:49 UTC (permalink / raw)
To: SeongJae Park
Cc: Alexandre Ghiti, Shuah Khan, Andrew Morton, Enze Li, damon,
linux-mm, linux-kselftest, linux-kernel
On Wed, Aug 13, 2025 at 2:20 AM SeongJae Park <sj@kernel.org> wrote:
>
> On Tue, 12 Aug 2025 22:27:00 +0900 Sang-Heon Jeon <ekffu200098@gmail.com> wrote:
>
> > Hello, Alexandre
> >
> > On Tue, Aug 12, 2025 at 9:32 PM Sang-Heon Jeon <ekffu200098@gmail.com> wrote:
> > >
> > > Hello, Alexandre
> > >
> > > On Tue, Aug 12, 2025 at 5:13 PM Alexandre Ghiti <alexghiti@rivosinc.com> wrote:
> > > >
> > > > _common.sh was recently introduced but is not installed and then
> > > > triggers an error when trying to run the damon selftests:
> > > >
> > > > selftests: damon: sysfs.sh
> > > > ./sysfs.sh: line 4: _common.sh: No such file or directory
> > > >
> > > > Install this file to avoid this error.
> > >
> > > I tried to reproduce those error with my vm environment but I failed;
> > > with my workaround test method, it doesn't exist.
> > > If you're okay, could you please tell me line by line how you execute
> > > tests in what environment?
> > > I'm also struggling with the test environment, as well.
> >
> > I succeeded to reproduce and also check that this patch removes those errors.
> >
> > > > Fixes: 511914506d19 ("selftests/damon: introduce _common.sh to host shared function")
> > > > Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
> > > > ---
> >
> > Tested-by: Sang-Heon Jeon <ekffu200098@gmail.com>
>
> Thank you, Sang-Heon :)
>
> [...]
> > > > ---
> > > > base-commit: 2754d549af31f8f029f02d02cd8e574676229b3d
> > >
> > > Does this commit exist in `mm-new` or `damon-next`? I failed to setup
> > > the same base-commit environment.
> >
> > However, I'm still not sure that this patch is in the correct
> > baseline. maybe it will not cause any problems with the merge
> > though... but I'm not sure. So I didn't add a reviewed-by tag.
>
> I think unclear baseline of a patch shouldn't be a blocker of Reviewed-by tags.
> Since most DAMON patches are recommended to use mm-new[1], as long as the patch
> can cleanly applied on latest mm-new and you don't see anything wrong, I think
> you can assume it is based on mm-new.
>
> [1] https://origin.kernel.org/doc/html/latest/mm/damon/maintainer-profile.html#scm-trees
Thanks for the notice! I'll keep that in mind. And also thank you for
always being kind.
>
> Thanks,
> SJ
>
> [...]
Best Regards.
Sang-Heon Jeon
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: q[PATCH] selftests/damon: fix damon selftests by installing _common.sh
2025-08-12 13:27 ` Sang-Heon Jeon
2025-08-12 17:20 ` SeongJae Park
@ 2025-08-13 3:04 ` Enze Li
1 sibling, 0 replies; 7+ messages in thread
From: Enze Li @ 2025-08-13 3:04 UTC (permalink / raw)
To: Sang-Heon Jeon
Cc: Alexandre Ghiti, SeongJae Park, Shuah Khan, Andrew Morton, damon,
linux-mm, linux-kselftest, linux-kernel
Hello Alexandre, Sang-Heon
On Tue, Aug 12 2025 at 10:27:00 PM +0900, Sang-Heon Jeon wrote:
> Hello, Alexandre
>
> On Tue, Aug 12, 2025 at 9:32 PM Sang-Heon Jeon <ekffu200098@gmail.com> wrote:
>>
>> Hello, Alexandre
>>
>> On Tue, Aug 12, 2025 at 5:13 PM Alexandre Ghiti <alexghiti@rivosinc.com> wrote:
>> >
>> > _common.sh was recently introduced but is not installed and then
>> > triggers an error when trying to run the damon selftests:
>> >
>> > selftests: damon: sysfs.sh
>> > ./sysfs.sh: line 4: _common.sh: No such file or directory
>> >
>> > Install this file to avoid this error.
Excellent catch! This patch unlocks a testing method that was
completely off my radar. :)
>>
>> I tried to reproduce those error with my vm environment but I failed;
>> with my workaround test method, it doesn't exist.
>> If you're okay, could you please tell me line by line how you execute
>> tests in what environment?
>> I'm also struggling with the test environment, as well.
>
> I succeeded to reproduce and also check that this patch removes those errors.
>
Thanks to Sang-Heon for helping reproduce this issue. I reproduce this
issue locally as well and I can confirm that this patch will fix it
successfully.
Here's my reproduction procedure:
# cd /root/linux/
# make -C tools/testing/selftests/ install INSTALL_PATH=/root/test-dir/
# cd /root/test-dir/
# ./run_kselftest.sh -c damon
and I got the following error,
TAP version 13
1..13
# timeout set to 45
# selftests: damon: sysfs.sh
# ./sysfs.sh: line 4: _common.sh: No such file or directory
# ./sysfs.sh: line 369: check_dependencies: command not found
ok 1 selftests: damon: sysfs.sh
with Alexandre's patch applied, I got this,
TAP version 13
1..13
# timeout set to 45
# selftests: damon: sysfs.sh
ok 1 selftests: damon: sysfs.sh
The root cause was my misunderstanding of the TEST_FILES macro. I've now
refined the testing methodology - thanks all for the guidance.
Tested-by: Enze Li <lienze@kylinos.cn>
Best Regards,
Enze
>> > Fixes: 511914506d19 ("selftests/damon: introduce _common.sh to host shared function")
>> > Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
>> > ---
>
> Tested-by: Sang-Heon Jeon <ekffu200098@gmail.com>
>
>> > tools/testing/selftests/damon/Makefile | 1 +
>> > 1 file changed, 1 insertion(+)
>> >
>> > diff --git a/tools/testing/selftests/damon/Makefile b/tools/testing/selftests/damon/Makefile
>> > index 5b230deb19e8ee6cee56eb8f18c35e12f331e8b7..ddc69e8bde2905ff1c461a08f2ad008e6b28ac87 100644
>> > --- a/tools/testing/selftests/damon/Makefile
>> > +++ b/tools/testing/selftests/damon/Makefile
>> > @@ -4,6 +4,7 @@
>> > TEST_GEN_FILES += access_memory access_memory_even
>> >
>> > TEST_FILES = _damon_sysfs.py
>> > +TEST_FILES += _common.sh
>> >
>> > # functionality tests
>> > TEST_PROGS += sysfs.sh
>> >
>> > ---
>> > base-commit: 2754d549af31f8f029f02d02cd8e574676229b3d
>>
>> Does this commit exist in `mm-new` or `damon-next`? I failed to setup
>> the same base-commit environment.
>
> However, I'm still not sure that this patch is in the correct
> baseline. maybe it will not cause any problems with the merge
> though... but I'm not sure. So I didn't add a reviewed-by tag.
>
>> > change-id: 20250812-alex-fixes_manual-aed3ef75dd83
>> >
>> > Best regards,
>> > --
>> > Alexandre Ghiti <alexghiti@rivosinc.com>
>> >
>> >
>>
>> Thank you for great work!
>>
>> Best Regards.
>> Sang-Heon Jeon
>
> Best Regards.
> Sang-Heon Jeon
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-08-13 3:04 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-12 8:12 [PATCH] selftests/damon: fix damon selftests by installing _common.sh Alexandre Ghiti
2025-08-12 12:32 ` Sang-Heon Jeon
2025-08-12 13:27 ` Sang-Heon Jeon
2025-08-12 17:20 ` SeongJae Park
2025-08-13 1:49 ` Sang-Heon Jeon
2025-08-13 3:04 ` q[PATCH] " Enze Li
2025-08-12 17:13 ` [PATCH] " SeongJae Park
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).