[parted-devel] [PATCH] tests: Add ntfs vfat hfsplus to t1700 probe test
Brian C. Lane
bcl at redhat.com
Thu Apr 17 22:16:04 UTC 2014
Add some new filesystems to test. Adjust how mkfs.* tests, since some of
them don't support -V, and add fsname so that the printed filesystem
name doesn't have to match the type.
* tests/t1700-probe-fs.sh: Add new filesystems to test
---
tests/t1700-probe-fs.sh | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/tests/t1700-probe-fs.sh b/tests/t1700-probe-fs.sh
index bf6ad9c..d53cc7e 100755
--- a/tests/t1700-probe-fs.sh
+++ b/tests/t1700-probe-fs.sh
@@ -23,14 +23,20 @@ dev=loop-file
ss=$sector_size_
n_sectors=$((257*1024))
-for type in ext2 ext3 ext4 btrfs xfs nilfs2; do
+for type in ext2 ext3 ext4 btrfs xfs nilfs2 ntfs vfat hfsplus; do
- ( mkfs.$type -V ) >/dev/null 2>&1 \
+ ( mkfs.$type 2>&1 | grep -i '^usage' ) > /dev/null \
|| { warn_ "$ME: no $type support"; continue; }
- case $type in ext*) force=-F;;
+ fsname=$type
+ force=
+ case $type in
+ ext*) force=-F;;
xfs) force=-f;;
- *) force=;; esac
+ ntfs) force=-F;;
+ vfat) fsname=fat16;;
+ hfsplus) fsname=hfs+;;
+ esac
# create an $type file system
dd if=/dev/null of=$dev bs=$ss seek=$n_sectors >/dev/null || fail=1
@@ -38,7 +44,7 @@ for type in ext2 ext3 ext4 btrfs xfs nilfs2; do
# probe the $type file system
parted -m -s $dev u s print >out 2>&1 || fail=1
- grep '^1:.*:'$type'::;$' out || { cat out; fail=1; }
+ grep '^1:.*:'$fsname'::;$' out || { cat out; fail=1; }
done
--
1.9.0
More information about the parted-devel
mailing list