]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: functions: allow partitions on loopdevs
authorThomas Weißschuh <thomas@t-8ch.de>
Wed, 28 Dec 2022 03:47:46 +0000 (03:47 +0000)
committerThomas Weißschuh <thomas@t-8ch.de>
Wed, 28 Dec 2022 04:34:50 +0000 (04:34 +0000)
This allow us the add partition to the test devices.

tests/expected/fdisk/gpt-resize
tests/expected/fdisk/gpt-resize.err
tests/functions.sh

index d6a331a7f54a386e4f329579c28b5e7544630073..151b5f584aae74965c957ff4f411408758d188dd 100644 (file)
@@ -27,8 +27,7 @@ Created a new partition <removed>.
 
 Command (m for help): The partition table has been altered.
 Calling ioctl() to re-read partition table.
-
-The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or partx(8).
+Syncing disks.
 
 ----- list result: -----
 Disk <removed>: 20 MiB, 20971520 bytes, 40960 sectors
index 8c8922493a4dcb53bd20f3fe0f8a3b1d75ec2808..ca58735aa14c4dd40d6649711882d95b3b09a658 100644 (file)
@@ -1,4 +1,3 @@
 ----- fixing after resize: -----
 GPT PMBR size mismatch (20479 != 40959) will be corrected by write.
 The backup GPT table is not on the end of the device. This problem will be corrected by write.
-Re-reading the partition table failed.: Invalid argument
index c529b3f9286de12a45a45493367e6f0e7aee63a1..ed578d2e7812de53c0a0fb3e3c4badf78195323f 100644 (file)
@@ -675,7 +675,7 @@ function ts_device_init {
        local dev
 
        img=$(ts_image_init $1 $2)
-       dev=$($TS_CMD_LOSETUP --show -f "$img")
+       dev=$($TS_CMD_LOSETUP --show --partscan -f "$img")
        if [ "$?" != "0" -o "$dev" = "" ]; then
                ts_die "Cannot init device"
        fi