summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarel Zak2014-01-14 09:51:02 +0100
committerKarel Zak2014-01-14 09:51:02 +0100
commit3eb433df82622b4f7499eed6010dc2a3ffe5289d (patch)
tree8376cf50946665acf89742c4cbb8161ba0315c09
parenttests: update partx sgi test (diff)
downloadkernel-qcow2-util-linux-3eb433df82622b4f7499eed6010dc2a3ffe5289d.tar.gz
kernel-qcow2-util-linux-3eb433df82622b4f7499eed6010dc2a3ffe5289d.tar.xz
kernel-qcow2-util-linux-3eb433df82622b4f7499eed6010dc2a3ffe5289d.zip
tests: add partx --update test
Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r--tests/expected/partx/partx-update-one1
-rwxr-xr-xtests/ts/partx/partx10
2 files changed, 11 insertions, 0 deletions
diff --git a/tests/expected/partx/partx-update-one b/tests/expected/partx/partx-update-one
new file mode 100644
index 000000000..4dacd624c
--- /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 54aef8bbb..76d1db49a 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