]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: fixes blkid/md-raidX-whole on Sparc
authorAnatoly Pugachev <matorola@gmail.com>
Wed, 23 Oct 2019 08:26:19 +0000 (11:26 +0300)
committerAnatoly Pugachev <matorola@gmail.com>
Wed, 23 Oct 2019 08:26:19 +0000 (11:26 +0300)
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 <matorola@gmail.com>
tests/expected/blkid/md-raid0-whole
tests/expected/blkid/md-raid1-whole
tests/ts/blkid/md-raid0-whole
tests/ts/blkid/md-raid1-whole

index 340cf537846916c277a0e4516b6bbfb2bf55efb4..cc0b17f83e656fb2a32a208e7f3b81a9c4cc31d1 100644 (file)
@@ -6,8 +6,6 @@ Welcome to fdisk <removed>.
 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 <removed>.
 
 Command (m for help): Partition type
    p   primary (0 primary, 0 extended, 4 free)
index 9cf665503c8ef3b078ff5633beae5e085abb0646..6334ae114957456f8ff9775704f18fb7baedb04b 100644 (file)
@@ -6,8 +6,6 @@ Welcome to fdisk <removed>.
 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 <removed>.
 
 Command (m for help): Partition type
    p   primary (0 primary, 0 extended, 4 free)
index 2b5451da5a4ed678f5225973138f99c6694290dc..be3269499b5b8f18efc680a12d5de2c29a4a1cf8 100755 (executable)
@@ -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 <<EOF
+o
+w
+q
+EOF
+
 ts_log "Create partitions on RAID device"
 $TS_CMD_FDISK ${MD_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG <<EOF
 n
index d66de195adc02feb0924018396dc7b154fd22c6d..7a3030add5ff9db4b27c2058541032c3476c15aa 100755 (executable)
@@ -51,6 +51,13 @@ mdadm -q --create ${MD_DEVICE} --metadata=0.90 --chunk=64 --level=1 \
            --raid-devices=2 ${DEVICE1} ${DEVICE2} >> $TS_OUTPUT 2>> $TS_ERRLOG
 udevadm settle
 
+# create dos partition table
+$TS_CMD_FDISK ${MD_DEVICE} &>/dev/null <<EOF
+o
+w
+q
+EOF
+
 ts_log "Create partitions on RAID device"
 $TS_CMD_FDISK ${MD_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG <<EOF
 n