From: Breno Leitao <leitao@debian.org>
To: Petr Machata <petrm@nvidia.com>
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, Shuah Khan <shuah@kernel.org>,
netdev@vger.kernel.org, David Wei <dw@davidwei.uk>,
Willem de Bruijn <willemb@google.com>,
open list <linux-kernel@vger.kernel.org>,
"open list:KERNEL SELFTEST FRAMEWORK"
<linux-kselftest@vger.kernel.org>,
Geliang Tang <geliang@kernel.org>,
Hangbin Liu <liuhangbin@gmail.com>,
Matthieu Baerts <matttbe@kernel.org>
Subject: Re: [PATCH net-next v2] net: netconsole: selftests: Create a new netconsole selftest
Date: Wed, 14 Aug 2024 09:07:46 -0700 [thread overview]
Message-ID: <ZrzWUg4SGJv7Byp6@gmail.com> (raw)
In-Reply-To: <87r0arl5qw.fsf@nvidia.com>
On Wed, Aug 14, 2024 at 12:24:46PM +0200, Petr Machata wrote:
>
> Breno Leitao <leitao@debian.org> writes:
> > + fi
> > +
> > + if ! grep -q "${MSG}" "${TMPFILENAME}"; then
> > + echo "FAIL: ${MSG} not found in ${TMPFILENAME}" >&2
> > + cat "${TMPFILENAME}" >&2
> > + return ${ksft_fail}
> > + fi
> > +
> > + # Delete the file once it is validated, otherwise keep it
> > + # for debugging purposes
> > + rm "${TMPFILENAME}"
>
> Seeing the removal within the validation function is odd, I would expect
> it to be part of cleanup().
Thanks for all the other feedbacks, all of them make sense.
Regarding this one, I kept like this, because I only remove the file if
the test succeed, otherwise I keep the file here for debugging purposes,
as described in the comment above.
If that is not a good practice, I am more than happy to move this
to cleanup.
Thanks for the detailed review,
--breno
next prev parent reply other threads:[~2024-08-14 16:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-13 18:38 [PATCH net-next v2] net: netconsole: selftests: Create a new netconsole selftest Breno Leitao
2024-08-13 22:37 ` Jakub Kicinski
2024-08-14 8:31 ` Breno Leitao
2024-08-14 10:24 ` Petr Machata
2024-08-14 11:31 ` Matthieu Baerts
2024-08-14 16:07 ` Breno Leitao [this message]
2024-08-15 7:56 ` Hangbin Liu
2024-08-15 8:15 ` Breno Leitao
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=ZrzWUg4SGJv7Byp6@gmail.com \
--to=leitao@debian.org \
--cc=davem@davemloft.net \
--cc=dw@davidwei.uk \
--cc=edumazet@google.com \
--cc=geliang@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=liuhangbin@gmail.com \
--cc=matttbe@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=petrm@nvidia.com \
--cc=shuah@kernel.org \
--cc=willemb@google.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;
as well as URLs for NNTP newsgroup(s).