From: Karel Zak Date: Mon, 13 Apr 2015 08:56:03 +0000 (+0200) Subject: tests: add sfdisk resize tests X-Git-Tag: v2.27-rc1~277 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=531dfb14d423ecb2c3284f533745421da5bd189c;p=thirdparty%2Futil-linux.git tests: add sfdisk resize tests Signed-off-by: Karel Zak --- diff --git a/tests/expected/sfdisk/dos-resize b/tests/expected/sfdisk/dos-resize new file mode 100644 index 0000000000..3ce02ec469 --- /dev/null +++ b/tests/expected/sfdisk/dos-resize @@ -0,0 +1,23 @@ +Checking that no-one is using this disk right now ... OK + +Disk : 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: + +Old situation: + +Device Boot Start End Sectors Size Id Type +1 * 2048 22527 20480 10M 82 Linux swap / Solaris + +1: +New situation: + +Device Boot Start End Sectors Size Id Type +1 * 2048 102399 100352 49M 82 Linux swap / Solaris + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/gpt-resize b/tests/expected/sfdisk/gpt-resize new file mode 100644 index 0000000000..dbe41ba61d --- /dev/null +++ b/tests/expected/sfdisk/gpt-resize @@ -0,0 +1,23 @@ +Checking that no-one is using this disk right now ... OK + +Disk : 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: + +Old situation: + +Device Start End Sectors Size Type +1 2048 22527 20480 10M Linux swap + +1: +New situation: + +Device Start End Sectors Size Type +1 2048 102366 100319 49M Linux swap + +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 899e93c72c..8277ddcfac 100755 --- a/tests/ts/sfdisk/dos +++ b/tests/ts/sfdisk/dos @@ -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 <> $TS_OUTPUT 2>&1 +ts_fdisk_clean $TS_DEVICE +udevadm settle +ts_finalize_subtest + + rmmod scsi_debug ts_finalize diff --git a/tests/ts/sfdisk/gpt b/tests/ts/sfdisk/gpt index 10720fcfb5..252691f46a 100755 --- a/tests/ts/sfdisk/gpt +++ b/tests/ts/sfdisk/gpt @@ -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 <> $TS_OUTPUT 2>&1 +ts_fdisk_clean $TS_DEVICE +udevadm settle +ts_finalize_subtest + + rmmod scsi_debug ts_finalize