tests: add sfdisk resize tests

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2015-04-13 10:56:03 +02:00
parent b6a38f27ab
commit 531dfb14d4
4 changed files with 74 additions and 0 deletions

View File

@ -0,0 +1,23 @@
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
Disklabel type: dos
Disk identifier: <removed>
Old situation:
Device Boot Start End Sectors Size Id Type
<removed>1 * 2048 22527 20480 10M 82 Linux swap / Solaris
<removed>1:
New situation:
Device Boot Start End Sectors Size Id Type
<removed>1 * 2048 102399 100352 49M 82 Linux swap / Solaris
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

View File

@ -0,0 +1,23 @@
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
Disklabel type: gpt
Disk identifier: <removed>
Old situation:
Device Start End Sectors Size Type
<removed>1 2048 22527 20480 10M Linux swap
<removed>1:
New situation:
Device Start End Sectors Size Type
<removed>1 2048 102366 100319 49M Linux swap
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

View File

@ -111,5 +111,19 @@ udevadm settle
ts_finalize_subtest
ts_init_subtest "resize"
$TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null
udevadm settle
$TS_CMD_SFDISK ${TS_DEVICE} > /dev/null 2>&1 <<EOF
label: dos
,10M,S,*
EOF
udevadm settle
echo ',+' | $TS_CMD_SFDISK -N1 ${TS_DEVICE} >> $TS_OUTPUT 2>&1
ts_fdisk_clean $TS_DEVICE
udevadm settle
ts_finalize_subtest
rmmod scsi_debug
ts_finalize

View File

@ -110,5 +110,19 @@ ts_fdisk_clean $TS_DEVICE
ts_finalize_subtest
ts_init_subtest "resize"
$TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null
udevadm settle
$TS_CMD_SFDISK ${TS_DEVICE} > /dev/null 2>&1 <<EOF
label: gpt
,10M,S,*
EOF
udevadm settle
echo ',+' | $TS_CMD_SFDISK -N1 ${TS_DEVICE} >> $TS_OUTPUT 2>&1
ts_fdisk_clean $TS_DEVICE
udevadm settle
ts_finalize_subtest
rmmod scsi_debug
ts_finalize