lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZrzWUg4SGJv7Byp6@gmail.com>
Date: Wed, 14 Aug 2024 09:07:46 -0700
From: Breno Leitao <leitao@...ian.org>
To: Petr Machata <petrm@...dia.com>
Cc: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
	pabeni@...hat.com, Shuah Khan <shuah@...nel.org>,
	netdev@...r.kernel.org, David Wei <dw@...idwei.uk>,
	Willem de Bruijn <willemb@...gle.com>,
	open list <linux-kernel@...r.kernel.org>,
	"open list:KERNEL SELFTEST FRAMEWORK" <linux-kselftest@...r.kernel.org>,
	Geliang Tang <geliang@...nel.org>,
	Hangbin Liu <liuhangbin@...il.com>,
	Matthieu Baerts <matttbe@...nel.org>
Subject: Re: [PATCH net-next v2] net: netconsole: selftests: Create a new
 netconsole selftest

On Wed, Aug 14, 2024 at 12:24:46PM +0200, Petr Machata wrote:
> 
> Breno Leitao <leitao@...ian.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ