mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
00d1bda60d
This tests corner case in FITRIM implementation where range size is smaller than file system block or zero. In this case FITRIM should fail with EINVAL. The problem was spotted in xfs and ext4 where in case of length = 0 the 'end' variable underflowed. In case of length smaller than 1 FSB FITRIM finished successfully, but we really should rather return EINVAL in both cases. (This patch has to be applied after 'Use upstream version of fstrim instead of the local one') Signed-off-by: Lukas Czerner <lczerner@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Rich Johnston <rjohnston@sgi.com>
7 lines
238 B
Plaintext
7 lines
238 B
Plaintext
QA output created by 288
|
|
[+] Length is zero (should fail)
|
|
fstrim: SCRATCH_MNT: FITRIM ioctl failed: Invalid argument
|
|
[+] Length is smaller than block size (should fail)
|
|
fstrim: SCRATCH_MNT: FITRIM ioctl failed: Invalid argument
|
|
Test done
|