From: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
To: linux-block@vger.kernel.org
Cc: Daan De Meyer <daan@amutable.com>
Subject: Re: [PATCH blktests] check: avoid double calls of the cleanup function
Date: Mon, 30 Nov 2026 22:13:51 +0900 [thread overview]
Message-ID: <aw12gv5FV4R9EfMw@shinmob> (raw)
In-Reply-To: <20261123074217.1446119-1-shinichiro.kawasaki@wdc.com>
On Nov 23, 2026 / 16:42, Shin'ichiro Kawasaki wrote:
> Since the commit e25f27939668, the registered cleanup function is called
> twice: once from the explicit _cleanup() call in _call_test(), and once
> more from the EXIT trap when the test subshell exits. At the second
> call, TMPDIR has already been removed and unset, and the output is no
> longer redirected to the test output file.
>
> This was unnoticed because existing cleanup functions work fine at the
> second call. However, the cleanup function of the new test case added by
> GitHub PR 260 does not work well. It refers to TMPDIR to stop the nbd
> server, and the second call prints the error messages below:
>
> cat: /nbd.pid: No such file or directory
> tests/nbd/rc: line 87: kill: `': not a pid or valid job spec
>
> Avoid the second call by unsetting TEST_CLEANUP after calling it.
>
> Link: https://github.com/linux-blktests/blktests/pull/260
> Fixes: e25f27939668 ("check: Add the ability to call a cleanup function after a test ends")
> Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
FYI, I applied the patch.
prev parent reply other threads:[~2026-11-30 13:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 7:42 [PATCH blktests] check: avoid double calls of the cleanup function Shin'ichiro Kawasaki
2026-11-30 13:13 ` Shin'ichiro Kawasaki [this message]
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=aw12gv5FV4R9EfMw@shinmob \
--to=shinichiro.kawasaki@wdc.com \
--cc=daan@amutable.com \
--cc=linux-block@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox