summaryrefslogtreecommitdiff
path: root/tests/t3000-resize-fs.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/t3000-resize-fs.sh')
-rwxr-xr-xtests/t3000-resize-fs.sh16
1 files changed, 13 insertions, 3 deletions
diff --git a/tests/t3000-resize-fs.sh b/tests/t3000-resize-fs.sh
index 1f2e46e..282b6fc 100755
--- a/tests/t3000-resize-fs.sh
+++ b/tests/t3000-resize-fs.sh
@@ -17,12 +17,22 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
. "${srcdir=.}/init.sh"; path_prepend_ ../parted .
-require_hfs_
-require_fat_
require_root_
require_scsi_debug_module_
require_512_byte_sector_size_
+
+FSTYPES=""
+
+# Is mkfs.hfs available?
+mkfs.hfs 2>&1 | grep '^usage:' && FSTYPES="hfs+"
+
+# Is mkfs.vfat available?
+mkfs.vfat 2>&1 | grep '^Usage:' && FSTYPES="$FSTYPES fat32 fat16"
+
+[ -n "$FSTYPES" ] || skip_ "Neither mkfs.hfs nor mkfs.vfat installed"
+
+
ss=$sector_size_
start=63s
@@ -53,7 +63,7 @@ mkdir "$mount_point" || fail=1
# be sure to unmount upon interrupt, failure, etc.
cleanup_fn_() { umount "${dev}1" > /dev/null 2>&1; }
-for fs_type in hfs+ fat32 fat16; do
+for fs_type in $FSTYPES; do
echo "fs_type=$fs_type"
# create an empty $fs_type partition, cylinder aligned, size > 256 MB