linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luis Chamberlain <mcgrof@kernel.org>
To: Zorro Lang <zlang@redhat.com>
Cc: patches@lists.linux.dev, fstests@vger.kernel.org,
	linux-xfs@vger.kernel.org, linux-mm@kvack.org,
	linux-fsdevel@vger.kernel.org, akpm@linux-foundation.org,
	ziy@nvidia.com, vbabka@suse.cz, seanjc@google.com,
	willy@infradead.org, david@redhat.com, hughd@google.com,
	linmiaohe@huawei.com, muchun.song@linux.dev, osalvador@suse.de,
	p.raghav@samsung.com, da.gomez@samsung.com, hare@suse.de,
	john.g.garry@oracle.com
Subject: Re: [PATCH 2/5] fstests: add mmap page boundary tests
Date: Thu, 13 Jun 2024 14:05:27 -0700	[thread overview]
Message-ID: <ZmtfFwSS66PtVLry@bombadil.infradead.org> (raw)
In-Reply-To: <20240612080634.xmh45gdblvx3lgrc@dell-per750-06-vm-08.rhts.eng.pek2.redhat.com>

On Wed, Jun 12, 2024 at 04:06:34PM +0800, Zorro Lang wrote:
> On Mon, Jun 10, 2024 at 08:01:59PM -0700, Luis Chamberlain wrote:
> > +mwrite()
> > +{
> > +       local file=$1
> > +       local offset=$2
> > +       local length=$3
> > +       local map_len=${4:-$(_round_up_to_page_boundary $(_get_filesize $file)) }
> > +
> > +       # Some callers expect xfs_io to crash with SIGBUS due to the mread,
> > +       # causing the shell to print "Bus error" to stderr.  To allow this
> > +       # message to be redirected, execute xfs_io in a new shell instance.
> > +       # However, for this to work reliably, we also need to prevent the new
> > +       # shell instance from optimizing out the fork and directly exec'ing
> > +       # xfs_io.  The easiest way to do that is to append 'true' to the
> > +       # commands, so that xfs_io is no longer the last command the shell sees.
> > +       bash -c "trap '' SIGBUS; ulimit -c 0; \
> > +		$XFS_IO_PROG $file \
> > +               -c 'mmap -w 0 $map_len' \
> > +               -c 'mwrite $offset $length'; \
> > +	       true"
> > +}
> 
> As you've moved the _mread to common/rc, why not do the same for this mwrite?

I didn't move it as this mwrite() is only used by one test. Let me know
if you want me to move it.

  Luis

  reply	other threads:[~2024-06-13 21:05 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-11  3:01 [PATCH 0/5] fstests: add some new LBS inspired tests Luis Chamberlain
2024-06-11  3:01 ` [PATCH 1/5] common: move mread() to generic helper _mread() Luis Chamberlain
2024-06-11 14:28   ` Darrick J. Wong
2024-06-11  3:01 ` [PATCH 2/5] fstests: add mmap page boundary tests Luis Chamberlain
2024-06-11 16:48   ` Darrick J. Wong
2024-06-11 18:10     ` Luis Chamberlain
2024-06-11 18:46       ` Darrick J. Wong
2024-06-11 20:29         ` Luis Chamberlain
2024-06-12  8:06   ` Zorro Lang
2024-06-13 21:05     ` Luis Chamberlain [this message]
2024-06-11  3:02 ` [PATCH 3/5] fstests: add fsstress + compaction test Luis Chamberlain
2024-06-11 14:48   ` Darrick J. Wong
2024-06-12  8:00   ` Zorro Lang
2024-06-13 21:10     ` Luis Chamberlain
2024-06-11  3:02 ` [PATCH 4/5] _require_debugfs(): simplify and fix for debian Luis Chamberlain
2024-06-11 14:35   ` Darrick J. Wong
2024-06-12  7:51   ` Zorro Lang
2024-06-11  3:02 ` [PATCH 5/5] fstests: add stress truncation + writeback test Luis Chamberlain
2024-06-11 14:45   ` Darrick J. Wong
2024-06-11 18:15     ` Luis Chamberlain
2024-06-11 18:29       ` Darrick J. Wong
2024-06-11 18:59         ` Luis Chamberlain

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=ZmtfFwSS66PtVLry@bombadil.infradead.org \
    --to=mcgrof@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=da.gomez@samsung.com \
    --cc=david@redhat.com \
    --cc=fstests@vger.kernel.org \
    --cc=hare@suse.de \
    --cc=hughd@google.com \
    --cc=john.g.garry@oracle.com \
    --cc=linmiaohe@huawei.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=muchun.song@linux.dev \
    --cc=osalvador@suse.de \
    --cc=p.raghav@samsung.com \
    --cc=patches@lists.linux.dev \
    --cc=seanjc@google.com \
    --cc=vbabka@suse.cz \
    --cc=willy@infradead.org \
    --cc=ziy@nvidia.com \
    --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).