tests: test cazy sizes for sfdisk

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2014-10-09 14:08:59 +02:00
parent 28d79d9b0d
commit 9368018ff0
2 changed files with 52 additions and 0 deletions

View File

@ -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.

View File

@ -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