selftests/damon: change wrong json.dump usage to json.dumps
Subsystems (3)
PATCH 1/1 selftests/damon: change wrong json.dump usage to json.dumps
To print drgn status to stdout json.dumps should be used without json.dump. Change incorrect function call by typo.
---
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/[email protected]/
--- tools/testing/selftests/damon/sysfs_no_op_commit_break.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tools/testing/selftests/damon/sysfs_no_op_commit_break.py +2 -2
@@ -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()
Signature · 1 line
2.43.0
Quoted 4 lines · On Fri, 15 Aug 2025 18:40:29 +0900 Sang-Heon Jeon <[email protected]> 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.
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.
Quoted 1 line
Signed-off-by Sang-Heon Jeon <[email protected]>
Quoted 5 lines
---
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.
Thank you for clarifying the context.
Thanks,
SJ
[...]
Quoted 6 lines · SeongJae Park
Quoted 3 lines · On Fri, 15 Aug 2025 18:40:29 +0900 Sang-Heon Jeon <[email protected]> wrote:
To print drgn status to stdout json.dumps should be used without json.dump. Change incorrect function call by typo.
Quoted 6 lines
Quoted 1 line
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.
Quoted 8 lines
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.
Quoted 4 lines
Quoted 1 line
Signed-off-by Sang-Heon Jeon <[email protected]>Reviewed-by SeongJae Park <[email protected]>
Quoted 8 lines
Quoted 5 lines
---
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.Thank you for clarifying the context.
The pleasure is mine.
Quoted 4 lines
Thanks,
SJ[...]
Best Regards.
Sang-Heon Jeon