[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] tests: skip failing use of mkfs.hfs unless using newer, fixed ve
From: |
Jim Meyering |
Subject: |
[PATCH] tests: skip failing use of mkfs.hfs unless using newer, fixed version |
Date: |
Sat, 18 Feb 2012 15:26:11 +0100 |
"make distcheck" has been failing for anyone who runs the root-only
tests, due to a losing fsck.hfs. Work around it:
>From 48977ba4804fe73562f113f9678465a516449153 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sat, 18 Feb 2012 15:24:37 +0100
Subject: [PATCH] tests: skip failing use of mkfs.hfs unless using newer,
fixed version
The old, segfaulting version does not recognize the -v option, while
the new one does. Use that to skip the test when it seems that
fsck.hfs is broken.
* tests/t3000-resize-fs.sh: Skip part of this root-only test
when fsck.hfs is the always-segfaulting version.
---
tests/t3000-resize-fs.sh | 49 ++++++++++++++++++++++++++-------------------
1 file changed, 28 insertions(+), 21 deletions(-)
diff --git a/tests/t3000-resize-fs.sh b/tests/t3000-resize-fs.sh
index 4a3c8a3..2fd36a5 100755
--- a/tests/t3000-resize-fs.sh
+++ b/tests/t3000-resize-fs.sh
@@ -77,27 +77,34 @@ for fs_type in hfs+ fat32; do
# Fedora 16's hfsplus-tools-332.14-12.fc15.x86_64.
# You can build a working version from
# git://cavan.codon.org.uk/hfsplus-tools.git
- # FIXME: check the version somehow and skip if it's not known to work.
- $fsck ${dev}1 > out || fail=1
- cat out
- # Oops. Currently, fsck.hfs reports this:
- # Executing fsck_hfs (version 540.1-Linux).
- # ** Checking non-journaled HFS Plus Volume.
- # The volume name is untitled
- # ** Checking extents overflow file.
- # ** Checking catalog file.
- # ** Checking multi-linked files.
- # ** Checking catalog hierarchy.
- # ** Checking volume bitmap.
- # Volume bitmap needs minor repair for orphaned blocks
- # ** Checking volume information.
- # Invalid volume free block count
- # (It should be 67189 instead of 65197)
- # Volume header needs minor repair
- # (2, 0)
- # FIXME: This means the HFS resizing code is wrong.
-
- # FIXME: parse "out" for FS size and verify that it's the new, smaller size
+
+ # Skip the fsck.hfs test unless it understands the -v option.
+ skip=0
+ case $fs_type in
+ hfs*) $fsck -v || { warn_ skipping $fsck test; skip=1; } ;; esac
+
+ if test $skip = 0; then
+ $fsck ${dev}1 > out || fail=1
+ cat out
+ # Oops. Currently, fsck.hfs reports this:
+ # Executing fsck_hfs (version 540.1-Linux).
+ # ** Checking non-journaled HFS Plus Volume.
+ # The volume name is untitled
+ # ** Checking extents overflow file.
+ # ** Checking catalog file.
+ # ** Checking multi-linked files.
+ # ** Checking catalog hierarchy.
+ # ** Checking volume bitmap.
+ # Volume bitmap needs minor repair for orphaned blocks
+ # ** Checking volume information.
+ # Invalid volume free block count
+ # (It should be 67189 instead of 65197)
+ # Volume header needs minor repair
+ # (2, 0)
+ # FIXME: This means the HFS resizing code is wrong.
+
+ # FIXME: parse "out" for FS size and verify that it's the new, smaller size
+ fi
# Remove the partition explicitly, so that mklabel doesn't evoke a warning.
parted -s $dev rm 1 || fail=1
--
1.7.9.1.245.gbbe07
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] tests: skip failing use of mkfs.hfs unless using newer, fixed version,
Jim Meyering <=