Skip to contentSkip to conversation

selftests/damon: change wrong json.dump usage to json.dumps

PATCH In review Sang-Heon Jeon 2 participants 2 messages Aug 16, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 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.

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

---
Changes from v1 [1]:
- Change patch subject with DAMON convention
- Add branch hint to fixes section

[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
index f557587ebc81..2c65cffe6b54 100755
@@ -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
maintainer Reviewed-by on v2 1/1
#1 lore raw

+ Andrew

Quoted 5 lines · On Sat, 16 Aug 2025 10:40:33 +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") # mm-unstable
Quoted 6 lines

---
Changes from v1 [1]:
- Change patch subject with DAMON convention
- Add branch hint to fixes section

[1] https://lore.kernel.org/damon/[email protected]/

Thanks,
SJ

[...]