From: "Darrick J. Wong" <djwong@kernel.org>
To: Zorro Lang <zlang@redhat.com>
Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org
Subject: Re: [PATCH 2/2] check: optionally compress core dumps
Date: Fri, 7 Oct 2022 14:32:19 -0700 [thread overview]
Message-ID: <Y0Ca43bBFUTl5XHL@magnolia> (raw)
In-Reply-To: <20221007124526.wr2laws2c7rzujtv@zlang-mailbox>
On Fri, Oct 07, 2022 at 08:45:26PM +0800, Zorro Lang wrote:
> On Wed, Oct 05, 2022 at 03:31:21PM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@kernel.org>
> >
> > Compress coredumps whenever desired to save space.
> >
> > Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> > ---
> > README | 1 +
> > common/rc | 13 +++++++++++++
> > 2 files changed, 14 insertions(+)
> >
> >
> > diff --git a/README b/README
> > index 80d148be82..ec923ca564 100644
> > --- a/README
> > +++ b/README
> > @@ -241,6 +241,7 @@ Misc:
> > this option is supported for all filesystems currently only -overlay is
> > expected to run without issues. For other filesystems additional patches
> > and fixes to the test suite might be needed.
> > + - Set COMPRESS_COREDUMPS=1 to compress core dumps with gzip -9.
>
> This patch looks good to me, just one question I'm thinking -- should this
> parameter be under "Misc:" or "Tools specification:" part? If the former is
> good, then:
I was thinking misc, buuut it occurs to me that perhaps we ought to let
people specify a different compression program, e.g.
COMPRESS_COREDUMPS=xz ./check generic/444
in which case this would be a tool spec thing.
I think I'll go back and rework this to do that.
--D
> Reviewed-by: Zorro Lang <zlang@redhat.com>
>
>
> >
> > ______________________
> > USING THE FSQA SUITE
> > diff --git a/common/rc b/common/rc
> > index 9750d06a9a..d3af4e07b2 100644
> > --- a/common/rc
> > +++ b/common/rc
> > @@ -4955,12 +4955,25 @@ _save_coredump()
> > local core_hash="$(_md5_checksum "$path")"
> > local out_file="$RESULT_BASE/$seqnum.core.$core_hash"
> >
> > + if [ "$COMPRESS_COREDUMPS" = "1" ]; then
> > + out_file="${out_file}.gz"
> > + fi
> > +
> > if [ -s "$out_file" ]; then
> > rm -f "$path"
> > return
> > fi
> > rm -f "$out_file"
> >
> > + if [ "$COMPRESS_COREDUMPS" = "1" ]; then
> > + if gzip -9 < "$path" > "$out_file"; then
> > + rm -f "$path"
> > + else
> > + rm -f "$out_file"
> > + fi
> > + return
> > + fi
> > +
> > mv "$path" "$out_file"
> > }
> >
> >
>
next prev parent reply other threads:[~2022-10-07 21:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-05 22:31 [PATCHSET 0/2] fstests: improve coredump capture and storage Darrick J. Wong
2022-10-05 22:31 ` [PATCH 1/2] check: detect and preserve all coredumps made by a test Darrick J. Wong
2022-10-07 5:18 ` Zorro Lang
2022-10-07 21:29 ` Darrick J. Wong
2022-10-05 22:31 ` [PATCH 2/2] check: optionally compress core dumps Darrick J. Wong
2022-10-07 12:45 ` Zorro Lang
2022-10-07 21:32 ` Darrick J. Wong [this message]
2022-10-12 1:45 [PATCHSET v2 0/2] fstests: improve coredump capture and storage Darrick J. Wong
2022-10-12 1:45 ` [PATCH 2/2] check: optionally compress core dumps Darrick J. Wong
2022-10-13 11:51 ` Zorro Lang
2022-10-13 15:50 ` Darrick J. Wong
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=Y0Ca43bBFUTl5XHL@magnolia \
--to=djwong@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=zlang@redhat.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).