]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: update sfdisk tests
authorKarel Zak <kzak@redhat.com>
Thu, 9 Oct 2014 11:21:04 +0000 (13:21 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 9 Oct 2014 11:21:04 +0000 (13:21 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
tests/expected/sfdisk/dos-activate
tests/expected/sfdisk/dos-read-dump
tests/expected/sfdisk/dos-simple-commas
tests/expected/sfdisk/dos-simple-space
tests/expected/sfdisk/dos-write-dump
tests/ts/sfdisk/dos

index 23be9ee6aa3fc2f55d120d9c1222d4d89d65c214..230a959ef5df334300942731a145df7c44f7c11e 100644 (file)
@@ -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
index c463a0e47ffc3619a6f67d82e8d326496d9106e5..b638e9dcc7443d5266a503107e925da49dcde2cb 100644 (file)
@@ -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.
index 4c41f50f30da5c5ed765ddf96316f13d27854288..58c95c9ecbd82b796e89be05081ca53636f8d590 100644 (file)
@@ -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.
index 137130f054c511b2043fce805c5c101422cfced4..214b3ae74c799c02a5173e8cad1382e25833a556 100644 (file)
@@ -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.
index 4d069d21f52ad250e565c8b7703d73d9553dc1fe..480ced5feaf0225f523052d4bd5ba9b36036ddd5 100644 (file)
@@ -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
index 26126f0582181977f6cb63f5a345806d1ad13534..e4ea981af94e6954433e0c6fd9d51df380913a1f 100755 (executable)
@@ -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