From 4fa3633e87a377cc8541c246c8f2b8ac8222212d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thomas=20Wei=C3=9Fschuh?= Date: Wed, 28 Dec 2022 03:47:46 +0000 Subject: [PATCH] tests: functions: allow partitions on loopdevs This allow us the add partition to the test devices. --- tests/expected/fdisk/gpt-resize | 3 +-- tests/expected/fdisk/gpt-resize.err | 1 - tests/functions.sh | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/expected/fdisk/gpt-resize b/tests/expected/fdisk/gpt-resize index d6a331a7f5..151b5f584a 100644 --- a/tests/expected/fdisk/gpt-resize +++ b/tests/expected/fdisk/gpt-resize @@ -27,8 +27,7 @@ Created a new partition . 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 : 20 MiB, 20971520 bytes, 40960 sectors diff --git a/tests/expected/fdisk/gpt-resize.err b/tests/expected/fdisk/gpt-resize.err index 8c8922493a..ca58735aa1 100644 --- a/tests/expected/fdisk/gpt-resize.err +++ b/tests/expected/fdisk/gpt-resize.err @@ -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 diff --git a/tests/functions.sh b/tests/functions.sh index c529b3f928..ed578d2e78 100644 --- a/tests/functions.sh +++ b/tests/functions.sh @@ -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 -- 2.47.3