From: Ruediger Meier <sweet_f_a@gmx.de>
To: util-linux@vger.kernel.org
Subject: [PATCH] tests: fix fdisk/bsd for big endian systems
Date: Thu, 29 May 2014 17:25:07 +0200 [thread overview]
Message-ID: <1401377107-23101-1-git-send-email-sweet_f_a@gmx.de> (raw)
In-Reply-To: <201405291701.55218.sweet_f_a@gmx.de>
From: Ruediger Meier <ruediger.meier@ga-group.nl>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
---
tests/ts/fdisk/bsd | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/tests/ts/fdisk/bsd b/tests/ts/fdisk/bsd
index 7e3c787..32b3f31 100755
--- a/tests/ts/fdisk/bsd
+++ b/tests/ts/fdisk/bsd
@@ -39,6 +39,17 @@ FDISK_CMD_BSD_LIST_TYPES="b\nl\nq\n" # list supported PT types and quit
#set -x
+# BSD disklabel depends on endianess
+BYTE_ORDER=$($TS_HELPER_SYSINFO byte-order)
+function fdisk_bsd_byte_order_clean
+{
+ [ $BYTE_ORDER = "BE" ] || return
+ sed -i \
+ -e s/2e1cee529cb59c9341afef0443f196a1/c2273b52976351db75596c47c10b0725/\
+ -e s/b5c121c2091b2ff26b880551feac7112/9a234a5b99e37d2ce0d92b65437b93cd/\
+ "$TS_OUTPUT"
+}
+
function print_layout {
echo -ne "\n---layout----------" >> $TS_OUTPUT
$TS_CMD_FDISK -l ${TEST_IMAGE_NAME} >> $TS_OUTPUT
@@ -102,5 +113,6 @@ echo -e "${FDISK_CMD_BSD_LIST_TYPES}" | \
$TS_CMD_FDISK ${TEST_IMAGE_NAME} | \
sed 's/Reading .*//g; s/Welcome to fdisk .*//' >> $TS_OUTPUT 2>&1
+fdisk_bsd_byte_order_clean
ts_fdisk_clean ${TEST_IMAGE_NAME}
ts_finalize
--
1.8.4.5
next prev parent reply other threads:[~2014-05-29 15:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-12 18:45 bugs on exotic archs Ruediger Meier
2014-05-13 8:23 ` Karel Zak
2014-05-13 13:36 ` Ruediger Meier
2014-05-29 15:01 ` Ruediger Meier
2014-05-29 15:25 ` Ruediger Meier [this message]
2014-05-29 17:32 ` [PATCH] tests: fix fdisk/bsd for big endian systems Ruediger Meier
2014-05-29 17:52 ` Ruediger Meier
2014-06-09 11:02 ` Karel Zak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1401377107-23101-1-git-send-email-sweet_f_a@gmx.de \
--to=sweet_f_a@gmx.de \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox