generic/564: fix copy_range -f availability test
authorEric Sandeen <sandeen@redhat.com>
Thu, 12 Sep 2019 16:15:49 +0000 (11:15 -0500)
committerEryu Guan <guaneryu@gmail.com>
Sun, 15 Sep 2019 04:29:10 +0000 (12:29 +0800)
commit298319fd4a2cf9eef3eba3fa5574f9c9eee3765d
tree7b51db774d1e8727cf6c3233f60b299bb3b1f7e4
parentd0f42706da5094df08bae3cba03c50a79c9d8cfc
generic/564: fix copy_range -f availability test

generic/564 wants to test for copy_range -f, but as it's implemented
it calls copy_range with a length of zero which will silently return
success from the VFS (at least on some kernels) even if the underlying
fs doesn't support it.

So patch this up 2 ways; perform the test with an explicit length
so it's not a no-op, and go ahead test copy_range w/o -f in the test
first just to be on the safe side (and for clearer failure messages.)

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
common/rc
tests/generic/564