diff options
author | Karel Zak | 2017-02-20 13:22:55 +0100 |
---|---|---|
committer | Karel Zak | 2017-02-20 13:22:55 +0100 |
commit | 34f3469d18ed071f7857b690656c2f130093bbb1 (patch) | |
tree | 35483f88598dc0ecf3f96842fcc6bccce483f4d8 | |
parent | libblkid: remove unnecessary 'static' keyword (diff) | |
download | kernel-qcow2-util-linux-34f3469d18ed071f7857b690656c2f130093bbb1.tar.gz kernel-qcow2-util-linux-34f3469d18ed071f7857b690656c2f130093bbb1.tar.xz kernel-qcow2-util-linux-34f3469d18ed071f7857b690656c2f130093bbb1.zip |
tests: another improvement to the sfdisk wipe test
Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r-- | tests/expected/sfdisk/wipe-partition | 2 | ||||
-rwxr-xr-x | tests/ts/sfdisk/wipe | 18 |
2 files changed, 7 insertions, 13 deletions
diff --git a/tests/expected/sfdisk/wipe-partition b/tests/expected/sfdisk/wipe-partition index 62051b262..4712d1fa1 100644 --- a/tests/expected/sfdisk/wipe-partition +++ b/tests/expected/sfdisk/wipe-partition @@ -17,6 +17,8 @@ Device Start End Sectors Size Type <removed>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 d5f12b772..ed89e9a9c 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 |