summaryrefslogtreecommitdiffstats
path: root/tests/ts/fdisk/mbr-nondos-mode
diff options
context:
space:
mode:
authorJames Clarke2016-07-14 10:02:24 +0200
committerKarel Zak2016-07-14 12:20:55 +0200
commit0d474d29c58f36085d3dfdfc22524e0870527e00 (patch)
treea5354e1dec0faf8adf46b1eb56fc3017a59e8a22 /tests/ts/fdisk/mbr-nondos-mode
parentblkdiscard: Improve man page (diff)
downloadkernel-qcow2-util-linux-0d474d29c58f36085d3dfdfc22524e0870527e00.tar.gz
kernel-qcow2-util-linux-0d474d29c58f36085d3dfdfc22524e0870527e00.tar.xz
kernel-qcow2-util-linux-0d474d29c58f36085d3dfdfc22524e0870527e00.zip
tests: Fix fdisk/id and fdisk/mbr-nondos-mode on Sparc
On Sparc, fdisk defaults to using SUN disk labels, which causes the output from these tests to differ from non-Sparc. Signed-off-by: James Clarke <jrtc27@jrtc27.com>
Diffstat (limited to 'tests/ts/fdisk/mbr-nondos-mode')
-rwxr-xr-xtests/ts/fdisk/mbr-nondos-mode13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ts/fdisk/mbr-nondos-mode b/tests/ts/fdisk/mbr-nondos-mode
index e01b060f3..7ac5dae1b 100755
--- a/tests/ts/fdisk/mbr-nondos-mode
+++ b/tests/ts/fdisk/mbr-nondos-mode
@@ -37,6 +37,19 @@ FDISK_CMD_DELETE_1PRIMARY="d\n1\n" # delete first primary
FDISK_CMD_DELETE_2PRIMARY="d\n2\n" # delete first primary
FDISK_CMD_DELETE_EXTENDED="d\n3\n" # delete second primary
+# Sparc uses SUN disk labels by default and thus has a different output
+ARCH=$(uname -m)
+case $ARCH in
+ *sparc* )
+ ARCH_EXT=".sparc"
+ ;;
+ *)
+ ARCH_EXT=""
+ ;;
+esac
+
+TS_EXPECTED+="${ARCH_EXT}"
+
function print_layout {
echo -ne "\n---layout----------\n" >> $TS_OUTPUT
$TS_CMD_FDISK -l ${TEST_IMAGE_NAME} >> $TS_OUTPUT