linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] selftests/damon: change wrong json.dump usage to json.dumps
@ 2025-08-15  9:40 Sang-Heon Jeon
  2025-08-15 17:09 ` SeongJae Park
  0 siblings, 1 reply; 3+ messages in thread
From: Sang-Heon Jeon @ 2025-08-15  9:40 UTC (permalink / raw)
  To: sj, honggyu.kim; +Cc: damon, linux-mm, Sang-Heon Jeon

To print drgn status to stdout json.dumps should be used without
json.dump. Change incorrect function call by typo.

Fixes: 441f487d6ebf ("selftests/damon: test no-op commit broke DAMON status")
Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
---
First I'm sorry that make you guys work twice. This is fix of my last
patch [1]. I'll be more careful next time.

[1] https://lore.kernel.org/damon/20250810124354.16456-1-ekffu200098@gmail.com/

---
 tools/testing/selftests/damon/sysfs_no_op_commit_break.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/damon/sysfs_no_op_commit_break.py b/tools/testing/selftests/damon/sysfs_no_op_commit_break.py
index f557587ebc81..2c65cffe6b54 100755
--- a/tools/testing/selftests/damon/sysfs_no_op_commit_break.py
+++ b/tools/testing/selftests/damon/sysfs_no_op_commit_break.py
@@ -62,8 +62,8 @@ def main():
         exit(1)
 
     if before_commit_status != after_commit_status:
-        print(f'before: {json.dump(before_commit_status, indent=2)}')
-        print(f'after: {json.dump(after_commit_status, indent=2)}')
+        print(f'before: {json.dumps(before_commit_status, indent=2)}')
+        print(f'after: {json.dumps(after_commit_status, indent=2)}')
         exit(1)
 
     kdamonds.stop()
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] selftests/damon: change wrong json.dump usage to json.dumps
  2025-08-15  9:40 [PATCH] selftests/damon: change wrong json.dump usage to json.dumps Sang-Heon Jeon
@ 2025-08-15 17:09 ` SeongJae Park
  2025-08-16  1:30   ` Sang-Heon Jeon
  0 siblings, 1 reply; 3+ messages in thread
From: SeongJae Park @ 2025-08-15 17:09 UTC (permalink / raw)
  To: Sang-Heon Jeon; +Cc: SeongJae Park, honggyu.kim, damon, linux-mm

On Fri, 15 Aug 2025 18:40:29 +0900 Sang-Heon Jeon <ekffu200098@gmail.com> wrote:

> To print drgn status to stdout json.dumps should be used without
> json.dump. Change incorrect function call by typo.
> 
> Fixes: 441f487d6ebf ("selftests/damon: test no-op commit broke DAMON status")

Seems the fixee commit is on mm-unstable now.  Since this commit ids on the
tree is unreliable, I usually add a comment, like below.

    Fixes: 441f487d6ebf ("selftests/damon: test no-op commit broke DAMON status") # mm-unstable

Also, add the destination branch on patch subject prefix, like,

    [PATCH mm-unstable] selftests/damon: change wrong json.dump usage to json.dumps

These are only my personal and undocumented conventions.  I'm not sure if this
helps others, but it would help me.  Please consider using these conventions
for DAMON patches in future.  I'll document this on DAMON maintainer-profile
document.

> Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>

Reviewed-by: SeongJae Park <sj@kernel.org>

> ---
> First I'm sorry that make you guys work twice. This is fix of my last
> patch [1]. I'll be more careful next time.
> 
> [1] https://lore.kernel.org/damon/20250810124354.16456-1-ekffu200098@gmail.com/

Thank you for clarifying the context.


Thanks,
SJ

[...]


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] selftests/damon: change wrong json.dump usage to json.dumps
  2025-08-15 17:09 ` SeongJae Park
@ 2025-08-16  1:30   ` Sang-Heon Jeon
  0 siblings, 0 replies; 3+ messages in thread
From: Sang-Heon Jeon @ 2025-08-16  1:30 UTC (permalink / raw)
  To: SeongJae Park; +Cc: honggyu.kim, damon, linux-mm

On Sat, Aug 16, 2025 at 2:09 AM SeongJae Park <sj@kernel.org> wrote:
>
> On Fri, 15 Aug 2025 18:40:29 +0900 Sang-Heon Jeon <ekffu200098@gmail.com> wrote:
>
> > To print drgn status to stdout json.dumps should be used without
> > json.dump. Change incorrect function call by typo.
> >
> > Fixes: 441f487d6ebf ("selftests/damon: test no-op commit broke DAMON status")
>
> Seems the fixee commit is on mm-unstable now.  Since this commit ids on the
> tree is unreliable, I usually add a comment, like below.
>
>     Fixes: 441f487d6ebf ("selftests/damon: test no-op commit broke DAMON status") # mm-unstable

I'll keep it my mind.

> Also, add the destination branch on patch subject prefix, like,
>
>     [PATCH mm-unstable] selftests/damon: change wrong json.dump usage to json.dumps
>
> These are only my personal and undocumented conventions.  I'm not sure if this
> helps others, but it would help me.  Please consider using these conventions
> for DAMON patches in future.  I'll document this on DAMON maintainer-profile
> document.

Sure, I'll follow your convention. Maybe If I don't follow, it just
means that I couldn't understand your comment and future document
well, haha.

> > Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
>
> Reviewed-by: SeongJae Park <sj@kernel.org>
>
> > ---
> > First I'm sorry that make you guys work twice. This is fix of my last
> > patch [1]. I'll be more careful next time.
> >
> > [1] https://lore.kernel.org/damon/20250810124354.16456-1-ekffu200098@gmail.com/
>
> Thank you for clarifying the context.
>

The pleasure is mine.

> Thanks,
> SJ
>
> [...]

Best Regards.
Sang-Heon Jeon


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-08-16  1:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-15  9:40 [PATCH] selftests/damon: change wrong json.dump usage to json.dumps Sang-Heon Jeon
2025-08-15 17:09 ` SeongJae Park
2025-08-16  1:30   ` Sang-Heon Jeon

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).