diff options
author | Pádraig Brady <P@draigBrady.com> | 2021-09-25 14:23:37 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2021-09-25 22:40:01 +0100 |
commit | 61c81ffaacb0194dec31297bc1aa51be72315858 (patch) | |
tree | 835706429277b371b956d00dc15f66ec0be3926e /init.cfg | |
parent | e8b56ebd536e82b15542a00c888109471936bfda (diff) | |
download | coreutils-61c81ffaacb0194dec31297bc1aa51be72315858.tar.gz |
tests: cp/sparse-perf: make more robust and add zfs comments
* init.cfg (seek_data_capable_): Add a timeout to ensure failure for
slow lseek(...SEEK_DATA) calls (even if that syscall isn't interrupted).
* tests/cp/sparse-perf.sh: Run the SEEK_DATA check on the
1TiB empty file to exclude both FreeBSD 9.1 which takes 35s,
and ZFS which requires a delay of about 5s between file creation
and use of SEEK_DATA to correctly determine it's empty (return ENXIO).
Also remove the stat size checks as they invalidate the test
due to cp never writing data due to it being always zeros,
and thus converted to holes in the output.
Diffstat (limited to 'init.cfg')
-rw-r--r-- | init.cfg | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -540,7 +540,14 @@ seek_data_capable_() warn_ 'seek_data_capable_: python missing: assuming not SEEK_DATA capable' return 1 fi - $PYTHON_ "$abs_srcdir"/tests/seek-data-capable "$@" + + # Use timeout if available to skip cases where SEEK_DATA takes a long time. + # We saw FreeBSD 9.1 take 35s to return from SEEK_DATA for a 1TiB empty file. + # Note lseek() is uninterruptible on FreeBSD 9.1, but it does eventually + # return, and the timeout will ensure a failure return from the process. + timeout --version >/dev/null && TIMEOUT_='timeout 10' + + $TIMEOUT_ $PYTHON_ "$abs_srcdir"/tests/seek-data-capable "$@" } # Skip the current test if "." lacks d_type support. |