diff options
-rw-r--r-- | tests/expected/sfdisk/dos-activate | 26 | ||||
-rw-r--r-- | tests/expected/sfdisk/dos-read-dump | 48 | ||||
-rw-r--r-- | tests/expected/sfdisk/dos-simple-commas | 48 | ||||
-rw-r--r-- | tests/expected/sfdisk/dos-simple-space | 38 | ||||
-rw-r--r-- | tests/expected/sfdisk/dos-write-dump | 16 | ||||
-rwxr-xr-x | 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 <removed>: 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 <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> - Device Boot Start End #sectors Id System -<removed>1 * 2048 8191 6144 83 Linux -<removed>2 8192 14335 6144 82 Linux swap / Solaris -<removed>3 14336 20479 6144 83 Linux -<removed>4 20480 102399 81920 5 Extended -<removed>5 20481 26624 6144 83 Linux -<removed>6 26626 102399 75774 83 Linux +Device Boot Start End Sectors Size Id Type +<removed>1 * 2048 8191 6144 3M 83 Linux +<removed>2 8192 14335 6144 3M 82 Linux swap / Solaris +<removed>3 14336 20479 6144 3M 83 Linux +<removed>4 20480 102399 81920 40M 5 Extended +<removed>5 22528 28671 6144 3M 83 Linux +<removed>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: <removed>: 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 <removed>: 100 cylinders, 32 heads, 32 sectors/track -Old situation: -New situation: -Units: sectors of 512 bytes, counting from 0 +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 - Device Boot Start End #sectors Id System -<removed>1 * 2048 8191 6144 83 Linux -<removed>2 8192 14335 6144 82 Linux swap / Solaris -<removed>3 14336 20479 6144 83 Linux -<removed>4 20480 102399 81920 5 Extended -<removed>5 20481 26624 6144 83 Linux -<removed>6 26626 102399 75774 83 Linux -Successfully wrote the new partition table +>>> Script header accepted. +>>> 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: +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 +<removed>1 * 2048 8191 6144 3M 83 Linux +<removed>2 8192 14335 6144 3M 82 Linux swap / Solaris +<removed>3 14336 20479 6144 3M 83 Linux +<removed>4 20480 102399 81920 40M 5 Extended +<removed>5 20481 26624 6144 3M 83 Linux +<removed>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: <removed>: 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 <removed>: 100 cylinders, 32 heads, 32 sectors/track -Old situation: -New situation: -Units: sectors of 512 bytes, counting from 0 +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 - Device Boot Start End #sectors Id System -<removed>1 2048 8191 6144 83 Linux -<removed>2 8192 14335 6144 82 Linux swap / Solaris -<removed>3 14336 20479 6144 83 Linux -<removed>4 20480 102399 81920 5 Extended -<removed>5 20481 26624 6144 83 Linux -<removed>6 26626 102399 75774 83 Linux -Successfully wrote the new partition table +>>> 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: +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 +<removed>1 2048 8191 6144 3M 83 Linux +<removed>2 8192 14335 6144 3M 82 Linux swap / Solaris +<removed>3 14336 20479 6144 3M 83 Linux +<removed>4 20480 102399 81920 40M 5 Extended +<removed>5 22528 28671 6144 3M 83 Linux +<removed>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: <removed>: 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 <removed>: 100 cylinders, 32 heads, 32 sectors/track -Old situation: -New situation: -Units: sectors of 512 bytes, counting from 0 +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 - Device Boot Start End #sectors Id System -<removed>1 2048 8191 6144 83 Linux -<removed>2 8192 14335 6144 82 Linux swap / Solaris -<removed>3 1 2047 2047 83 Linux -<removed>4 0 - 0 0 Empty -Successfully wrote the new partition table +>>> Created a new <removed>. +Created a new <removed>. +<removed>2: Created a new <removed>. +<removed>3: Created a new <removed>. +<removed>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 +<removed>1 2048 8191 6144 3M 83 Linux +<removed>2 8192 14335 6144 3M 82 Linux swap / Solaris +<removed>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 <removed> +label: dos +label-id: 0x1ddc8a79 +device: <removed> unit: sectors -<removed>1 : start= 2048, size= 6144, Id=83, bootable -<removed>2 : start= 8192, size= 6144, Id=82 -<removed>3 : start= 14336, size= 6144, Id=83 -<removed>4 : start= 20480, size= 81920, Id= 5 -<removed>5 : start= 20481, size= 6144, Id=83 -<removed>6 : start= 26626, size= 75774, Id=83 +<removed>1 : start= 2048, size= 6144, type=83, bootable +<removed>2 : start= 8192, size= 6144, type=82 +<removed>3 : start= 14336, size= 6144, type=83 +<removed>4 : start= 20480, size= 81920, type=5 +<removed>5 : start= 20481, size= 6144, type=83 +<removed>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 <<EOF -2048,6144,L -8192,6144,S -14336,6144, + 2048,6144,L +8192, 6144,S +14336 , 6144 , 20480,,E -,6144, +,6144 , ,, EOF ts_fdisk_clean $TS_DEVICE @@ -53,9 +53,10 @@ ts_finalize_subtest ts_init_subtest "simple-space" $TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null +udevadm settle $TS_CMD_SFDISK --unit S ${TS_DEVICE} >> $TS_OUTPUT 2>&1 <<EOF -2048,6144,L -8192,6144,S + 2048 6144 L +8192 6144 S ,, EOF ts_fdisk_clean $TS_DEVICE @@ -65,8 +66,10 @@ ts_finalize_subtest ts_init_subtest "read-dump" $TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null +udevadm settle $TS_CMD_SFDISK --unit S ${TS_DEVICE} >> $TS_OUTPUT 2>&1 <<EOF unit: sectors +label-id: 0x1ddc8a79 ${TS_DEVICE}1 : start= 2048, size= 6144, Id=83, bootable ${TS_DEVICE}2 : start= 8192, size= 6144, Id=82 |