123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- AT_SETUP([storing sparse file using seek method])
- AT_KEYWORDS([sparse sparse06 chdir])
- m4_define([check_pattern],[
- rm -rf out archive.tar smallsparse && mkdir out
- genfile --sparse --quiet --file smallsparse $1 || AT_SKIP_TEST
- tar -cSf archive.tar smallsparse
- tar -xf archive.tar -C out
- cmp smallsparse out/smallsparse
- ])
- AT_TAR_CHECK([
- AT_SEEKHOLE_PREREQ
- TAR_OPTIONS="$TAR_OPTIONS --hole-detection=seek"
- genfile --sparse --file bigsparse 0 ABC 8G DEF || AT_SKIP_TEST
- tar -cSf a bigsparse
- test $? -eq 0 || exit 1
- check_pattern([0 ABC])
- check_pattern([0 ABC 10M])
- check_pattern([0 ABC 10M DEF])
- check_pattern([10M])
- check_pattern([10M ABC])
- check_pattern([10M ABC 20M])
- check_pattern([10M DEF 20M GHI 30M JKL 40M])
- ],
- [0],,
- [],,,[posix])
- AT_CLEANUP
|