]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: test cazy sizes for sfdisk
authorKarel Zak <kzak@redhat.com>
Thu, 9 Oct 2014 12:08:59 +0000 (14:08 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 9 Oct 2014 12:08:59 +0000 (14:08 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
tests/expected/sfdisk/dos-explicit-size [new file with mode: 0644]
tests/ts/sfdisk/dos

diff --git a/tests/expected/sfdisk/dos-explicit-size b/tests/expected/sfdisk/dos-explicit-size
new file mode 100644 (file)
index 0000000..c7a5208
--- /dev/null
@@ -0,0 +1,31 @@
+Checking that no-one is using this disk right now ... OK
+
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / 32768 bytes
+
+>>> Script header accepted.
+>>> Created a new <removed>.
+Created a new <removed>.
+<removed>2: Created a new <removed>.
+<removed>3: Created a new <removed>.
+<removed>4: Created a new <removed>.
+<removed>5: Created a new <removed>.
+<removed>6: Created a new <removed>.
+<removed>7: Created a new <removed>.
+<removed>8: 
+New situation:
+
+Device     Boot Start    End Sectors  Size Id Type
+<removed>1           1   1000    1000  500K 83 Linux
+<removed>2        1001   2000    1000  500K 82 Linux swap / Solaris
+<removed>3        2001   3000    1000  500K 83 Linux
+<removed>4        3001 102399   99399 48.5M  5 Extended
+<removed>5        3002   4001    1000  500K 83 Linux
+<removed>6        4003   5002    1000  500K 83 Linux
+<removed>7        5004 102399   97396 47.6M 83 Linux
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
index e4ea981af94e6954433e0c6fd9d51df380913a1f..63921e590a23f400db7503a2753462e84f84b239 100755 (executable)
@@ -88,6 +88,27 @@ $TS_CMD_SFDISK --unit S --dump ${TS_DEVICE} >> $TS_OUTPUT 2>&1
 ts_fdisk_clean $TS_DEVICE
 ts_finalize_subtest
 
+#
+# Test first LBA smaller than libfdisk default (~1MiB) and small gaps between
+# logical partitions (just only one sector for EBR).
+#
+ts_init_subtest "explicit-size"
+$TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null
+udevadm settle
+$TS_CMD_SFDISK --unit S ${TS_DEVICE} >> $TS_OUTPUT 2>&1 <<EOF
+label: dos
+1, 1000, L
+1001, 1000, S
+2001, 1000
+3001,,E
+3002,1000,L
+4003,1000,L
+5004,,L
+EOF
+ts_fdisk_clean $TS_DEVICE
+udevadm settle
+ts_finalize_subtest
+
 
 rmmod scsi_debug
 ts_finalize