Add copy_file_range() tests
Subsystems (2)
v2 cover Add copy_file_range() tests
These tests exercise the copy_file_range() system call, and check copying data to both a new file and overwriting data inside an existing file. I use the xfs_io "copy_range" command for the actual copies, so running these tests requires an up-to-date version of xfsprogs.
Thanks,
Anna
Anna Schumaker (4):
generic/377: Add copy to new file test
generic/378: Add small copies to new file test generic/379: Add copy test that overwrites data generic/380: Add a copy test for overwriting small amounts of data
tests/generic/377 | 102 +++++++++++++++++++++++++++++++++++++++++++++++ tests/generic/377.out | 21 ++++++++++ tests/generic/378 | 88 +++++++++++++++++++++++++++++++++++++++++ tests/generic/378.out | 14 +++++++ tests/generic/379 | 107 ++++++++++++++++++++++++++++++++++++++++++++++++++ tests/generic/379.out | 17 ++++++++ tests/generic/380 | 94 ++++++++++++++++++++++++++++++++++++++++++++ tests/generic/380.out | 17 ++++++++ tests/generic/group | 4 ++ 9 files changed, 464 insertions(+) create mode 100644 tests/generic/377 create mode 100644 tests/generic/377.out create mode 100644 tests/generic/378 create mode 100644 tests/generic/378.out create mode 100644 tests/generic/379 create mode 100644 tests/generic/379.out create mode 100644 tests/generic/380 create mode 100644 tests/generic/380.out
Signature · 1 line
2.9.3
PATCH v2 1/4 generic/377: Add copy to new file test
This test copies data from various points in a source file to a new file. This is useful for testing the basics of copy_file_range().
--- tests/generic/377 | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++ tests/generic/377.out | 21 +++++++++++ tests/generic/group | 1 + 3 files changed, 124 insertions(+) create mode 100644 tests/generic/377 create mode 100644 tests/generic/377.out
tests/generic/377 new file +102 -0
@@ -0,0 +1,102 @@ +#!/bin/bash +# FS QA Test No. 377 +# +# Tests vfs_copy_file_range(): +# - Copy a file +# - Copy beginning of original to new file +# - Copy middle of original to a new file +# - Copy end of original to new file +#----------------------------------------------------------------------- +# Copyright (c) 2016 Netapp, Inc. All rights reserved. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it would be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +#----------------------------------------------------------------------- +# + +seq=`basename $0` +seqres=$RESULT_DIR/$seq +echo "QA output created by $seq" + +here=`pwd` +tmp=/tmp/$$ +status=1 # failure is the default! +trap "_cleanup; exit \$status" 0 1 2 3 15 + +_cleanup() +{ + cd / + rm -rf $tmp.* +} + +# get standard environment +. common/rc +. common/filter + +# real QA test starts here +_supported_os Linux + +_require_xfs_io_command "copy_range" +_require_test + +testdir=$TEST_DIR/test-$seq +rm -rf $testdir +mkdir $testdir + +_checksum_files() +{ + for f in $*; do + md5sum $testdir/$f | _filter_test_dir + done +} + +rm -f $seqres.full + +echo "Create the original file and then copy" +$XFS_IO_PROG -f -c 'pwrite -S 0x61 0 1000' $testdir/file >> $seqres.full 2>&1 +$XFS_IO_PROG -f -c 'pwrite -S 0x62 1000 1000' $testdir/file >> $seqres.full 2>&1 +$XFS_IO_PROG -f -c 'pwrite -S 0x63 2000 1000' $testdir/file >> $seqres.full 2>&1 +$XFS_IO_PROG -f -c 'pwrite -S 0x64 3000 1000' $testdir/file >> $seqres.full 2>&1 +$XFS_IO_PROG -f -c 'pwrite -S 0x65 4000 1000' $testdir/file >> $seqres.full 2>&1 +$XFS_IO_PROG -f -c "copy_range $testdir/file" "$testdir/copy" +cmp $testdir/file $testdir/copy +echo "Original md5sums:" +_checksum_files file copy + +echo "Copy beginning of original file" +$XFS_IO_PROG -f -c "copy_range -l 1000 $testdir/file" "$testdir/beginning" +cmp -n 1000 $testdir/file $testdir/beginning +echo "md5sums after copying beginning:" +_checksum_files file beginning + +echo "Copy middle of original file" +$XFS_IO_PROG -f -c "copy_range -s 1000 -l 3000 $testdir/file" "$testdir/middle" +cmp -n 3000 $testdir/file $testdir/middle 1000 +echo "md5sums after copying middle:" +_checksum_files file middle + +echo "Copy end of original file" +$XFS_IO_PROG -f -c "copy_range -s 4000 -l 1000 $testdir/file" "$testdir/end" +cmp -n 1000 $testdir/file $testdir/end 4000 +echo "md5sums after copying end:" +_checksum_files file end + +echo "Copy beyond end of original file" +$XFS_IO_PROG -f -c "copy_range -s 4000 -l 2000 $testdir/file" "$testdir/beyond" +cmp -n 1000 $testdir/file $testdir/end 4000 +echo "md5sums after copying beyond:" +_checksum_files file beyond + +#success, all done +status=0 +exit
tests/generic/377.out new file +21 -0
@@ -0,0 +1,21 @@ +QA output created by 377 +Create the original file and then copy +Original md5sums: +e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-377/file +e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-377/copy +Copy beginning of original file +md5sums after copying beginning: +e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-377/file +cabe45dcc9ae5b66ba86600cca6b8ba8 TEST_DIR/test-377/beginning +Copy middle of original file +md5sums after copying middle: +e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-377/file +4197de9da5badfc302715486b82bcdf1 TEST_DIR/test-377/middle +Copy end of original file +md5sums after copying end: +e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-377/file +e68d4a150c4e42f4f9ea3ffe4c9cf4ed TEST_DIR/test-377/end +Copy beyond end of original file +md5sums after copying beyond: +e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-377/file +e68d4a150c4e42f4f9ea3ffe4c9cf4ed TEST_DIR/test-377/beyond
tests/generic/group +1 -0
@@ -379,3 +379,4 @@ 374 auto quick clone dedupe 375 auto quick acl 376 auto quick metadata +377 auto quick copy
Signature · 1 line
2.9.3
PATCH v2 2/4 generic/378: Add small copies to new file test
In reply to Anna SchumakerThis test copies single bytes from a source file into various new files just to make sure that we can handle very small copies.
--- tests/generic/378 | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++ tests/generic/378.out | 14 ++++++++ tests/generic/group | 1 + 3 files changed, 103 insertions(+) create mode 100644 tests/generic/378 create mode 100644 tests/generic/378.out
tests/generic/378 new file +88 -0
@@ -0,0 +1,88 @@ +#!/bin/bash +# FS QA Test No. 378 +# +# Tests vfs_copy_file_range(): +# - Copy a small file +# - Small copies from various points in the original file +#----------------------------------------------------------------------- +# Copyright (c) 2016 Netapp, Inc. All rights reserved. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it would be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +#----------------------------------------------------------------------- +# + +seq=`basename $0` +seqres=$RESULT_DIR/$seq +echo "QA output created by $seq" + +here=`pwd` +tmp=/tmp/$$ +status=1 # failure is the default! +trap "_cleanup; exit \$status" 0 1 2 3 15 + +_cleanup() +{ + cd / + rm -rf $tmp.* +} + +# get standard environment +. common/rc +. common/filter + +# real QA test starts here +_supported_os Linux + +_require_xfs_io_command "copy_range" +_require_test + +testdir=$TEST_DIR/test-$seq +rm -rf $testdir +mkdir $testdir + +_checksum_files() +{ + for f in $*; do + md5sum $testdir/$f | _filter_test_dir + done +} + +rm -f $seqres.full + +echo "Create the original file and then copy" +echo -n "abcde" > $testdir/file +$XFS_IO_PROG -f -c "copy_range $testdir/file" "$testdir/copy" +echo -n "abcde" | cmp $testdir/copy +echo "Original md5sums:" +_checksum_files file copy + +echo "Small copies from various points in the original file" +$XFS_IO_PROG -f -c "copy_range -s 0 -l 1 $testdir/file" "$testdir/a" +$XFS_IO_PROG -f -c "copy_range -s 1 -l 1 $testdir/file" "$testdir/b" +$XFS_IO_PROG -f -c "copy_range -s 2 -l 1 $testdir/file" "$testdir/c" +$XFS_IO_PROG -f -c "copy_range -s 3 -l 1 $testdir/file" "$testdir/d" +$XFS_IO_PROG -f -c "copy_range -s 4 -l 1 $testdir/file" "$testdir/e" +$XFS_IO_PROG -f -c "copy_range -s 5 -l 1 $testdir/file" "$testdir/f" +echo -n "a" | cmp $testdir/a +echo -n "b" | cmp $testdir/b +echo -n "c" | cmp $testdir/c +echo -n "d" | cmp $testdir/d +echo -n "e" | cmp $testdir/e +echo -n "" | cmp $testdir/f +echo "md5sums after small copies" +_checksum_files file a b c d e f + +#success, all done +status=0 +exit
tests/generic/378.out new file +14 -0
@@ -0,0 +1,14 @@ +QA output created by 378 +Create the original file and then copy +Original md5sums: +ab56b4d92b40713acc5af89985d4b786 TEST_DIR/test-378/file +ab56b4d92b40713acc5af89985d4b786 TEST_DIR/test-378/copy +Small copies from various points in the original file +md5sums after small copies +ab56b4d92b40713acc5af89985d4b786 TEST_DIR/test-378/file +0cc175b9c0f1b6a831c399e269772661 TEST_DIR/test-378/a +92eb5ffee6ae2fec3ad71c777531578f TEST_DIR/test-378/b +4a8a08f09d37b73795649038408b5f33 TEST_DIR/test-378/c +8277e0910d750195b448797616e091ad TEST_DIR/test-378/d +e1671797c52e15f763380b45e841ec32 TEST_DIR/test-378/e +d41d8cd98f00b204e9800998ecf8427e TEST_DIR/test-378/f
tests/generic/group +1 -0
@@ -380,3 +380,4 @@ 375 auto quick acl 376 auto quick metadata 377 auto quick copy +378 auto quick copy
Signature · 1 line
2.9.3
PATCH v2 3/4 generic/379: Add copy test that overwrites data
In reply to Anna SchumakerUsing copy to overwrite data in the destination file is perfectly valid, so let's make sure this case works as expected.
--- tests/generic/379 | 107 ++++++++++++++++++++++++++++++++++++++++++++++++++ tests/generic/379.out | 17 ++++++++ tests/generic/group | 1 + 3 files changed, 125 insertions(+) create mode 100644 tests/generic/379 create mode 100644 tests/generic/379.out
tests/generic/379 new file +107 -0
@@ -0,0 +1,107 @@ +#!/bin/bash +# FS QA Test No. 379 +# +# Tests vfs_copy_file_range(): +# - Copy a file +# - Use copy to swap data at beginning and end +# - Use copy to swap data in the middle +# - Use copy to simultaneously overwrite and append to destination file +#----------------------------------------------------------------------- +# Copyright (c) 2016 Netapp, Inc. All rights reserved. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it would be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +#----------------------------------------------------------------------- +# + +seq=`basename $0` +seqres=$RESULT_DIR/$seq +echo "QA output created by $seq" + +here=`pwd` +tmp=/tmp/$$ +status=1 # failure is the default! +trap "_cleanup; exit \$status" 0 1 2 3 15 + +_cleanup() +{ + cd / + rm -rf $tmp.* +} + +# get standard environment +. common/rc +. common/filter + +# real QA test starts here +_supported_os Linux + +_require_xfs_io_command "copy_range" +_require_test + +testdir=$TEST_DIR/test-$seq +rm -rf $testdir +mkdir $testdir + +_checksum_files() +{ + for f in file copy; do + md5sum $testdir/$f | _filter_test_dir + done +} + +rm -f $seqres.full + +echo "Create the original file and then copy" +$XFS_IO_PROG -f -c 'pwrite -S 0x61 0 1000' $testdir/file >> $seqres.full 2>&1 +$XFS_IO_PROG -f -c 'pwrite -S 0x62 1000 1000' $testdir/file >> $seqres.full 2>&1 +$XFS_IO_PROG -f -c 'pwrite -S 0x63 2000 1000' $testdir/file >> $seqres.full 2>&1 +$XFS_IO_PROG -f -c 'pwrite -S 0x64 3000 1000' $testdir/file >> $seqres.full 2>&1 +$XFS_IO_PROG -f -c 'pwrite -S 0x65 4000 1000' $testdir/file >> $seqres.full 2>&1 +$XFS_IO_PROG -f -c "copy_range $testdir/file" "$testdir/copy" +cmp $testdir/file $testdir/copy +echo "Original md5sums:" +_checksum_files + +echo "Swap beginning and end of original file" +$XFS_IO_PROG -f -c "copy_range -s 4000 -l 1000 $testdir/file" "$testdir/copy" +$XFS_IO_PROG -f -c "copy_range -d 4000 -l 1000 $testdir/file" "$testdir/copy" +cmp -n 1000 $testdir/file $testdir/copy 4000 +cmp -n 3000 $testdir/file $testdir/copy 1000 1000 +cmp -n 1000 $testdir/file $testdir/copy 0 4000 +echo "md5sums after swapping beginning and end:" +_checksum_files + +echo "Swap middle parts of original file" +$XFS_IO_PROG -f -c "copy_range -s 1000 -d 3000 -l 1000 $testdir/file" "$testdir/copy" +$XFS_IO_PROG -f -c "copy_range -s 3000 -d 1000 -l 1000 $testdir/file" "$testdir/copy" +cmp -n 1000 $testdir/file $testdir/copy 4000 +cmp -n 1000 $testdir/file $testdir/copy 3000 1000 +cmp -n 1000 $testdir/file $testdir/copy 2000 2000 +cmp -n 1000 $testdir/file $testdir/copy 1000 3000 +cmp -n 1000 $testdir/file $testdir/copy 0 4000 +echo "md5sums after swapping middle:" +_checksum_files + +echo "Copy tail of original file onto copy" +$XFS_IO_PROG -f -c "copy_range -s 1000 -d 3000 -l 4000 $testdir/file" "$testdir/copy" +cmp -n 1000 $testdir/file $testdir/copy 4000 +cmp -n 1000 $testdir/file $testdir/copy 3000 1000 +cmp -n 1000 $testdir/file $testdir/copy 2000 2000 +cmp -n 4000 $testdir/file $testdir/copy 1000 3000 +echo "md5sums after copying tail:" +_checksum_files + +#success, all done +status=0 +exit
tests/generic/379.out new file +17 -0
@@ -0,0 +1,17 @@ +QA output created by 379 +Create the original file and then copy +Original md5sums: +e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-379/file +e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-379/copy +Swap beginning and end of original file +md5sums after swapping beginning and end: +e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-379/file +5f4e111811dd9a810143c9db9bec6d80 TEST_DIR/test-379/copy +Swap middle parts of original file +md5sums after swapping middle: +e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-379/file +8c81889a5a50b311197110bcf769a695 TEST_DIR/test-379/copy +Copy tail of original file onto copy +md5sums after copying tail: +e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-379/file +e5fbacd993eaa5e80ebc2b14b969887d TEST_DIR/test-379/copy
tests/generic/group +1 -0
@@ -381,3 +381,4 @@ 376 auto quick metadata 377 auto quick copy 378 auto quick copy +379 auto quick copy
Signature · 1 line
2.9.3
PATCH v2 4/4 generic/380: Add a copy test for overwriting small amounts of data
In reply to Anna SchumakerThis test is similar to 345, except that it copies one byte at a time to make sure that this case works as expected.
--- tests/generic/380 | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++ tests/generic/380.out | 17 ++++++++++ tests/generic/group | 1 + 3 files changed, 112 insertions(+) create mode 100644 tests/generic/380 create mode 100644 tests/generic/380.out
tests/generic/380 new file +94 -0
@@ -0,0 +1,94 @@ +#!/bin/bash +# FS QA Test No. 380 +# +# Tests vfs_copy_file_range(): +# - Copy a small file +# - Use copy to swap data at beginning and end +# - Use copy to swap data in the middle +# - Use copy to swap data in a small file +#----------------------------------------------------------------------- +# Copyright (c) 2016 Netapp, Inc. All rights reserved. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it would be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +#----------------------------------------------------------------------- +# + +seq=`basename $0` +seqres=$RESULT_DIR/$seq +echo "QA output created by $seq" + +here=`pwd` +tmp=/tmp/$$ +status=1 # failure is the default! +trap "_cleanup; exit \$status" 0 1 2 3 15 + +_cleanup() +{ + cd / + rm -rf $tmp.* +} + +# get standard environment +. common/rc +. common/filter + +# real QA test starts here +_supported_os Linux + +_require_xfs_io_command "copy_range" +_require_test + +testdir=$TEST_DIR/test-$seq +rm -rf $testdir +mkdir $testdir + +_checksum_files() +{ + for f in file copy; do + md5sum $testdir/$f | _filter_test_dir + done +} + +rm -f $seqres.full + +echo "Create the original file and then copy" +echo -n "abcde" > $testdir/file +$XFS_IO_PROG -f -c "copy_range $testdir/file" "$testdir/copy" +cmp $testdir/file $testdir/copy +echo "Original md5sums:" +_checksum_files + +echo "Swap beginning and end of original file" +$XFS_IO_PROG -f -c "copy_range -s 0 -d 4 -l 1 $testdir/file" "$testdir/copy" +$XFS_IO_PROG -f -c "copy_range -s 4 -d 0 -l 1 $testdir/file" "$testdir/copy" +echo -n "ebcda" | cmp $testdir/copy +echo "md5sums after swapping beginning and end:" +_checksum_files + +echo "Swap middle parts of original file" +$XFS_IO_PROG -f -c "copy_range -s 1 -d 3 -l 1 $testdir/file" "$testdir/copy" +$XFS_IO_PROG -f -c "copy_range -s 3 -d 1 -l 1 $testdir/file" "$testdir/copy" +echo -n "edcba" | cmp $testdir/copy +echo "md5sums after swapping middle:" +_checksum_files + +echo "Copy tail of original file onto copy" +$XFS_IO_PROG -f -c "copy_range -s 1 -d 3 -l 4 $testdir/file" "$testdir/copy" +echo -n "edcbcde" | cmp $testdir/copy +echo "md5sums after copying tail:" +_checksum_files + +#success, all done +status=0 +exit
tests/generic/380.out new file +17 -0
@@ -0,0 +1,17 @@ +QA output created by 380 +Create the original file and then copy +Original md5sums: +ab56b4d92b40713acc5af89985d4b786 TEST_DIR/test-380/file +ab56b4d92b40713acc5af89985d4b786 TEST_DIR/test-380/copy +Swap beginning and end of original file +md5sums after swapping beginning and end: +ab56b4d92b40713acc5af89985d4b786 TEST_DIR/test-380/file +32db1f6d06d15f7e38e1ab1c69da498a TEST_DIR/test-380/copy +Swap middle parts of original file +md5sums after swapping middle: +ab56b4d92b40713acc5af89985d4b786 TEST_DIR/test-380/file +295228f3d82d344bbcf2f0030519c2ea TEST_DIR/test-380/copy +Copy tail of original file onto copy +md5sums after copying tail: +ab56b4d92b40713acc5af89985d4b786 TEST_DIR/test-380/file +0c4aac952f72fa078e2f8419aca70b28 TEST_DIR/test-380/copy
tests/generic/group +1 -0
@@ -382,3 +382,4 @@ 377 auto quick copy 378 auto quick copy 379 auto quick copy +380 auto quick copy
Signature · 1 line
2.9.3
Re: [PATCH v2 1/4] generic/377: Add copy to new file test
In reply to Anna SchumakerQuoted 10 lines · Anna Schumaker
This test copies data from various points in a source file to a new file. This is useful for testing the basics of
copy_file_range().Signed-off-by Anna Schumaker <[email protected]>--- tests/generic/377 | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++ tests/generic/377.out | 21 +++++++++++ tests/generic/group | 1 + 3 files changed, 124 insertions(+) create mode 100644 tests/generic/377
File mode of test case should be 755, i.e. it has x permission. So "git diff" won't complain the mode change after running these tests.
Quoted 45 lines
create mode 100644 tests/generic/377.outtests/generic/377 new file +37
-0@@ -0,0 +1,102 @@ +#!/bin/bash +# FS QA Test No. 377 +# +# Tests vfs_copy_file_range(): +# - Copy a file +# - Copy beginning of original to new file +# - Copy middle of original to a new file +# - Copy end of original to new file +#----------------------------------------------------------------------- +# Copyright (c) 2016 Netapp, Inc. All rights reserved. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it would be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +#----------------------------------------------------------------------- +# + +seq=`basename $0` +seqres=$RESULT_DIR/$seq +echo "QA output created by $seq" + +here=`pwd` +tmp=/tmp/$$ +status=1 # failure is the default! +trap "_cleanup; exit \$status" 0 1 2 3 15 + +_cleanup() +{
tests/generic/377 line 47
Quoted 10 lines
tests/generic/377 new file +10
-0+ cd / + rm -rf $tmp.* +} + +# get standard environment +. common/rc +. common/filter + +# real QA test starts here +_supported_os Linux
Need "_supported_fs generic" in all these tests.
tests/generic/377 line 49
Quoted 2 lines
tests/generic/377 new file +2
-0+ +_require_xfs_io_command "copy_range"
Do we need to test the support status on kernel side? e.g. what happens if filesystems have no "copy_file_range" implemented? Seems copy_file_range falls back to splice in this case, but I'm not sure. If so I think it's OK to have no kernel side detection.
tests/generic/377 line 56
Quoted 7 lines
tests/generic/377 new file +7
-0+_require_test + +testdir=$TEST_DIR/test-$seq +rm -rf $testdir +mkdir $testdir + +_checksum_files()
We usually name local functions without the leading "_".
Quoted 8 lines
tests/generic/377 new file +8
-0+{ + for f in $*; do + md5sum $testdir/$f | _filter_test_dir + done +} + +rm -f $seqres.full +
tests/generic/377 line 74
Quoted 10 lines
tests/generic/377 new file +10
-0+echo "Create the original file and then copy" +$XFS_IO_PROG -f -c 'pwrite -S 0x61 0 1000' $testdir/file >> $seqres.full 2>&1 +$XFS_IO_PROG -f -c 'pwrite -S 0x62 1000 1000' $testdir/file >> $seqres.full 2>&1 +$XFS_IO_PROG -f -c 'pwrite -S 0x63 2000 1000' $testdir/file >> $seqres.full 2>&1 +$XFS_IO_PROG -f -c 'pwrite -S 0x64 3000 1000' $testdir/file >> $seqres.full 2>&1 +$XFS_IO_PROG -f -c 'pwrite -S 0x65 4000 1000' $testdir/file >> $seqres.full 2>&1 +$XFS_IO_PROG -f -c "copy_range $testdir/file" "$testdir/copy" +cmp $testdir/file $testdir/copy +echo "Original md5sums:" +_checksum_files file copy
I saw test failures when testing on XFS and btrfs, 4.8-rc3 kernel, and similar failures in other tests. Are these failures expected?
[root@dhcp-66-86-11 xfstests]# diff -u tests/generic/377.out /root/workspace/xfstests/results//xfs_4k_crc/generic/377.out.bad
root/workspace/xfstests/results//xfs_4k_crc/generic/377.out.bad 2016-09-09 14:14:48.483000000 +0800 renamed from generic/377.out 2016-09-09 12:17:40.790000000 +0800 +8 -4
@@ -4,18 +4,22 @@ e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-377/file e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-377/copy Copy beginning of original file +cmp: EOF on /mnt/testarea/test/test-377/beginning md5sums after copying beginning: e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-377/file -cabe45dcc9ae5b66ba86600cca6b8ba8 TEST_DIR/test-377/beginning +d41d8cd98f00b204e9800998ecf8427e TEST_DIR/test-377/beginning Copy middle of original file +cmp: EOF on /mnt/testarea/test/test-377/middle md5sums after copying middle: e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-377/file -4197de9da5badfc302715486b82bcdf1 TEST_DIR/test-377/middle +d41d8cd98f00b204e9800998ecf8427e TEST_DIR/test-377/middle Copy end of original file +cmp: EOF on /mnt/testarea/test/test-377/end md5sums after copying end: e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-377/file -e68d4a150c4e42f4f9ea3ffe4c9cf4ed TEST_DIR/test-377/end +d41d8cd98f00b204e9800998ecf8427e TEST_DIR/test-377/end Copy beyond end of original file +cmp: EOF on /mnt/testarea/test/test-377/end md5sums after copying beyond: e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-377/file -e68d4a150c4e42f4f9ea3ffe4c9cf4ed TEST_DIR/test-377/beyond +d41d8cd98f00b204e9800998ecf8427e TEST_DIR/test-377/beyond
Quoted 11 lines
tests/generic/377 new file +11
-0+ +echo "Copy beginning of original file" +$XFS_IO_PROG -f -c "copy_range -l 1000 $testdir/file" "$testdir/beginning" +cmp -n 1000 $testdir/file $testdir/beginning +echo "md5sums after copying beginning:" +_checksum_files file beginning + +echo "Copy middle of original file" +$XFS_IO_PROG -f -c "copy_range -s 1000 -l 3000 $testdir/file" "$testdir/middle" +cmp -n 3000 $testdir/file $testdir/middle 1000 +echo "md5sums after copying middle:"
tests/generic/377 line 95
Quoted 10 lines
tests/generic/377 new file +10
-0+_checksum_files file middle + +echo "Copy end of original file" +$XFS_IO_PROG -f -c "copy_range -s 4000 -l 1000 $testdir/file" "$testdir/end" +cmp -n 1000 $testdir/file $testdir/end 4000 +echo "md5sums after copying end:" +_checksum_files file end + +echo "Copy beyond end of original file" +$XFS_IO_PROG -f -c "copy_range -s 4000 -l 2000 $testdir/file" "$testdir/beyond"
I noticed that xfs_io hung on copying beyond EOF when testing with ext4 and NFSv4.1, xfs_io was in "R" state for 10 minutes until I killed it. Is it kernel bug or test is not suitable on such filesystems?
Thanks,
Eryu
Quoted 50 lines
tests/generic/377 new file +7
-0+cmp -n 1000 $testdir/file $testdir/end 4000 +echo "md5sums after copying beyond:" +_checksum_files file beyond + +#success, all done +status=0 +exittests/generic/377.out new file +21
-0@@ -0,0 +1,21 @@ +QA output created by 377 +Create the original file and then copy +Original md5sums: +e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-377/file +e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-377/copy +Copy beginning of original file +md5sums after copying beginning: +e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-377/file +cabe45dcc9ae5b66ba86600cca6b8ba8 TEST_DIR/test-377/beginning +Copy middle of original file +md5sums after copying middle: +e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-377/file +4197de9da5badfc302715486b82bcdf1 TEST_DIR/test-377/middle +Copy end of original file +md5sums after copying end: +e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-377/file +e68d4a150c4e42f4f9ea3ffe4c9cf4ed TEST_DIR/test-377/end +Copy beyond end of original file +md5sums after copying beyond: +e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-377/file +e68d4a150c4e42f4f9ea3ffe4c9cf4ed TEST_DIR/test-377/beyondtests/generic/group +1
-0@@ -379,3 +379,4 @@ 374 auto quick clone dedupe 375 auto quick acl 376 auto quick metadata +377 auto quick copySignature · 6 lines
2.9.3 -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 1/4] generic/377: Add copy to new file test
Quoted 73 lines · Eryu Guan
Quoted 10 lines · Anna Schumaker
This test copies data from various points in a source file to a new file. This is useful for testing the basics of
copy_file_range().Signed-off-by Anna Schumaker <[email protected]>--- tests/generic/377 | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++ tests/generic/377.out | 21 +++++++++++ tests/generic/group | 1 + 3 files changed, 124 insertions(+) create mode 100644 tests/generic/377File mode of test case should be 755, i.e. it has x permission. So "git diff" won't complain the mode change after running these tests.
Quoted 45 lines
create mode 100644 tests/generic/377.outtests/generic/377 new file +37
-0@@ -0,0 +1,102 @@ +#!/bin/bash +# FS QA Test No. 377 +# +# Tests vfs_copy_file_range(): +# - Copy a file +# - Copy beginning of original to new file +# - Copy middle of original to a new file +# - Copy end of original to new file +#----------------------------------------------------------------------- +# Copyright (c) 2016 Netapp, Inc. All rights reserved. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it would be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +#----------------------------------------------------------------------- +# + +seq=`basename $0` +seqres=$RESULT_DIR/$seq +echo "QA output created by $seq" + +here=`pwd` +tmp=/tmp/$$ +status=1 # failure is the default! +trap "_cleanup; exit \$status" 0 1 2 3 15 + +_cleanup() +{tests/generic/377 line 47
Quoted 10 lines
tests/generic/377 new file +10
-0+ cd / + rm -rf $tmp.* +} + +# get standard environment +. common/rc +. common/filter + +# real QA test starts here +_supported_os LinuxNeed "
_supported_fsgeneric" in all these tests.
Quoted 7 lines
tests/generic/377 line 49
Quoted 2 lines
tests/generic/377 new file +2
-0+ +_require_xfs_io_command "copy_range"Do we need to test the support status on kernel side? e.g. what happens if filesystems have no "
copy_file_range" implemented? Seemscopy_file_rangefalls back to splice in this case, but I'm not sure. If so I think it's OK to have no kernel side detection.
But... it's a totally new syscall, so _require_io_command should actually try calling it so that we can _notrun on old kernels.
Quoted 10 lines
tests/generic/377 line 56
Quoted 7 lines
tests/generic/377 new file +7
-0+_require_test + +testdir=$TEST_DIR/test-$seq +rm -rf $testdir +mkdir $testdir + +_checksum_files()We usually name local functions without the leading "_".
Quoted 5 lines
tests/generic/377 line 61
Quoted 5 lines
tests/generic/377 new file +5
-0+{ + for f in $*; do + md5sum $testdir/$f | _filter_test_dir + done +}
Or perhaps just "md5sum file copy | _filter_test_dir" directly?
--D
Quoted 131 lines
tests/generic/377 line 74
Quoted 13 lines
tests/generic/377 new file +13
-0+ +rm -f $seqres.full + +echo "Create the original file and then copy" +$XFS_IO_PROG -f -c 'pwrite -S 0x61 0 1000' $testdir/file >> $seqres.full 2>&1 +$XFS_IO_PROG -f -c 'pwrite -S 0x62 1000 1000' $testdir/file >> $seqres.full 2>&1 +$XFS_IO_PROG -f -c 'pwrite -S 0x63 2000 1000' $testdir/file >> $seqres.full 2>&1 +$XFS_IO_PROG -f -c 'pwrite -S 0x64 3000 1000' $testdir/file >> $seqres.full 2>&1 +$XFS_IO_PROG -f -c 'pwrite -S 0x65 4000 1000' $testdir/file >> $seqres.full 2>&1 +$XFS_IO_PROG -f -c "copy_range $testdir/file" "$testdir/copy" +cmp $testdir/file $testdir/copy +echo "Original md5sums:" +_checksum_files file copyI saw test failures when testing on XFS and btrfs, 4.8-rc3 kernel, and similar failures in other tests. Are these failures expected?
[root@dhcp-66-86-11 xfstests]# diff -u tests/generic/377.out
/root/workspace/xfstests/results//xfs_4k_crc/generic/377.out.badroot/workspace/xfstests/results//xfs_4k_crc/generic/377.out.bad 2016-09-09 14:14:48.483000000 +0800 renamed from generic/377.out 2016-09-09 12:17:40.790000000 +0800 +8
-4@@ -4,18 +4,22 @@ e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-377/file e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-377/copy Copy beginning of original file +cmp: EOF on /mnt/testarea/test/test-377/beginning md5sums after copying beginning: e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-377/file -cabe45dcc9ae5b66ba86600cca6b8ba8 TEST_DIR/test-377/beginning +d41d8cd98f00b204e9800998ecf8427e TEST_DIR/test-377/beginning Copy middle of original file +cmp: EOF on /mnt/testarea/test/test-377/middle md5sums after copying middle: e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-377/file -4197de9da5badfc302715486b82bcdf1 TEST_DIR/test-377/middle +d41d8cd98f00b204e9800998ecf8427e TEST_DIR/test-377/middle Copy end of original file +cmp: EOF on /mnt/testarea/test/test-377/end md5sums after copying end: e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-377/file -e68d4a150c4e42f4f9ea3ffe4c9cf4ed TEST_DIR/test-377/end +d41d8cd98f00b204e9800998ecf8427e TEST_DIR/test-377/end Copy beyond end of original file +cmp: EOF on /mnt/testarea/test/test-377/end md5sums after copying beyond: e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-377/file -e68d4a150c4e42f4f9ea3ffe4c9cf4ed TEST_DIR/test-377/beyond +d41d8cd98f00b204e9800998ecf8427e TEST_DIR/test-377/beyondQuoted 12 lines
tests/generic/377 new file +11
-0+ +echo "Copy beginning of original file" +$XFS_IO_PROG -f -c "copy_range -l 1000 $testdir/file" "$testdir/beginning" +cmp -n 1000 $testdir/file $testdir/beginning +echo "md5sums after copying beginning:" +_checksum_files file beginning + +echo "Copy middle of original file" +$XFS_IO_PROG -f -c "copy_range -s 1000 -l 3000 $testdir/file" "$testdir/middle" +cmp -n 3000 $testdir/file $testdir/middle 1000 +echo "md5sums after copying middle:"tests/generic/377 line 95
Quoted 10 lines
tests/generic/377 new file +10
-0+_checksum_files file middle + +echo "Copy end of original file" +$XFS_IO_PROG -f -c "copy_range -s 4000 -l 1000 $testdir/file" "$testdir/end" +cmp -n 1000 $testdir/file $testdir/end 4000 +echo "md5sums after copying end:" +_checksum_files file end + +echo "Copy beyond end of original file" +$XFS_IO_PROG -f -c "copy_range -s 4000 -l 2000 $testdir/file" "$testdir/beyond"I noticed that
xfs_iohung on copying beyond EOF when testing with ext4 and NFSv4.1,xfs_iowas in "R" state for 10 minutes until I killed it. Is it kernel bug or test is not suitable on such filesystems?Thanks,
EryuQuoted 50 lines
tests/generic/377 new file +7
-0+cmp -n 1000 $testdir/file $testdir/end 4000 +echo "md5sums after copying beyond:" +_checksum_files file beyond + +#success, all done +status=0 +exittests/generic/377.out new file +21
-0@@ -0,0 +1,21 @@ +QA output created by 377 +Create the original file and then copy +Original md5sums: +e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-377/file +e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-377/copy +Copy beginning of original file +md5sums after copying beginning: +e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-377/file +cabe45dcc9ae5b66ba86600cca6b8ba8 TEST_DIR/test-377/beginning +Copy middle of original file +md5sums after copying middle: +e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-377/file +4197de9da5badfc302715486b82bcdf1 TEST_DIR/test-377/middle +Copy end of original file +md5sums after copying end: +e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-377/file +e68d4a150c4e42f4f9ea3ffe4c9cf4ed TEST_DIR/test-377/end +Copy beyond end of original file +md5sums after copying beyond: +e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-377/file +e68d4a150c4e42f4f9ea3ffe4c9cf4ed TEST_DIR/test-377/beyondtests/generic/group +1
-0@@ -379,3 +379,4 @@ 374 auto quick clone dedupe 375 auto quick acl 376 auto quick metadata +377 auto quick copySignature · 6 lines
2.9.3 -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html--
To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 1/4] generic/377: Add copy to new file test
Quoted 10 lines · Darrick J. Wong
Quoted 7 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+ +_require_xfs_io_command "copy_range"Do we need to test the support status on kernel side? e.g. what happens if filesystems have no "
copy_file_range" implemented? Seemscopy_file_rangefalls back to splice in this case, but I'm not sure. If so I think it's OK to have no kernel side detection.But... it's a totally new syscall, so
_require_io_commandshould actually try calling it so that we can_notrunon old kernels.
The only reason that I think it's OK to check xfs_io support only is that the "copy_range" subcommand won't be even compiled in xfs_io if kernel has no copy_file_range syscall support.
But yeah, I agree that calling it and see how kernel handles it would be the best option, like how we handle falloc, fpunch in _require_xfs_io_command.
Thanks,
Eryu
Re: [PATCH v2 1/4] generic/377: Add copy to new file test
Quoted 9 lines · Eryu Guan
Quoted 8 lines · Darrick J. Wong
Quoted 7 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+ +_require_xfs_io_command "copy_range"Do we need to test the support status on kernel side? e.g. what happens if filesystems have no "
copy_file_range" implemented? Seemscopy_file_rangefalls back to splice in this case, but I'm not sure. If so I think it's OK to have no kernel side detection.
Quoted 6 lines
Quoted 2 lines
But... it's a totally new syscall, so
_require_io_commandshould actually try calling it so that we can_notrunon old kernels.The only reason that I think it's OK to check
xfs_iosupport only is that the "copy_range" subcommand won't be even compiled inxfs_ioif kernel has nocopy_file_rangesyscall support.
It's not uncommon to have an xfs_io that will support a new syscall or syscall flags by directly coding the support when it's not found by the configure script. e.g. io/prealloc.c support for all the different fallocate flags, regardless of whether the underlying kernel or userspace headers support them.
Quoted 3 lines
But yeah, I agree that calling it and see how kernel handles it would be the best option, like how we handle falloc, fpunch in
_require_xfs_io_command.
Which we do for precisely the reason above. :P
Cheers,
Dave.
Signature · 2 lines
Dave Chinner [email protected]
Quoted 5 lines · Anna Schumaker
These tests exercise the
copy_file_range()system call, and check copying data to both a new file and overwriting data inside an existing file. I use thexfs_io"copy_range" command for the actual copies, so running these tests requires an up-to-date version of xfsprogs.
Quoted 8 lines
Thanks,
AnnaAnna Schumaker (4):
generic/377: Add copy to new file test
generic/378: Add small copies to new file test generic/379: Add copy test that overwrites data generic/380: Add a copy test for overwriting small amounts of data
By the way, do you have a test to check that invalid inputs produce the error codes listed in the manpage?
--D
Quoted 27 lines
tests/generic/377 | 102 +++++++++++++++++++++++++++++++++++++++++++++++ tests/generic/377.out | 21 ++++++++++ tests/generic/378 | 88 +++++++++++++++++++++++++++++++++++++++++ tests/generic/378.out | 14 +++++++ tests/generic/379 | 107 ++++++++++++++++++++++++++++++++++++++++++++++++++ tests/generic/379.out | 17 ++++++++ tests/generic/380 | 94 ++++++++++++++++++++++++++++++++++++++++++++ tests/generic/380.out | 17 ++++++++ tests/generic/group | 4 ++ 9 files changed, 464 insertions(+) create mode 100644 tests/generic/377 create mode 100644 tests/generic/377.out create mode 100644 tests/generic/378 create mode 100644 tests/generic/378.out create mode 100644 tests/generic/379 create mode 100644 tests/generic/379.out create mode 100644 tests/generic/380 create mode 100644 tests/generic/380.outSignature · 6 lines
2.9.3 -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 4 lines · Anna Schumaker
These tests exercise the
copy_file_range()system call, and check copying data to both a new file and overwriting data inside an existing file. I use thexfs_io"copy_range" command for the actual copies, so running these tests requires an up-to-date version of xfsprogs.
Hi Anna,
what's the status of these tests? Did you get a chance to look into xfs_io copyfile support?
Quoted 10 lines · Christoph Hellwig
Quoted 4 lines · Anna Schumaker
These tests exercise the
copy_file_range()system call, and check copying data to both a new file and overwriting data inside an existing file. I use thexfs_io"copy_range" command for the actual copies, so running these tests requires an up-to-date version of xfsprogs.Hi Anna,
what's the status of these tests? Did you get a chance to look into
xfs_iocopyfile support?
Another month, another ping - it would be really sad to not have any real testing for copy_file_range. I've been holding a pending change for it back for month now because I want to verify it more than cursory, but I guess I'll just have to send it anyway.
Quoted 7 lines · Christoph Hellwig
Quoted 6 lines · Christoph Hellwig
Quoted 4 lines · Anna Schumaker
These tests exercise the
copy_file_range()system call, and check copying data to both a new file and overwriting data inside an existing file. I use thexfs_io"copy_range" command for the actual copies, so running these tests requires an up-to-date version of xfsprogs.
Quoted 7 lines
Quoted 4 lines
Hi Anna,
what's the status of these tests? Did you get a chance to look into
xfs_iocopyfile support?Another month, another ping - it would be really sad to not have any real testing for
copy_file_range.
Agreed, Anna, are you still planning on doing this?
--b.
Quoted 7 lines
I've been holding a pending change
for it back for month now because I want to verify it more than cursory, but I guess I'll just have to send it anyway.
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Sorry for the delay! I've been busy looking at other things and forgot to update the copy_file_range() stuff :(
Quoted 8 lines · J. Bruce Fields
Quoted 7 lines · Christoph Hellwig
Quoted 6 lines · Christoph Hellwig
Quoted 4 lines · Anna Schumaker
These tests exercise the
copy_file_range()system call, and check copying data to both a new file and overwriting data inside an existing file. I use thexfs_io"copy_range" command for the actual copies, so running these tests requires an up-to-date version of xfsprogs.
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Hi Anna,
what's the status of these tests? Did you get a chance to look into
xfs_iocopyfile support?
xfs_io has support for copying now, so I'll make sure that the tests use that correctly. I promise to send out an update this week, once I check that everything still works!
Thanks for the reminders,
Anna
Quoted 15 lines
Quoted 3 lines
Another month, another ping - it would be really sad to not have any real testing for
copy_file_range.Agreed, Anna, are you still planning on doing this?
--b.
Quoted 7 lines
I've been holding a pending change
for it back for month now because I want to verify it more than cursory, but I guess I'll just have to send it anyway.
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 2 lines · Anna Schumaker
Sorry for the delay! I've been busy looking at other things and forgot to update the
copy_file_range()stuff :(
While you're at it, please make a test to check the return value for invalid inputs. I'd prefer we avoid repeating what happened with the vfs dedupe ioctl.
--D
Quoted 41 lines · J. Bruce Fields
Quoted 8 lines · Christoph Hellwig
Quoted 7 lines · Christoph Hellwig
Quoted 6 lines · Anna Schumaker
Quoted 4 lines
These tests exercise the
copy_file_range()system call, and check copying data to both a new file and overwriting data inside an existing file. I use thexfs_io"copy_range" command for the actual copies, so running these tests requires an up-to-date version of xfsprogs.Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Hi Anna,
what's the status of these tests? Did you get a chance to look into
xfs_iocopyfile support?
xfs_iohas support for copying now, so I'll make sure that the tests use that correctly. I promise to send out an update this week, once I check that everything still works!Thanks for the reminders,
AnnaQuoted 15 lines
Quoted 3 lines
Another month, another ping - it would be really sad to not have any real testing for
copy_file_range.Agreed, Anna, are you still planning on doing this?
--b.
Quoted 7 lines
I've been holding a pending change
for it back for month now because I want to verify it more than cursory, but I guess I'll just have to send it anyway.
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html--
To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 8 lines · Darrick J. Wong
Quoted 2 lines · Anna Schumaker
Sorry for the delay! I've been busy looking at other things and forgot to update the
copy_file_range()stuff :(While you're at it, please make a test to check the return value for invalid inputs. I'd prefer we avoid repeating what happened with the vfs dedupe ioctl.
I'll see what I can do. So far I've updated the tests with the other comments and added in the "copy_range" check directly to _require_xfs_io_command(). I'll play with error codes next week and then resubmit.
Anna
Quoted 49 lines
--D
Quoted 37 lines · J. Bruce Fields
Quoted 8 lines · Christoph Hellwig
Quoted 7 lines · Christoph Hellwig
Quoted 6 lines · Anna Schumaker
Quoted 4 lines
These tests exercise the
copy_file_range()system call, and check copying data to both a new file and overwriting data inside an existing file. I use thexfs_io"copy_range" command for the actual copies, so running these tests requires an up-to-date version of xfsprogs.Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Hi Anna,
what's the status of these tests? Did you get a chance to look into
xfs_iocopyfile support?
xfs_iohas support for copying now, so I'll make sure that the tests use that correctly. I promise to send out an update this week, once I check that everything still works!Thanks for the reminders,
AnnaQuoted 15 lines
Quoted 3 lines
Another month, another ping - it would be really sad to not have any real testing for
copy_file_range.Agreed, Anna, are you still planning on doing this?
--b.
Quoted 7 lines
I've been holding a pending change
for it back for month now because I want to verify it more than cursory, but I guess I'll just have to send it anyway.
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.htmlQuoted 4 lines
--
To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html