From: Karel Zak Date: Tue, 14 Jan 2014 08:51:02 +0000 (+0100) Subject: tests: add partx --update test X-Git-Tag: v2.25-rc1~649 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3eb433df82622b4f7499eed6010dc2a3ffe5289d;p=thirdparty%2Futil-linux.git tests: add partx --update test Signed-off-by: Karel Zak --- diff --git a/tests/expected/partx/partx-update-one b/tests/expected/partx/partx-update-one new file mode 100644 index 0000000000..4dacd624c1 --- /dev/null +++ b/tests/expected/partx/partx-update-one @@ -0,0 +1 @@ +partitions updated diff --git a/tests/ts/partx/partx b/tests/ts/partx/partx index 54aef8bbb7..76d1db49ab 100755 --- a/tests/ts/partx/partx +++ b/tests/ts/partx/partx @@ -88,6 +88,16 @@ ts_finalize_subtest udevadm settle +ts_init_subtest "update-one" +#read DEVICE and update second partition +$TS_CMD_PARTX --update ${DEVICE}2 &> $TS_OUTPUT +[ $(ls -d /sys/block/${DEVNAME}/${DEVNAME}* 2>/dev/null | wc -l) -eq $PARTS ] && + echo "partitions updated" >> $TS_OUTPUT 2>&1 || + echo "Unable to update 2nd partition for $DEVICE" >> $TS_OUTPUT 2>&1 +ts_finalize_subtest + +udevadm settle + ts_init_subtest "delete-one" #remove last partition only $TS_CMD_PARTX -d --nr -1 $DEVICE >> $TS_OUTPUT 2>&1