mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
d6f51d9289
This test suppose to validate that file systems are using the fitrim arguments right. It checks that the fstrim returns EINVAl in case that the start of the range is beyond the end of the file system, and also that the fstrim works without an error if the length of the range is bigger than the file system (it should be truncated to the file system length automatically within the fitrim implementation). This test should also catch common problem with overflow of start+len. Some file systems (ext4,xfs) had overflow problems in the past so there is a specific test for it (for ext4 and xfs) as well as generic test for other file systems, but it would be nice if other fs can add their specific checks if this problem does apply to them as well. [Added call to _require_math. -Alex] Signed-off-by: Lukas Czerner <lczerner@redhat.com> Signed-off-by: Alex Elder <aelder@sgi.com>
15 lines
551 B
Plaintext
15 lines
551 B
Plaintext
QA output created by 260
|
|
[+] Start beyond the end of fs (should fail)
|
|
fstrim: FSTRIM: Invalid argument
|
|
[+] Start beyond the end of fs with len set (should fail)
|
|
fstrim: FSTRIM: Invalid argument
|
|
[+] Start = 2^64-1 (should fail)
|
|
fstrim: FSTRIM: Invalid argument
|
|
[+] Start = 2^64-1 and len is set (should fail)
|
|
fstrim: FSTRIM: Invalid argument
|
|
[+] Default length (should succeed)
|
|
[+] Default length with start set (should succeed)
|
|
[+] Length beyond the end of fs (should succeed)
|
|
[+] Length beyond the end of fs with start set (should succeed)
|
|
Test done
|