All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kuan-Wei Chiu <visitorckw@gmail.com>
To: Gabriele Monaco <gmonaco@redhat.com>
Cc: linux-kernel@vger.kernel.org,
	Steven Rostedt <rostedt@goodmis.org>,
	Nam Cao <namcao@linutronix.de>,
	linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH] verification/rvgen: Use .old instead of .bak for kunit backup files
Date: Mon, 24 Aug 2026 23:33:13 +0800	[thread overview]
Message-ID: <aoxkOQ_P4CYWaKiw@google.com> (raw)
In-Reply-To: <20260824081519.81103-2-gmonaco@redhat.com>

On Mon, Aug 24, 2026 at 10:15:19AM +0200, Gabriele Monaco wrote:
> 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")
> Signed-off-by: Gabriele Monaco <gmonaco@redhat.com>

Thanks for the quick fix!
The working tree now remains clean after running make distclean.

Tested-by: Kuan-Wei Chiu <visitorckw@gmail.com>

Regards,
Kuan-Wei

> ---
>  tools/verification/rvgen/rvgen/kunit.py                         | 2 +-
>  .../{test_bak_kunit_kunit.c.bak => test_bak_kunit_kunit.c.old}  | 0
>  2 files changed, 1 insertion(+), 1 deletion(-)
>  rename tools/verification/rvgen/tests/golden/test_bak_kunit/{test_bak_kunit_kunit.c.bak => test_bak_kunit_kunit.c.old} (100%)
> 
> 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
> similarity index 100%
> rename from tools/verification/rvgen/tests/golden/test_bak_kunit/test_bak_kunit_kunit.c.bak
> rename to tools/verification/rvgen/tests/golden/test_bak_kunit/test_bak_kunit_kunit.c.old
> 
> base-commit: 0a0d1d55dad570724bf8c7ea83409639cfb4be9b
> -- 
> 2.55.0
> 

  parent reply	other threads:[~2026-08-24 15:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-24  8:15 [PATCH] verification/rvgen: Use .old instead of .bak for kunit backup files Gabriele Monaco
2026-08-24  8:28 ` sashiko-bot
2026-08-24 15:33 ` Kuan-Wei Chiu [this message]
2026-08-25  6:49 ` Nam Cao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aoxkOQ_P4CYWaKiw@google.com \
    --to=visitorckw@gmail.com \
    --cc=gmonaco@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=namcao@linutronix.de \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.