From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Tamir Duberstein <tamird@gmail.com>
Cc: David Gow <davidgow@google.com>, Petr Mladek <pmladek@suse.com>,
Steven Rostedt <rostedt@goodmis.org>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
Andrew Morton <akpm@linux-foundation.org>,
Shuah Khan <shuah@kernel.org>,
Geert Uytterhoeven <geert@linux-m68k.org>,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH v7 1/3] scanf: remove redundant debug logs
Date: Tue, 11 Feb 2025 19:15:02 +0200 [thread overview]
Message-ID: <Z6uFlh6TgXTnwHI-@smile.fi.intel.com> (raw)
In-Reply-To: <CAJ-ks9=xqXsEp1_PP82qr_WDm_OF_uW2eKQfqC5+aDapWdoJ2w@mail.gmail.com>
On Tue, Feb 11, 2025 at 11:02:59AM -0500, Tamir Duberstein wrote:
> On Tue, Feb 11, 2025 at 10:58 AM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> > On Tue, Feb 11, 2025 at 10:50:33AM -0500, Tamir Duberstein wrote:
> > > On Tue, Feb 11, 2025 at 10:42 AM Andy Shevchenko
> > > <andriy.shevchenko@linux.intel.com> wrote:
> > > > On Tue, Feb 11, 2025 at 10:13:37AM -0500, Tamir Duberstein wrote:
> > > > > The test already prints the same information on failure; remove
> > > > > redundant pr_debug() logs.
...
> > > > > - pr_debug("\"%s\", \"%s\" ->\n", str, fmt); \
> > > >
> > > > What *if* the n_args == 0 here?
> > >
> > > Then there's no assertion in this block, so the test cannot possibly fail here.
> >
> > Correct, but I'm talking about this in a scope of the removed debug print.
> > I.o.w. how would we even know that this was the case?
> >
> > (I'm not objecting removal, what I want from you is to have a descriptive and
> > explanatory commit message that's answers to "why is this needed?" and "why is
> > it safe to do?")
>
> The true answer to "why is this needed" is Petr requested it in
> https://lore.kernel.org/all/Z6s2eqh0jkYHntUL@pathway.suse.cz/ (again,
> lore is having issues):
>
> On Tue, Feb 11, 2025 at 6:37 AM Petr Mladek <pmladek@suse.com> wrote:
[...]
> > But when thinking more about it. I think that even pr_debug() is not
> > the right solution.
> >
> > IMHO, we really want to print these details only when the test fails.
> >
> > Best Regards,
> > Petr
>
> The commit message already answers "why is it safe to do":
Not really. It answers that "why is it safe to do when test case fails?".
> > The test already prints the same information on failure; remove
> > redundant pr_debug() logs.
>
> Perhaps what you're asking for is an assertion to be added if n_args
> == 0? I think that would make sense. Does it belong in this series?
I don't know if it's possible case. I don't know if we need an assertion.
Please, research.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2025-02-11 17:15 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-11 15:13 [PATCH v7 0/3] scanf: convert self-test to KUnit Tamir Duberstein
2025-02-11 15:13 ` [PATCH v7 1/3] scanf: remove redundant debug logs Tamir Duberstein
2025-02-11 15:42 ` Andy Shevchenko
2025-02-11 15:50 ` Tamir Duberstein
2025-02-11 15:58 ` Andy Shevchenko
2025-02-11 16:02 ` Tamir Duberstein
2025-02-11 17:15 ` Andy Shevchenko [this message]
2025-02-11 17:50 ` Tamir Duberstein
2025-02-11 15:13 ` [PATCH v7 2/3] scanf: convert self-test to KUnit Tamir Duberstein
2025-02-11 15:13 ` [PATCH v7 3/3] scanf: break kunit into test cases Tamir Duberstein
2025-02-11 15:40 ` [PATCH v7 0/3] scanf: convert self-test to KUnit Andy Shevchenko
2025-02-11 15:47 ` Tamir Duberstein
2025-02-11 15:54 ` Andy Shevchenko
2025-02-11 15:57 ` Tamir Duberstein
2025-02-11 17:17 ` Andy Shevchenko
2025-02-11 17:26 ` Tamir Duberstein
2025-02-12 16:54 ` Tamir Duberstein
2025-02-14 13:33 ` Petr Mladek
2025-02-14 15:39 ` Tamir Duberstein
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=Z6uFlh6TgXTnwHI-@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=davidgow@google.com \
--cc=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=senozhatsky@chromium.org \
--cc=shuah@kernel.org \
--cc=tamird@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox