1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
#!/bin/sh
set -e
DISK=$AUTOPKGTEST_TMP/disk
cleanup () {
rm -f $DISK || true
}
trap "cleanup" 0 2 3 15
# create test disk
printf "\n=== disk ===\n"
dd if=/dev/zero of=$DISK bs=1M count=200 2>&1
# test tools
printf "\n=== mkfs ===\n"
if ! mkfs.ocfs2 --force --mount local --block-size 4096 $DISK 2>&1; then
# skip the test if the open fails with invalid argument
exit 77
fi
printf "\n=== fsck ===\n"
echo y | fsck.ocfs2 -f -y -F $DISK 2>&1
printf "\n=== debugfs ===\n"
debugfs.ocfs2 -R stats $DISK
|