]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: fix fdisk/bsd for alpha
authorRuediger Meier <ruediger.meier@ga-group.nl>
Wed, 16 Mar 2016 00:40:44 +0000 (01:40 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 16 Mar 2016 09:39:34 +0000 (10:39 +0100)
There are special __alpha__ ifdefs in libfdisk/src/bsd.c
Regarding 565964a9 and a80886e9.

BTW it was a bad idea to use md5sum. In case of failure it
would be much easier to debug hexdump diffs. Now it's nearly
impossible to collect all these exotic hexdumps.

CC: Andreas Henriksson <andreas@fatal.se>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
tests/ts/fdisk/bsd

index cd7a6c6f217c5c0790ba008e3e0433ff9b9ab8e3..347c0d0784cda086be6ec03dda57ef45b46f9811 100755 (executable)
@@ -51,7 +51,7 @@ function fdisk_bsd_offset_and_byte_order_clean
                local md5_bsdimg1_LE_0_64="2e1cee529cb59c9341afef0443f196a1"
                local md5_bsdimg2_LE_0_64="b5c121c2091b2ff26b880551feac7112"
 
-        if [ $BYTE_ORDER = "BE" ] ; then
+       if [ $BYTE_ORDER = "BE" ] ; then
                # BSD_LABELSECTOR = 0, BSD_LABELOFFSET = 64
                sed -i \
                -e "s/c2273b52976351db75596c47c10b0725/$md5_bsdimg1_LE_0_64/" \
@@ -69,6 +69,15 @@ function fdisk_bsd_offset_and_byte_order_clean
                -e "s/6d760d7a8ef33b27cc6e27f1e8807d48/$md5_bsdimg1_LE_0_64/" \
                -e "s/3739c7959adb42693a69edb7a99914e8/$md5_bsdimg2_LE_0_64/" \
                "$TS_OUTPUT"
+
+               # special case for alpha
+               if grep -q "78a922a80361cb73049bced72e0f8f1d" $TS_OUTPUT; then
+                       sed -i \
+                               -e "s/78a922a80361cb73049bced72e0f8f1d/$md5_bsdimg1_LE_0_64/" \
+                               -e "s/fc2803672a0643ffe46da325629616fc/$md5_bsdimg2_LE_0_64/" \
+                               -e 's/\(3 *Version 7 *8 *\)ext2  /\1MS-DOS/' \
+                               "$TS_OUTPUT"
+               fi
        fi
 }