mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
f60eeb9a21
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>
38 lines
1010 B
Plaintext
38 lines
1010 B
Plaintext
QA output created by 564
|
|
source range overlaps destination range in same file returns EINVAL
|
|
copy_range: Invalid argument
|
|
|
|
destination file O_RDONLY returns EBADF
|
|
copy_range: Bad file descriptor
|
|
|
|
destination file O_APPEND returns EBADF
|
|
copy_range: Bad file descriptor
|
|
|
|
source/destination as directory returns EISDIR
|
|
copy_range: Is a directory
|
|
copy_range: Is a directory
|
|
|
|
source/destination as blkdev returns EINVAL
|
|
copy_range: Invalid argument
|
|
copy_range: Invalid argument
|
|
|
|
source/destination as chardev returns EINVAL
|
|
copy_range: Invalid argument
|
|
copy_range: Invalid argument
|
|
|
|
source/destination as FIFO returns EINVAL
|
|
copy_range: Invalid argument
|
|
copy_range: Invalid argument
|
|
|
|
length beyond 8EiB wraps around 0 returns EOVERFLOW
|
|
copy_range: Value too large for defined data type
|
|
copy_range: Value too large for defined data type
|
|
|
|
source range beyond 8TiB returns 0
|
|
|
|
destination range beyond 8TiB returns EFBIG
|
|
copy_range: File too large
|
|
|
|
destination larger than rlimit returns EFBIG
|
|
File size limit exceeded
|