On Tue, Jun 28, 2022 at 12:22:56AM +0200, David Disseldorp wrote: > These files would otherwise be overwritten. > > Signed-off-by: David Disseldorp <ddiss@xxxxxxx> Why not fold this into the previous patch? --D > --- > check | 13 +++++++++++-- > 1 file changed, 11 insertions(+), 2 deletions(-) > > diff --git a/check b/check > index 726c83d9..baf336da 100755 > --- a/check > +++ b/check > @@ -570,8 +570,17 @@ _stash_test_status() { > "$report_msg" > fi > > - # only stash result for first failure (triggering loop) > - ((loop_num > 1)) && return > + if ((loop_num > 0)); then > + # retain files which would be overwritten in subsequent reruns > + for i in "${REPORT_DIR}/${test_seq}.full" \ > + "${REPORT_DIR}/${test_seq}.dmesg" \ > + "${REPORT_DIR}/${test_seq}.out.bad"; do > + [ -f "$i" ] || continue > + cp "$i" "${i}.rerun$((loop_num - 1))" > + done > + # only stash result for first failure (triggering loop) > + ((loop_num != 1)) && return > + fi > > case "$test_status" in > fail) > -- > 2.35.3 >