All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
To: <eguan@linux.alibaba.com>
Cc: <fstests@vger.kernel.org>, Yang Xu <xuyang2018.jy@cn.fujitsu.com>
Subject: [PATCH v2] generic/{569,570}: use _filter_xfs_io_error to filter pwrite64
Date: Fri, 25 Oct 2019 17:19:00 +0800	[thread overview]
Message-ID: <1571995140-10915-1-git-send-email-xuyang2018.jy@cn.fujitsu.com> (raw)
In-Reply-To: <20191025085426.GG67926@e18g06458.et15sqa>

When I backport fix commits into old kernel, pwrite action will report
"pwrite64: Text file busy". Since xfsprogs without commit 2f9a125c3a39
("xfsprogs: replace pread64/pwrite64 by equivalent pread/pwrite"), it
will report pwrite64. I think these kernel patchs are simple, old kernel
with lower version xfsprogs may backport these commits. So filter it.

Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
---
 tests/generic/569 | 4 ++--
 tests/generic/570 | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/generic/569 b/tests/generic/569
index 02fd8574..4573be5a 100755
--- a/tests/generic/569
+++ b/tests/generic/569
@@ -52,8 +52,8 @@ done
 swapon $testfile 2>&1 | _filter_scratch
 
 # Can we write to it?
-$XFS_IO_PROG -c 'pwrite -S 0x59 64k 64k' $testfile
-$XFS_IO_PROG -d -c 'pwrite -S 0x60 64k 64k' $testfile
+$XFS_IO_PROG -c 'pwrite -S 0x59 64k 64k' $testfile 2>&1 | _filter_xfs_io_error
+$XFS_IO_PROG -d -c 'pwrite -S 0x60 64k 64k' $testfile 2>&1 | _filter_xfs_io_error
 $XFS_IO_PROG -c 'mmap -rw 64k 64k' -c 'mwrite -S 0x61 64k 64k' $testfile
 
 # Can we change the file size?
diff --git a/tests/generic/570 b/tests/generic/570
index 1c5f39f1..d574f4b7 100755
--- a/tests/generic/570
+++ b/tests/generic/570
@@ -47,8 +47,8 @@ done
 swapon $SCRATCH_DEV 2>&1 | _filter_scratch
 
 # Can we write to it?
-$XFS_IO_PROG -c 'pwrite -S 0x59 64k 64k' $SCRATCH_DEV
-$XFS_IO_PROG -d -c 'pwrite -S 0x60 64k 64k' $SCRATCH_DEV
+$XFS_IO_PROG -c 'pwrite -S 0x59 64k 64k' $SCRATCH_DEV 2>&1 | _filter_xfs_io_error
+$XFS_IO_PROG -d -c 'pwrite -S 0x60 64k 64k' $SCRATCH_DEV 2>&1 | _filter_xfs_io_error
 $XFS_IO_PROG -c 'mmap -rw 64k 64k' -c 'mwrite -S 0x61 64k 64k' $SCRATCH_DEV
 
 # success, all done
-- 
2.18.0




      parent reply	other threads:[~2019-10-25  9:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-25  8:34 [PATCH] generic/{569,570}: Filter pwrite64 Yang Xu
2019-10-25  8:54 ` Eryu Guan
2019-10-25  9:02   ` Yang Xu
2019-10-25  9:19   ` Yang Xu [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=1571995140-10915-1-git-send-email-xuyang2018.jy@cn.fujitsu.com \
    --to=xuyang2018.jy@cn.fujitsu.com \
    --cc=eguan@linux.alibaba.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.