diff --git a/tests/expected/sfdisk/dos-default-vs-gap1 b/tests/expected/sfdisk/dos-default-vs-gap1 new file mode 100644 index 000000000..9539d22e6 --- /dev/null +++ b/tests/expected/sfdisk/dos-default-vs-gap1 @@ -0,0 +1,24 @@ +Checking that no-one is using this disk right now ... OK + +Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes + +>>> Created a new disklabel. +1: Created a new partition . +2: Created a new partition . +3: Done. + +New situation: +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 6144 16383 10240 5M 83 Linux +2 16384 28671 12288 6M 83 Linux + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/dos-default-vs-gap2 b/tests/expected/sfdisk/dos-default-vs-gap2 new file mode 100644 index 000000000..e76f704c9 --- /dev/null +++ b/tests/expected/sfdisk/dos-default-vs-gap2 @@ -0,0 +1,30 @@ +Checking that no-one is using this disk right now ... OK + +Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes + +>>> Created a new disklabel. +1: Created a new partition . +2: Created a new partition . +3: Created a new partition . +4: Created a new partition . +All partitions used. + +New situation: +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 8192 14335 6144 3M 83 Linux +2 26624 36863 10240 5M 83 Linux +3 14336 22527 8192 4M 83 Linux +4 2048 6143 4096 2M 83 Linux + +Partition table entries are not in disk order. + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/ts/sfdisk/dos b/tests/ts/sfdisk/dos index 6887c47cb..a2fd72885 100755 --- a/tests/ts/sfdisk/dos +++ b/tests/ts/sfdisk/dos @@ -232,4 +232,32 @@ ts_fdisk_clean $TS_DEVICE udevadm settle ts_finalize_subtest + +ts_init_subtest "default-vs-gap1" +$TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null +udevadm settle +$TS_CMD_SFDISK ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG < /dev/null +udevadm settle +$TS_CMD_SFDISK ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG <