From: "Jianhong.Yin" <yin-jianhong@163.com>
To: fstests@vger.kernel.org
Cc: jiyin@redhat.com, "Jianhong.Yin" <yin-jianhong@163.com>
Subject: [PATCH v2] generic/432 copy_file_range: add overwrite copy to cover known issue
Date: Tue, 7 Apr 2020 16:41:21 +0800 [thread overview]
Message-ID: <20200407084121.92364-1-yin-jianhong@163.com> (raw)
found that follow nfs issue has not been covered by xfstests
https://bugzilla.redhat.com/show_bug.cgi?id=1803162
https://bugzilla.redhat.com/show_bug.cgi?id=1803162#c6
add new test to cover it.
test log:
'''
[root@hp-dl360g9-02 xfstests]# DIFF_LENGTH=-0 ./check generic/432
FSTYP -- nfs
PLATFORM -- Linux/x86_64 nfsserver 4.18.0-147.el8.x86_64 ...
MKFS_OPTIONS -- nfsserver:/home/exportdir-xfstests-mh ...
MOUNT_OPTIONS -- -overs=4.2 ...
generic/432 1s ... - output mismatch (see /var/lib/xfstests/results//generic/432.out.bad)
--- tests/generic/432.out 2020-03-05 03:58:35.946872285 -0500
+++ /var/lib/xfstests/results//generic/432.out.bad 2020-03-05 03:58:39.519861450 -0500
@@ -16,6 +16,7 @@
e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-432/file
e5fbacd993eaa5e80ebc2b14b969887d TEST_DIR/test-432/copy
Copy overwrite existed copy file
+cmp: EOF on /mnt/nfsmp-xfstests-mh/test-432/file after byte 5000, in line 1
md5sums after copying overwrite:
e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-432/file
-e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-432/copy
+98ed789264b5b11498bd3f4a70a12916 TEST_DIR/test-432/copy
Ran: generic/432
Failures: generic/432
Failed 1 of 1 tests
'''
BTW: xfs_io copy_range need this commit:
'''
64e366d9f81785b015b85395060a492d6ae85019
xfs_io: copy_range don't truncate dst_file, and add smart length
'''
Signed-off-by: Jianhong Yin <yin-jianhong@163.com>
---
tests/generic/432 | 7 +++++++
tests/generic/432.out | 4 ++++
2 files changed, 11 insertions(+)
diff --git a/tests/generic/432 b/tests/generic/432
index 6200af86..762eccae 100755
--- a/tests/generic/432
+++ b/tests/generic/432
@@ -80,6 +80,13 @@ cmp -n 4000 $testdir/file $testdir/copy 1000 3000
echo "md5sums after copying tail:"
md5sum $testdir/{file,copy} | _filter_test_dir
+echo "Copy overwrite existed copy file"
+$XFS_IO_PROG -t -f -c 'pwrite -S 0x66 0 5000' $testdir/copy >> $seqres.full 2>&1
+$XFS_IO_PROG -f -c "copy_range $testdir/file" "$testdir/copy"
+cmp $testdir/file $testdir/copy
+echo "md5sums after copying overwrite:"
+md5sum $testdir/{file,copy} | _filter_test_dir
+
#success, all done
status=0
exit
diff --git a/tests/generic/432.out b/tests/generic/432.out
index c49d7808..27364728 100644
--- a/tests/generic/432.out
+++ b/tests/generic/432.out
@@ -15,3 +15,7 @@ Copy tail of original file onto copy
md5sums after copying tail:
e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-432/file
e5fbacd993eaa5e80ebc2b14b969887d TEST_DIR/test-432/copy
+Copy overwrite existed copy file
+md5sums after copying overwrite:
+e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-432/file
+e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-432/copy
--
2.18.1
reply other threads:[~2020-04-07 8:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20200407084121.92364-1-yin-jianhong@163.com \
--to=yin-jianhong@163.com \
--cc=fstests@vger.kernel.org \
--cc=jiyin@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 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.