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