FS/XFS testing framework
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: Qu Wenruo <wqu@suse.com>
Cc: linux-btrfs@vger.kernel.org, fstests@vger.kernel.org
Subject: Re: [PATCH v2] fstests: generic/228: do not rely on the bash core dump output
Date: Thu, 4 Sep 2025 09:00:47 -0400	[thread overview]
Message-ID: <20250904130047.GB3267668@mit.edu> (raw)
In-Reply-To: <20250904061944.105518-1-wqu@suse.com>

On Thu, Sep 04, 2025 at 03:49:44PM +0930, Qu Wenruo wrote:
> [BUG]
> With bash 5.3.x, the test case generic/228 will always fail with the
> following golden output mismatch:
> 
> FSTYP         -- btrfs
> PLATFORM      -- Linux/x86_64 btrfs-vm 6.17.0-rc3-custom+ #281 SMP PREEMPT_DYNAMIC Thu Aug 28 11:15:21 ACST 2025
> MKFS_OPTIONS  -- /dev/mapper/test-scratch1
> MOUNT_OPTIONS -- /dev/mapper/test-scratch1 /mnt/scratch
> 
> generic/228 1s ... - output mismatch (see /home/adam/xfstests/results//generic/228.out.bad)
>     --- tests/generic/228.out	2025-09-04 15:15:08.965000000 +0930
>     +++ /home/adam/xfstests/results//generic/228.out.bad	2025-09-04 15:16:05.627457599 +0930
>     @@ -1,6 +1,6 @@
>      QA output created by 228
>      File size limit is now set to 100 MB.
>      Let us try to preallocate 101 MB. This should fail.
>     -File size limit exceeded
>     +File size limit exceeded   $XFS_IO_PROG -f -c 'falloc 0 101m' $TEST_DIR/ouch
>      Let us now try to preallocate 50 MB. This should succeed.
>      Test over.
>     ...
>     (Run 'diff -u /home/adam/xfstests/tests/generic/228.out /home/adam/xfstests/results//generic/228.out.bad'  to see the entire diff)
> Ran: generic/228
> Failures: generic/228
> Failed 1 of 1 tests
> 
> [CAUSE]
> The "File size limit exceeded" line is never from xfs_io, but the
> coredump from bash itself.
> 
> And with latest 5.3.x bash, it added extra dump during such core dump
> handling (even if we have explicitly skipped the coredump).
> 
> [FIX]
> Instead of relying on bash to do the coredump, which is unreliable
> between different bash versions as I have shown above, ignore the
> SIGXFSZ signal so that xfs_io will do the error output, which is more
> reliable than bash.
> 
> And since we do not need to bother the coredump behavior, remove all the
> cleanup and preparation for coredump.
> 
> Signed-off-by: Qu Wenruo <wqu@suse.com>

Makes sense, thanks for testing against the latest bash!

Reviewed-by: Theodore Ts'o <tytso@mit.edu>

      reply	other threads:[~2025-09-04 13:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-04  6:19 [PATCH v2] fstests: generic/228: do not rely on the bash core dump output Qu Wenruo
2025-09-04 13:00 ` Theodore Ts'o [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=20250904130047.GB3267668@mit.edu \
    --to=tytso@mit.edu \
    --cc=fstests@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=wqu@suse.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