generic: copy_file_range bounds test
authorAmir Goldstein <amir73il@gmail.com>
Mon, 15 Jul 2019 12:55:15 +0000 (15:55 +0300)
committerEryu Guan <guaneryu@gmail.com>
Sun, 21 Jul 2019 16:41:30 +0000 (00:41 +0800)
commitf60eeb9a21970ab504c9ec9efd9582773905b782
treecb2d3c057b0ffb3e494341b53a482c0ff7fbd5d7
parent3996a90a471f5c59a2645ee74d8dd6fe8e04f04e
generic: copy_file_range bounds test

Test that copy_file_range will return the correct errors for various
error conditions and boundary constraints.

This is a regression test for kernel commit:

  96e6e8f4a68d ("vfs: add missing checks to copy_file_range")

[Amir] Split out cross-device copy_range test and use only test dev.
Split out immutable/swapfile test cases to reduce the requirements to
run the bounds check to minimum and get coverage for more filesystems.
Remove the tests for read past EOF and write after chmod -r,
because we decided to stick with read(2)/write(2) semantics.
Add requirements needed for large size copy tests and fifo test.
Use existing char/block devices for char/block dev tests.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/generic/564 [new file with mode: 0755]
tests/generic/564.out [new file with mode: 0644]
tests/generic/group