From: Karel Zak Date: Mon, 20 Feb 2017 12:22:55 +0000 (+0100) Subject: tests: another improvement to the sfdisk wipe test X-Git-Tag: v2.30-rc1~222 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=34f3469d18ed071f7857b690656c2f130093bbb1;p=thirdparty%2Futil-linux.git tests: another improvement to the sfdisk wipe test Signed-off-by: Karel Zak --- diff --git a/tests/expected/sfdisk/wipe-partition b/tests/expected/sfdisk/wipe-partition index 62051b262d..4712d1fa10 100644 --- a/tests/expected/sfdisk/wipe-partition +++ b/tests/expected/sfdisk/wipe-partition @@ -17,6 +17,8 @@ Device Start End Sectors Size Type 1 2048 102366 100319 49M Linux filesystem The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. =====Create FS in partition================================ diff --git a/tests/ts/sfdisk/wipe b/tests/ts/sfdisk/wipe index d5f12b772c..ed89e9a9ce 100755 --- a/tests/ts/sfdisk/wipe +++ b/tests/ts/sfdisk/wipe @@ -80,7 +80,7 @@ ts_init_subtest "partition" ts_separator "Create GPT" $TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null udevadm settle -echo ',,L' | $TS_CMD_SFDISK $SFDISK_OPTS --label=gpt ${TS_DEVICE} >> $TS_OUTPUT 2>&1 +echo ',,L' | $TS_CMD_SFDISK --no-reread --label=gpt ${TS_DEVICE} >> $TS_OUTPUT 2>&1 udevadm settle ts_separator "Create FS in partition" $TS_CMD_MKSWAP ${TS_DEVICE}1 &> /dev/null @@ -94,19 +94,11 @@ udevadm settle ts_separator "Check content (disk)" $TS_CMD_WIPEFS ${TS_DEVICE} >> $TS_OUTPUT 2>&1 udevadm settle +ts_separator "Check content (partition)" +$TS_CMD_WIPEFS ${TS_DEVICE}1 >> $TS_OUTPUT 2>&1 +ts_fdisk_clean $TS_DEVICE +ts_finalize_subtest -# this sometimes do not pass on Travis CI... just skip -# -DEVNAME=$(basename $TS_DEVICE) -grep -q "${DEVNAME}1" /proc/partitions -if [ $? -ne 0 ]; then - ts_skip_subtest "no ${TS_DEVICE}1 partition!" -else - ts_separator "Check content (partition)" - $TS_CMD_WIPEFS ${TS_DEVICE}1 >> $TS_OUTPUT 2>&1 - ts_fdisk_clean $TS_DEVICE - ts_finalize_subtest -fi udevadm settle ts_finalize