All of lore.kernel.org
 help / color / mirror / Atom feed
From: Amir Goldstein <amir73il@gmail.com>
To: Dave Chinner <david@fromorbit.com>, eguan@redhat.com
Cc: fstests@vger.kernel.org
Subject: [PATCH 2/2] fstests: run xfs_io as multi threaded process
Date: Fri, 14 Oct 2016 23:43:30 +0300	[thread overview]
Message-ID: <1476477810-17478-2-git-send-email-amir73il@gmail.com> (raw)
In-Reply-To: <1476477810-17478-1-git-send-email-amir73il@gmail.com>

Try to run xfs_io in all tests with command line option -M
which starts an idle thread before performing any io.

The purpose of this idle thread is to test io from a multi threaded
process. With single threaded process, the file table is not shared
and file structs are not reference counted.

So in order to improve the change of detecting file struct reference
leaks, all xfs_io commands in tests will try to run with this option.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
---
 common/rc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/common/rc b/common/rc
index c3da064..64bf341 100644
--- a/common/rc
+++ b/common/rc
@@ -3799,6 +3799,10 @@ init_rc()
 	xfs_io -c stat $TEST_DIR 2>&1 | grep -q "is not on an XFS filesystem" && \
 	export XFS_IO_PROG="$XFS_IO_PROG -F"
 
+	# Figure out if we can add -M (run as multi threaded) option to xfs_io
+	$XFS_IO_PROG -M -c quit 2>&1 | grep -q "invalid option" || \
+	export XFS_IO_PROG="$XFS_IO_PROG -M"
+
 	# xfs_copy doesn't work on v5 xfs yet without -d option
 	if [ "$FSTYP" == "xfs" ] && [[ $MKFS_OPTIONS =~ crc=1 ]]; then
 		export XFS_COPY_PROG="$XFS_COPY_PROG -d"
-- 
2.7.4


  reply	other threads:[~2016-10-14 20:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-14 20:43 [PATCH 1/2] fstests: fix call sites that used xfs_io directly Amir Goldstein
2016-10-14 20:43 ` Amir Goldstein [this message]
2016-10-15  9:11   ` [PATCH 2/2] fstests: run xfs_io as multi threaded process Christoph Hellwig
2016-10-15 15:13     ` Amir Goldstein
2016-10-15 17:04       ` Christoph Hellwig
2016-10-15 20:59         ` Amir Goldstein
2016-10-16  7:14           ` Christoph Hellwig
2016-10-16  8:51             ` Amir Goldstein

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=1476477810-17478-2-git-send-email-amir73il@gmail.com \
    --to=amir73il@gmail.com \
    --cc=david@fromorbit.com \
    --cc=eguan@redhat.com \
    --cc=fstests@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.