summaryrefslogtreecommitdiffstats
path: root/tests/ts/fdisk/id
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/id
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/id')
-rwxr-xr-xtests/ts/fdisk/id13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ts/fdisk/id b/tests/ts/fdisk/id
index a24d793e8..85b87d682 100755
--- a/tests/ts/fdisk/id
+++ b/tests/ts/fdisk/id
@@ -25,6 +25,19 @@ ts_check_test_command "$TS_CMD_FDISK"
FDISK_CMD_ID1="x\ni\n0x1\nr\nw\n"
FDISK_CMD_ID2="x\ni\n0x2\nr\nw\n"
+# 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}"
+
ts_log "Initialize empty image"
TEST_IMAGE_NAME=$(ts_image_init 10)