1#! /bin/sh 2# 3# @(#)sparse.sh 1.3 20/03/30 Copyright 2019-2020 J. Schilling 4# 5 6# sparse.sh: Tests to check whether sparse files work. 7# This is portability in contrast to achive type 8# recognition. 9 10# Import common functions & definitions. 11. ../common/test-common 12 13LC_ALL=C export LC_ALL 14# 15# IRIX does GMT-1 wrong 16# 17TZ=MET export TZ 18 19#d=`../testutils/realpwd` 20 21s=../../testscripts/tar-test-inputs/sparse-files/gnu-small.tar 22docommand SPARSE-gnu-small "${tar} -tv f=${s}" 0 "\ 23 524288 Srw-r--r-- mgorny/mgorny Nov 24 11:29 2018 input.bin 24" "\ 25star: Blocksize = 19 records. 26star: 1 blocks + 0 bytes (total of 9728 bytes = 9.50k). 27" 28 29s=../../testscripts/tar-test-inputs/sparse-files/gnu.tar 30docommand SPARSE-gnu "${tar} -tv f=${s}" 0 "\ 312097152 Srw-r--r-- mgorny/mgorny Nov 24 11:26 2018 input.bin 32" "\ 33star: 3 blocks + 4096 bytes (total of 34816 bytes = 34.00k). 34" 35 36s=../../testscripts/tar-test-inputs/sparse-files/star.tar 37docommand SPARSE-star "${tar} -tv f=${s}" 0 "\ 382097152 Srw-r--r-- mgorny/mgorny Nov 24 11:26 2018 input.bin 39" "\ 40star: 4 blocks + 0 bytes (total of 40960 bytes = 40.00k). 41" 42 43s=../../testscripts/tar-test-inputs/sparse-files/xstar.tar 44docommand SPARSE-xstar "${tar} -tv f=${s}" 0 "\ 452097152 Srw-r--r-- mgorny/mgorny Nov 24 11:26 2018 input.bin 46" "\ 47star: 4 blocks + 0 bytes (total of 40960 bytes = 40.00k). 48" 49 50success 51