Blame SOURCES/0006-tests-t3000-resize-fs.sh-Add-requirement-on-mkfs.vfa.patch

003ee8
From ac74b830ce518c2228b8ae3fba3f1ece82b49f81 Mon Sep 17 00:00:00 2001
003ee8
From: Mike Fleetwood <mike.fleetwood@googlemail.com>
003ee8
Date: Sun, 28 Sep 2014 16:15:50 +0100
003ee8
Subject: [PATCH 6/6] tests: t3000-resize-fs.sh: Add requirement on mkfs.vfat
003ee8
003ee8
Add test skipping requirement on mkfs.vfat for the FAT32 and FAT16 file
003ee8
system resizing tests.  This matches existing test skipping requirement
003ee8
on mkfs.hfs for the hfs+ file system.
003ee8
003ee8
* tests/t3000-resize-fs.sh: Also correct skip_test_ to skip_.
003ee8
* tests/t-lib-helpers.sh: Also update message for requirement of hfs.
003ee8
---
003ee8
 tests/t-lib-helpers.sh   | 8 +++++++-
003ee8
 tests/t3000-resize-fs.sh | 5 +++--
003ee8
 2 files changed, 10 insertions(+), 3 deletions(-)
003ee8
003ee8
diff --git a/tests/t-lib-helpers.sh b/tests/t-lib-helpers.sh
003ee8
index 4e83a05..c8684bb 100644
003ee8
--- a/tests/t-lib-helpers.sh
003ee8
+++ b/tests/t-lib-helpers.sh
003ee8
@@ -20,7 +20,13 @@ require_acl_()
003ee8
 require_hfs_()
003ee8
 {
003ee8
   mkfs.hfs 2>&1 | grep '^usage:' \
003ee8
-    || skip_ "This test requires HFS support."
003ee8
+    || skip_ "mkfs.hfs: command not found"
003ee8
+}
003ee8
+
003ee8
+require_fat_()
003ee8
+{
003ee8
+  mkfs.vfat 2>&1 | grep '^Usage:' \
003ee8
+    || skip_ "mkfs.vfat: command not found"
003ee8
 }
003ee8
 
003ee8
 # Skip this test if we're not in SELinux "enforcing" mode.
003ee8
diff --git a/tests/t3000-resize-fs.sh b/tests/t3000-resize-fs.sh
003ee8
index 9084eb4..a79a307 100755
003ee8
--- a/tests/t3000-resize-fs.sh
003ee8
+++ b/tests/t3000-resize-fs.sh
003ee8
@@ -18,7 +18,7 @@
003ee8
 
003ee8
 . "${srcdir=.}/init.sh"; path_prepend_ ../parted .
003ee8
 require_hfs_
003ee8
-
003ee8
+require_fat_
003ee8
 require_root_
003ee8
 require_scsi_debug_module_
003ee8
 require_512_byte_sector_size_
003ee8
@@ -31,7 +31,7 @@ default_end=546147s
003ee8
 
003ee8
 # create memory-backed device
003ee8
 scsi_debug_setup_ dev_size_mb=550 > dev-name ||
003ee8
-  skip_test_ 'failed to create scsi_debug device'
003ee8
+  skip_ 'failed to create scsi_debug device'
003ee8
 dev=$(cat dev-name)
003ee8
 
003ee8
 fail=0
003ee8
@@ -47,6 +47,7 @@ device_sectors_required=$(echo $default_end | sed 's/s$//')
003ee8
 test $device_sectors_required -le $dev_n_sectors || fail=1
003ee8
 
003ee8
 for fs_type in hfs+ fat32 fat16; do
003ee8
+  echo "fs_type=$fs_type"
003ee8
 
003ee8
   # create an empty $fs_type partition, cylinder aligned, size > 256 MB
003ee8
   parted -a min -s $dev mkpart p1 $start $default_end > out 2>&1 || fail=1
003ee8
-- 
003ee8
1.9.3
003ee8