diff options
| author | Gabriele Monaco <gmonaco@redhat.com> | 2026-08-24 10:15:19 +0200 |
|---|---|---|
| committer | Gabriele Monaco <gmonaco@redhat.com> | 2026-08-25 13:56:53 +0200 |
| commit | ab0304fd69b07605553e9f161d65ecf9ccc2e2fe (patch) | |
| tree | 8081934ff97c6b64c7f2cd2c21971118a10ea392 | |
| parent | 7d81675d1bb2cc6db61a2d93b1e0dc7fb0929f9c (diff) | |
| download | linux-next-ab0304fd69b07605553e9f161d65ecf9ccc2e2fe.tar.gz linux-next-ab0304fd69b07605553e9f161d65ecf9ccc2e2fe.zip | |
verification/rvgen: Use .old instead of .bak for kunit backup files
The rvgen kunit command generates .bak backup files and these can be
checked in for selftests (make check). Clean targets like make disclean
remove such files, leaving the tree dirty.
Switch to .old to preserve a clean tree after make disclean.
Reported-by: Kuan-Wei Chiu <visitorckw@gmail.com>
Closes: https://lore.kernel.org/lkml/aosuwKH5GOEo0xTN@google.com
Fixes: 7b6246294eb0 ("verification/rvgen: Add selftests for rvgen kunit")
Reviewed-by: Nam Cao <namcao@linutronix.de>
Tested-by: Kuan-Wei Chiu <visitorckw@gmail.com>
Link: https://lore.kernel.org/r/20260824081519.81103-2-gmonaco@redhat.com
Signed-off-by: Gabriele Monaco <gmonaco@redhat.com>
| -rw-r--r-- | tools/verification/rvgen/rvgen/kunit.py | 2 | ||||
| -rw-r--r-- | tools/verification/rvgen/tests/golden/test_bak_kunit/test_bak_kunit_kunit.c.old (renamed from tools/verification/rvgen/tests/golden/test_bak_kunit/test_bak_kunit_kunit.c.bak) | 0 |
2 files changed, 1 insertions, 1 deletions
diff --git a/tools/verification/rvgen/rvgen/kunit.py b/tools/verification/rvgen/rvgen/kunit.py index ed2082d7d3bc..85973f918c9b 100644 --- a/tools/verification/rvgen/rvgen/kunit.py +++ b/tools/verification/rvgen/rvgen/kunit.py @@ -173,7 +173,7 @@ EXPORT_SYMBOL_IF_KUNIT({struct_name}); for path in (header_file_path, kunit_c_file_path): if path.exists(): try: - path.rename(path.with_suffix(path.suffix + ".bak")) + path.rename(path.with_suffix(path.suffix + ".old")) except OSError as e: raise KUnitError(f"Error backing up file {path}: {e}") from e diff --git a/tools/verification/rvgen/tests/golden/test_bak_kunit/test_bak_kunit_kunit.c.bak b/tools/verification/rvgen/tests/golden/test_bak_kunit/test_bak_kunit_kunit.c.old index f747925bf542..f747925bf542 100644 --- a/tools/verification/rvgen/tests/golden/test_bak_kunit/test_bak_kunit_kunit.c.bak +++ b/tools/verification/rvgen/tests/golden/test_bak_kunit/test_bak_kunit_kunit.c.old |
