diff options
author | Brian C. Lane <bcl@redhat.com> | 2014-04-17 12:14:48 -0700 |
---|---|---|
committer | Brian C. Lane <bcl@redhat.com> | 2014-05-27 16:21:44 -0700 |
commit | 9041a40cb2e1818ac9ca4942d6be70bf3abdc81b (patch) | |
tree | b13100412604dcafd13b012c95d67b25b4762af8 | |
parent | b71fb875187e54853595d4fda0cba606b4491c2c (diff) | |
download | parted-9041a40cb2e1818ac9ca4942d6be70bf3abdc81b.tar.gz |
tests: Add ntfs vfat hfsplus to t1700 probe test
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
-rwxr-xr-x | tests/t1700-probe-fs.sh | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/tests/t1700-probe-fs.sh b/tests/t1700-probe-fs.sh index 79ae5fe..c4d514a 100755 --- a/tests/t1700-probe-fs.sh +++ b/tests/t1700-probe-fs.sh @@ -23,14 +23,21 @@ 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 + nilfs2) force=-f;; + 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,9 +45,8 @@ 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; } rm $dev - done # Some features should indicate ext4 by themselves. @@ -55,6 +61,7 @@ for feature in uninit_bg flex_bg; do # probe the file system, which should now be ext4 parted -m -s $dev u s print >out 2>&1 || fail=1 grep '^1:.*:ext4::;$' out || fail=1 + rm $dev done Exit $fail |