tests: Fix fdisk/id and fdisk/mbr-nondos-mode on Sparc
PATCH 1/1 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 <[email protected]>
--- tests/expected/fdisk/id.sparc | 3 + tests/expected/fdisk/mbr-nondos-mode.sparc | 189 +++++++++++++++++++++++++++++ tests/ts/fdisk/id | 13 ++ tests/ts/fdisk/mbr-nondos-mode | 13 ++ 4 files changed, 218 insertions(+)
tests/expected/fdisk/id.sparc new file +3 -0
@@ -0,0 +1,3 @@ +Initialize empty image +Create MBR with ID=0x1 +Create MBR with ID=0x2
tests/expected/fdisk/mbr-nondos-mode.sparc new file +189 -0
189 lines not on this page · raw message
tests/ts/fdisk/id +13 -0
@@ -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)
tests/ts/fdisk/mbr-nondos-mode +13 -0
@@ -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
Signature · 1 line
2.9.1
Quoted 10 lines · James Clarke
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 <[email protected]>--- tests/expected/fdisk/id.sparc | 3 + tests/expected/fdisk/mbr-nondos-mode.sparc | 189 +++++++++++++++++++++++++++++ tests/ts/fdisk/id | 13 ++ tests/ts/fdisk/mbr-nondos-mode | 13 ++ 4 files changed, 218 insertions(+)
Applied, thanks!
Karel
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com