All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: eguan@redhat.com
Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org
Subject: [PATCH 5/4] generic/173: don't dump core when mwrite fails
Date: Wed, 30 Aug 2017 15:31:10 -0700	[thread overview]
Message-ID: <20170830223110.GA4754@magnolia> (raw)
In-Reply-To: <150406805060.31349.16766271336969357123.stgit@magnolia>

In generic/173, we try to force a CoW to a mmap'd region to fail if
there's no space to actually stage the CoW operation.  That failure
comes in the form of a SIGBUS to xfs_io.  If the tester just happens to
have a nonzero coresize ulimit set, a core dump is generated and the
test is marked as having failed, even though the dump generation is
exactly the correct behavior.

Therefore, set the coresize ulimit to zero while calling _mwrite_byte.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 tests/generic/173 |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/generic/173 b/tests/generic/173
index ad4e5da..526590b 100755
--- a/tests/generic/173
+++ b/tests/generic/173
@@ -81,6 +81,8 @@ _fill_fs $((blksz * nr_free)) $testdir/space $blksz 0 >> $seqres.full 2>&1
 sync
 
 echo "mmap CoW the big file"
+core_ulimit="$(ulimit -c)"
+ulimit -c 0
 out="$(_mwrite_byte 0x62 0 $((blksz * nr_blks)) $((blksz * nr_blks)) $testdir/bigfile 2>&1)"
 err="$?"
 if [ $err -lt 128 ]; then
@@ -95,6 +97,7 @@ err="$?"
 if [ $err -lt 128 ]; then
 	echo "mmap CoW should have failed with SIGBUS, got SIG$(kill -l $err)"
 fi
+ulimit -c "${core_ulimit}"
 
 # success, all done
 status=0

  parent reply	other threads:[~2017-08-30 22:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-30  4:40 [PATCH 1/4] xfs/{319,323}: don't checksum files after log recovery Darrick J. Wong
2017-08-30  4:40 ` [PATCH 2/4] xfs/013: exit cleaner thread if fsstress dies Darrick J. Wong
2017-08-30  7:51   ` Christoph Hellwig
2017-08-30  4:41 ` [PATCH 3/4] xfs: test rmapbt updates are correct with insert/collapse range Darrick J. Wong
2017-08-30  7:53   ` Christoph Hellwig
2017-08-30 22:58     ` Darrick J. Wong
2017-08-31 10:28   ` Eryu Guan
2017-08-31 14:47   ` [PATCH v2 " Darrick J. Wong
2017-08-30  4:41 ` [PATCH 4/4] generic: try various unicode normalization games Darrick J. Wong
2017-08-30 22:52   ` [PATCH v2 " Darrick J. Wong
2017-08-30 22:31 ` Darrick J. Wong [this message]
2017-08-30 22:31 ` [PATCH 6/4] common/rc: fix xfs_io scrub command existence test Darrick J. Wong
2017-08-30 22:32 ` [PATCH 7/4] xfs/122: fix the size of fsop_ag_resblks structure 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=20170830223110.GA4754@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=eguan@redhat.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.