From: David Disseldorp <ddiss@suse.de>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: fstests@vger.kernel.org, tytso@mit.edu
Subject: Re: [PATCH v3 5/5] check: add -L <n> parameter to rerun failed tests
Date: Thu, 7 Jul 2022 20:09:36 +0200 [thread overview]
Message-ID: <20220707200936.66d1b30d@suse.de> (raw)
In-Reply-To: <20220706235452.694341f0@suse.de>
On Wed, 6 Jul 2022 23:54:52 +0200, David Disseldorp wrote:
> Thanks for the follow-up feedback, Darrick...
>
> On Wed, 6 Jul 2022 12:00:07 -0700, Darrick J. Wong wrote:
...
> > >
> > > +# retain files which would be overwritten in subsequent reruns of the same test
> > > +_stash_fail_loop_files() {
> > > + local test_seq="$1"
> > > + local suffix="$2"
> > > +
> > > + for i in "${REPORT_DIR}/${test_seq}.full" \
> > > + "${REPORT_DIR}/${test_seq}.dmesg" \
> > > + "${REPORT_DIR}/${test_seq}.out.bad"; do
> > > + [ -f "$i" ] && cp "$i" "${i}${suffix}"
> >
> > I wonder, is there any particular reason to copy the output file and let
> > it get overwritten instead of simply mv'ing it?
>
> The copy is left over from an earlier version I had where xunit report
> generation was done after the copy. Looking closer:
> - .full is removed in _begin_fstest()
> - _check_dmesg() overwrites .dmesg and retains on failure or KEEP_DMESG
> - out.bad is removed in the main check loop prior to seq invocation
> - .notrun, .core and .hints are also removed in the check loop at
> various places before seq (.hints again in _begin_fstest())
>
> One concern I have in changing this to a move is that external scripts
> may check for presence / parse these files after check invocation. I'd
> considered moving and then copying / symlinking back the .rerun0 files
> on rerun-on-failure loop completion but that's also pretty ugly. IMO
> leaving this as a copy, with the non-suffix file state left to reflect
> the results of the last rerun-on-failure loop, would make the most
> sense for now.
As a follow up here, I plan on squashing in the following change to
cover the extra notrun, core and hints files, and also avoid stale
.rerun# state:
--- a/check
+++ b/check
@@ -560,13 +560,14 @@ _expunge_test()
# retain files which would be overwritten in subsequent reruns of the same test
_stash_fail_loop_files() {
- local test_seq="$1"
- local suffix="$2"
+ local seq_prefix="${REPORT_DIR}/${1}"
+ local cp_suffix="$2"
- for i in "${REPORT_DIR}/${test_seq}.full" \
- "${REPORT_DIR}/${test_seq}.dmesg" \
- "${REPORT_DIR}/${test_seq}.out.bad"; do
- [ -f "$i" ] && cp "$i" "${i}${suffix}"
+ for i in ".full" ".dmesg" ".out.bad" ".notrun" ".core" ".hints"; do
+ rm -f "${seq_prefix}${i}${cp_suffix}"
+ if [ -f "${seq_prefix}${i}" ]; then
+ cp "${seq_prefix}${i}" "${seq_prefix}${i}${cp_suffix}"
+ fi
done
}
Cheers, David
next prev parent reply other threads:[~2022-07-07 18:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-06 11:23 [PATCH v3 0/5] check: add option to rerun failed tests David Disseldorp
2022-07-06 11:23 ` [PATCH v3 1/5] report: use array for REPORT_ENV_LIST David Disseldorp
2022-07-06 11:23 ` [PATCH v3 2/5] report: pass through most details as function parameters David Disseldorp
2022-07-06 11:23 ` [PATCH v3 3/5] check: make a few variables local David Disseldorp
2022-07-06 11:23 ` [PATCH v3 4/5] check: append bad / notrun arrays in helper function David Disseldorp
2022-07-06 18:33 ` Darrick J. Wong
2022-07-06 11:23 ` [PATCH v3 5/5] check: add -L <n> parameter to rerun failed tests David Disseldorp
2022-07-06 19:00 ` Darrick J. Wong
2022-07-06 21:54 ` David Disseldorp
2022-07-07 18:09 ` David Disseldorp [this message]
2022-07-08 0:34 ` Zorro Lang
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=20220707200936.66d1b30d@suse.de \
--to=ddiss@suse.de \
--cc=djwong@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=tytso@mit.edu \
/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