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

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