From: Karel Zak Date: Thu, 9 Oct 2014 12:08:59 +0000 (+0200) Subject: tests: test cazy sizes for sfdisk X-Git-Tag: v2.26-rc1~326 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9368018ff0d484ceaeda02b200ee71627f4d4580;p=thirdparty%2Futil-linux.git tests: test cazy sizes for sfdisk Signed-off-by: Karel Zak --- diff --git a/tests/expected/sfdisk/dos-explicit-size b/tests/expected/sfdisk/dos-explicit-size new file mode 100644 index 0000000000..c7a5208519 --- /dev/null +++ b/tests/expected/sfdisk/dos-explicit-size @@ -0,0 +1,31 @@ +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 + +>>> Script header accepted. +>>> Created a new . +Created a new . +2: Created a new . +3: Created a new . +4: Created a new . +5: Created a new . +6: Created a new . +7: Created a new . +8: +New situation: + +Device Boot Start End Sectors Size Id Type +1 1 1000 1000 500K 83 Linux +2 1001 2000 1000 500K 82 Linux swap / Solaris +3 2001 3000 1000 500K 83 Linux +4 3001 102399 99399 48.5M 5 Extended +5 3002 4001 1000 500K 83 Linux +6 4003 5002 1000 500K 83 Linux +7 5004 102399 97396 47.6M 83 Linux + +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 e4ea981af9..63921e590a 100755 --- a/tests/ts/sfdisk/dos +++ b/tests/ts/sfdisk/dos @@ -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 <