From a43665128cf8942a61920524e14b3a0b5827ce6d Mon Sep 17 00:00:00 2001 From: Anatoly Pugachev Date: Wed, 23 Oct 2019 11:26:19 +0300 Subject: [PATCH] tests: fixes blkid/md-raidX-whole on Sparc Since SPARC is using 'sun' partition table by default, make test not to assume that disk has 'dos' partition table, so write 'dos' partition table on disk, before proceeding any further. Signed-off-by: Anatoly Pugachev --- tests/expected/blkid/md-raid0-whole | 2 -- tests/expected/blkid/md-raid1-whole | 2 -- tests/ts/blkid/md-raid0-whole | 7 +++++++ tests/ts/blkid/md-raid1-whole | 7 +++++++ 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/tests/expected/blkid/md-raid0-whole b/tests/expected/blkid/md-raid0-whole index 340cf5378..cc0b17f83 100644 --- a/tests/expected/blkid/md-raid0-whole +++ b/tests/expected/blkid/md-raid0-whole @@ -6,8 +6,6 @@ Welcome to fdisk . Changes will remain in memory only, until you decide to write them. Be careful before using the write command. -Device does not contain a recognized partition table. -Created a new . Command (m for help): Partition type p primary (0 primary, 0 extended, 4 free) diff --git a/tests/expected/blkid/md-raid1-whole b/tests/expected/blkid/md-raid1-whole index 9cf665503..6334ae114 100644 --- a/tests/expected/blkid/md-raid1-whole +++ b/tests/expected/blkid/md-raid1-whole @@ -6,8 +6,6 @@ Welcome to fdisk . Changes will remain in memory only, until you decide to write them. Be careful before using the write command. -Device does not contain a recognized partition table. -Created a new . Command (m for help): Partition type p primary (0 primary, 0 extended, 4 free) diff --git a/tests/ts/blkid/md-raid0-whole b/tests/ts/blkid/md-raid0-whole index 2b5451da5..be3269499 100755 --- a/tests/ts/blkid/md-raid0-whole +++ b/tests/ts/blkid/md-raid0-whole @@ -48,6 +48,13 @@ ts_log "Create RAID device" mdadm -q --create ${MD_DEVICE} --metadata=0.90 --chunk=64 --level=0 \ --raid-devices=2 ${DEVICE1} ${DEVICE2} >> $TS_OUTPUT 2>> $TS_ERRLOG +# create dos partition table +$TS_CMD_FDISK ${MD_DEVICE} &>/dev/null <> $TS_OUTPUT 2>> $TS_ERRLOG <> $TS_OUTPUT 2>> $TS_ERRLOG udevadm settle +# create dos partition table +$TS_CMD_FDISK ${MD_DEVICE} &>/dev/null <> $TS_OUTPUT 2>> $TS_ERRLOG <