summaryrefslogtreecommitdiffstats
path: root/tests/bsd/sparse.sh
blob: 7fcdeed68cb1d8bdbb357dabb0438e2b39372e41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
test "$UNAME" = "Linux" || skip

cd "$TEST"
mkdir mnt

bfs_sudo mount -t tmpfs tmpfs mnt || skip
defer bfs_sudo umount mnt

truncate -s 1M mnt/sparse
dd if=/dev/zero of=mnt/dense bs=1M count=1

bfs_diff mnt -type f -sparse