]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: add sfdisk test for 4fe7f9b614e2b5bb97f6d89af02acb867cffccc1
authorKarel Zak <kzak@redhat.com>
Mon, 10 Aug 2020 10:00:17 +0000 (12:00 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 10 Aug 2020 10:00:17 +0000 (12:00 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
tests/expected/sfdisk/dos-sizes-vs-gaps [new file with mode: 0644]
tests/ts/sfdisk/dos

diff --git a/tests/expected/sfdisk/dos-sizes-vs-gaps b/tests/expected/sfdisk/dos-sizes-vs-gaps
new file mode 100644 (file)
index 0000000..a3eb790
--- /dev/null
@@ -0,0 +1,26 @@
+Checking that no-one is using this disk right now ... OK
+
+Disk <removed>: 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 / <removed> bytes
+
+>>> Created a new disklabel.
+<removed>1: Created a new partition <removed>.
+<removed>2: Created a new partition <removed>.
+<removed>3: Created a new partition <removed>.
+<removed>4: Done.
+
+New situation:
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device     Boot Start   End Sectors   Size Id Type
+<removed>1        2048  3070    1023 511.5K 83 Linux
+<removed>2        4096  8190    4095     2M 83 Linux
+<removed>3        8192 16382    8191     4M 83 Linux
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
index a2fd728859afd89320b5f772e930cb8923b6ab71..4aa155ce030dd1bfa847c22ec815ae1f540dabb2 100755 (executable)
@@ -260,4 +260,17 @@ udevadm settle
 ts_finalize_subtest
 
 
+ts_init_subtest "sizes-vs-gaps"
+$TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null
+udevadm settle
+$TS_CMD_SFDISK ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG <<EOF
+2048 1023 L -
+4096 4095 L -
+8192 8191 L -
+EOF
+ts_fdisk_clean $TS_DEVICE
+udevadm settle
+ts_finalize_subtest
+
+
 ts_finalize