From ff1b3d12cb798477b64c09cc0e3b9b2b6bc3e9da Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 28 Mar 2024 12:24:50 -0400 Subject: tests/bsd: Add a -sparse test --- tests/bsd/sparse.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/bsd/sparse.sh (limited to 'tests/bsd/sparse.sh') diff --git a/tests/bsd/sparse.sh b/tests/bsd/sparse.sh new file mode 100644 index 0000000..7fcdeed --- /dev/null +++ b/tests/bsd/sparse.sh @@ -0,0 +1,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 -- cgit v1.2.3