]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: add partx --update test
authorKarel Zak <kzak@redhat.com>
Tue, 14 Jan 2014 08:51:02 +0000 (09:51 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 14 Jan 2014 08:51:02 +0000 (09:51 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
tests/expected/partx/partx-update-one [new file with mode: 0644]
tests/ts/partx/partx

diff --git a/tests/expected/partx/partx-update-one b/tests/expected/partx/partx-update-one
new file mode 100644 (file)
index 0000000..4dacd62
--- /dev/null
@@ -0,0 +1 @@
+partitions updated
index 54aef8bbb7096ae0ffe8dcd91657be06d437ff20..76d1db49abb3cab417176b5cdf6f705b504b7ea4 100755 (executable)
@@ -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