From 2f34f1c77f65dc254efe5e4a380302772397933d Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 9 Oct 2014 13:21:04 +0200 Subject: tests: update sfdisk tests Signed-off-by: Karel Zak --- tests/expected/sfdisk/dos-activate | 26 +++++++++++------- tests/expected/sfdisk/dos-read-dump | 48 ++++++++++++++++++--------------- tests/expected/sfdisk/dos-simple-commas | 48 ++++++++++++++++----------------- tests/expected/sfdisk/dos-simple-space | 38 +++++++++++++------------- tests/expected/sfdisk/dos-write-dump | 16 ++++++----- tests/ts/sfdisk/dos | 15 ++++++----- 6 files changed, 103 insertions(+), 88 deletions(-) diff --git a/tests/expected/sfdisk/dos-activate b/tests/expected/sfdisk/dos-activate index 23be9ee6a..230a959ef 100644 --- a/tests/expected/sfdisk/dos-activate +++ b/tests/expected/sfdisk/dos-activate @@ -1,11 +1,19 @@ +The bootable flag on partition 1 is enabled now. -Disk : 100 cylinders, 32 heads, 32 sectors/track -Units: sectors of 512 bytes, counting from 0 +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. +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: - Device Boot Start End #sectors Id System -1 * 2048 8191 6144 83 Linux -2 8192 14335 6144 82 Linux swap / Solaris -3 14336 20479 6144 83 Linux -4 20480 102399 81920 5 Extended -5 20481 26624 6144 83 Linux -6 26626 102399 75774 83 Linux +Device Boot Start End Sectors Size Id Type +1 * 2048 8191 6144 3M 83 Linux +2 8192 14335 6144 3M 82 Linux swap / Solaris +3 14336 20479 6144 3M 83 Linux +4 20480 102399 81920 40M 5 Extended +5 22528 28671 6144 3M 83 Linux +6 30720 102399 71680 35M 83 Linux diff --git a/tests/expected/sfdisk/dos-read-dump b/tests/expected/sfdisk/dos-read-dump index c463a0e47..b638e9dcc 100644 --- a/tests/expected/sfdisk/dos-read-dump +++ b/tests/expected/sfdisk/dos-read-dump @@ -1,26 +1,30 @@ -sfdisk: Checking that no-one is using this disk right now ... -sfdisk: OK -sfdisk: : unrecognized partition table type -sfdisk: No partitions found -sfdisk: Warning: partition 5 does not end at a cylinder boundary -sfdisk: Warning: partition [6] does not start at a cylinder boundary +Checking that no-one is using this disk right now ... OK -Disk : 100 cylinders, 32 heads, 32 sectors/track -Old situation: -New situation: -Units: sectors of 512 bytes, counting from 0 +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 - Device Boot Start End #sectors Id System -1 * 2048 8191 6144 83 Linux -2 8192 14335 6144 82 Linux swap / Solaris -3 14336 20479 6144 83 Linux -4 20480 102399 81920 5 Extended -5 20481 26624 6144 83 Linux -6 26626 102399 75774 83 Linux -Successfully wrote the new partition table +>>> Script header accepted. +>>> 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: +New situation: -sfdisk: If you created or changed a DOS partition, /dev/foo7, say, then use dd(1) -to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1 -(See fdisk(8).) -Re-reading the partition table ... +Device Boot Start End Sectors Size Id Type +1 * 2048 8191 6144 3M 83 Linux +2 8192 14335 6144 3M 82 Linux swap / Solaris +3 14336 20479 6144 3M 83 Linux +4 20480 102399 81920 40M 5 Extended +5 20481 26624 6144 3M 83 Linux +6 26626 102399 75774 37M 83 Linux +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/dos-simple-commas b/tests/expected/sfdisk/dos-simple-commas index 4c41f50f3..58c95c9ec 100644 --- a/tests/expected/sfdisk/dos-simple-commas +++ b/tests/expected/sfdisk/dos-simple-commas @@ -1,28 +1,28 @@ -sfdisk: Checking that no-one is using this disk right now ... -sfdisk: OK -sfdisk: : unrecognized partition table type -sfdisk: No partitions found -sfdisk: Warning: partition 5 does not end at a cylinder boundary -sfdisk: Warning: partition [6] does not start at a cylinder boundary -sfdisk: Warning: no primary partition is marked bootable (active) -This does not matter for LILO, but the DOS MBR will not boot this disk. +Checking that no-one is using this disk right now ... OK -Disk : 100 cylinders, 32 heads, 32 sectors/track -Old situation: -New situation: -Units: sectors of 512 bytes, counting from 0 +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 - Device Boot Start End #sectors Id System -1 2048 8191 6144 83 Linux -2 8192 14335 6144 82 Linux swap / Solaris -3 14336 20479 6144 83 Linux -4 20480 102399 81920 5 Extended -5 20481 26624 6144 83 Linux -6 26626 102399 75774 83 Linux -Successfully wrote the new partition table +>>> 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: +New situation: -sfdisk: If you created or changed a DOS partition, /dev/foo7, say, then use dd(1) -to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1 -(See fdisk(8).) -Re-reading the partition table ... +Device Boot Start End Sectors Size Id Type +1 2048 8191 6144 3M 83 Linux +2 8192 14335 6144 3M 82 Linux swap / Solaris +3 14336 20479 6144 3M 83 Linux +4 20480 102399 81920 40M 5 Extended +5 22528 28671 6144 3M 83 Linux +6 30720 102399 71680 35M 83 Linux +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/dos-simple-space b/tests/expected/sfdisk/dos-simple-space index 137130f05..214b3ae74 100644 --- a/tests/expected/sfdisk/dos-simple-space +++ b/tests/expected/sfdisk/dos-simple-space @@ -1,24 +1,22 @@ -sfdisk: Checking that no-one is using this disk right now ... -sfdisk: OK -sfdisk: : unrecognized partition table type -sfdisk: No partitions found -sfdisk: Warning: no primary partition is marked bootable (active) -This does not matter for LILO, but the DOS MBR will not boot this disk. +Checking that no-one is using this disk right now ... OK -Disk : 100 cylinders, 32 heads, 32 sectors/track -Old situation: -New situation: -Units: sectors of 512 bytes, counting from 0 +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 - Device Boot Start End #sectors Id System -1 2048 8191 6144 83 Linux -2 8192 14335 6144 82 Linux swap / Solaris -3 1 2047 2047 83 Linux -4 0 - 0 0 Empty -Successfully wrote the new partition table +>>> Created a new . +Created a new . +2: Created a new . +3: Created a new . +4: +New situation: -sfdisk: If you created or changed a DOS partition, /dev/foo7, say, then use dd(1) -to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1 -(See fdisk(8).) -Re-reading the partition table ... +Device Boot Start End Sectors Size Id Type +1 2048 8191 6144 3M 83 Linux +2 8192 14335 6144 3M 82 Linux swap / Solaris +3 14336 102399 88064 43M 83 Linux +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/dos-write-dump b/tests/expected/sfdisk/dos-write-dump index 4d069d21f..480ced5fe 100644 --- a/tests/expected/sfdisk/dos-write-dump +++ b/tests/expected/sfdisk/dos-write-dump @@ -1,9 +1,11 @@ -# partition table of +label: dos +label-id: 0x1ddc8a79 +device: unit: sectors -1 : start= 2048, size= 6144, Id=83, bootable -2 : start= 8192, size= 6144, Id=82 -3 : start= 14336, size= 6144, Id=83 -4 : start= 20480, size= 81920, Id= 5 -5 : start= 20481, size= 6144, Id=83 -6 : start= 26626, size= 75774, Id=83 +1 : start= 2048, size= 6144, type=83, bootable +2 : start= 8192, size= 6144, type=82 +3 : start= 14336, size= 6144, type=83 +4 : start= 20480, size= 81920, type=5 +5 : start= 20481, size= 6144, type=83 +6 : start= 26626, size= 75774, type=83 diff --git a/tests/ts/sfdisk/dos b/tests/ts/sfdisk/dos index 26126f058..e4ea981af 100755 --- a/tests/ts/sfdisk/dos +++ b/tests/ts/sfdisk/dos @@ -31,11 +31,11 @@ ts_scsi_debug_init dev_size_mb=50 sector_size=512 physblk_exp=3 ts_init_subtest "simple-commas" $TS_CMD_SFDISK --unit S ${TS_DEVICE} >> $TS_OUTPUT 2>&1 < /dev/null +udevadm settle $TS_CMD_SFDISK --unit S ${TS_DEVICE} >> $TS_OUTPUT 2>&1 < /dev/null +udevadm settle $TS_CMD_SFDISK --unit S ${TS_DEVICE} >> $TS_OUTPUT 2>&1 <