Util-Linux package development
 help / color / mirror / Atom feed
* [PATCH] tests: fix fdisk/bsd for alpha
@ 2016-03-16  0:40 Ruediger Meier
  2016-03-16 11:37 ` Karel Zak
  0 siblings, 1 reply; 8+ messages in thread
From: Ruediger Meier @ 2016-03-16  0:40 UTC (permalink / raw)
  To: util-linux; +Cc: Andreas Henriksson

From: Ruediger Meier <ruediger.meier@ga-group.nl>

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 | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/tests/ts/fdisk/bsd b/tests/ts/fdisk/bsd
index cd7a6c6..347c0d0 100755
--- a/tests/ts/fdisk/bsd
+++ b/tests/ts/fdisk/bsd
@@ -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
 }
 
-- 
1.8.4.5


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-03-22 11:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-16  0:40 [PATCH] tests: fix fdisk/bsd for alpha Ruediger Meier
2016-03-16 11:37 ` Karel Zak
2016-03-16 13:11   ` Karel Zak
2016-03-16 15:27     ` Ruediger Meier
2016-03-17 13:33       ` Karel Zak
2016-03-17 21:52         ` Ruediger Meier
2016-03-18 14:36           ` Karel Zak
2016-03-22 11:04             ` Ruediger Meier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox