-zero length file
-one line no nl
-1
-one line with nl
-1
-second line no nl
-1
-2
-second line with nl
-1
-2
-no-backspaces
-FIXME
-pass
-ab
-a\11b
-tabs
- 1
-spaces
- 1
-Initialize empty image
-Create new GPT partition table
-
----layout----------
-Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors
-Units: sectors of 1 * 512 = 512 bytes
-Sector size (logical/physical): 512 bytes / 512 bytes
-I/O size (minimum/optimal): 512 bytes / <removed> bytes
-Disklabel type: gpt
-Disk identifier: <removed>
--------------------
-
-Create partitions
-Change partition type by number
-
----layout----------
-Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors
-Units: sectors of 1 * 512 = 512 bytes
-Sector size (logical/physical): 512 bytes / 512 bytes
-I/O size (minimum/optimal): 512 bytes / <removed> bytes
-Disklabel type: gpt
-Disk identifier: <removed>
-
-Device Start End Sectors Size Type
-<removed>1 2048 4095 2048 1M EFI System
-<removed>2 4096 6143 2048 1M Linux filesystem
-<removed>3 6144 8191 2048 1M Linux filesystem
-<removed>4 8192 10239 2048 1M Linux filesystem
-<removed>5 10240 12287 2048 1M Linux filesystem
-<removed>6 12288 14335 2048 1M Linux filesystem
-<removed>7 14336 16383 2048 1M Linux filesystem
-<removed>8 16384 18431 2048 1M Linux filesystem
--------------------
-
-Change partition type by UUID
-
----layout----------
-Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors
-Units: sectors of 1 * 512 = 512 bytes
-Sector size (logical/physical): 512 bytes / 512 bytes
-I/O size (minimum/optimal): 512 bytes / <removed> bytes
-Disklabel type: gpt
-Disk identifier: <removed>
-
-Device Start End Sectors Size Type
-<removed>1 2048 4095 2048 1M EFI System
-<removed>2 4096 6143 2048 1M Linux filesystem
-<removed>3 6144 8191 2048 1M Linux filesystem
-<removed>4 8192 10239 2048 1M Linux filesystem
-<removed>5 10240 12287 2048 1M Linux swap
-<removed>6 12288 14335 2048 1M Linux filesystem
-<removed>7 14336 16383 2048 1M Linux filesystem
-<removed>8 16384 18431 2048 1M Linux filesystem
--------------------
-
-Delete partition
-
----layout----------
-Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors
-Units: sectors of 1 * 512 = 512 bytes
-Sector size (logical/physical): 512 bytes / 512 bytes
-I/O size (minimum/optimal): 512 bytes / <removed> bytes
-Disklabel type: gpt
-Disk identifier: <removed>
-
-Device Start End Sectors Size Type
-<removed>1 2048 4095 2048 1M EFI System
-<removed>3 6144 8191 2048 1M Linux filesystem
-<removed>4 8192 10239 2048 1M Linux filesystem
-<removed>5 10240 12287 2048 1M Linux swap
-<removed>6 12288 14335 2048 1M Linux filesystem
-<removed>7 14336 16383 2048 1M Linux filesystem
-<removed>8 16384 18431 2048 1M Linux filesystem
--------------------
-
-Create again partition
-
----layout----------
-Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors
-Units: sectors of 1 * 512 = 512 bytes
-Sector size (logical/physical): 512 bytes / 512 bytes
-I/O size (minimum/optimal): 512 bytes / <removed> bytes
-Disklabel type: gpt
-Disk identifier: <removed>
-
-Device Start End Sectors Size Type
-<removed>1 2048 4095 2048 1M EFI System
-<removed>2 4096 6143 2048 1M Linux filesystem
-<removed>3 6144 8191 2048 1M Linux filesystem
-<removed>4 8192 10239 2048 1M Linux filesystem
-<removed>5 10240 12287 2048 1M Linux swap
-<removed>6 12288 14335 2048 1M Linux filesystem
-<removed>7 14336 16383 2048 1M Linux filesystem
-<removed>8 16384 18431 2048 1M Linux filesystem
--------------------
-
-Corrupt primary table
-
----layout----------
-Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors
-Units: sectors of 1 * 512 = 512 bytes
-Sector size (logical/physical): 512 bytes / 512 bytes
-I/O size (minimum/optimal): 512 bytes / <removed> bytes
-Disklabel type: gpt
-Disk identifier: <removed>
-
-Device Start End Sectors Size Type
-<removed>1 2048 4095 2048 1M EFI System
-<removed>2 4096 6143 2048 1M Linux filesystem
-<removed>3 6144 8191 2048 1M Linux filesystem
-<removed>4 8192 10239 2048 1M Linux filesystem
-<removed>5 10240 12287 2048 1M Linux swap
-<removed>6 12288 14335 2048 1M Linux filesystem
-<removed>7 14336 16383 2048 1M Linux filesystem
-<removed>8 16384 18431 2048 1M Linux filesystem
--------------------
-
-Corrupt backup table
-
----layout----------
-Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors
-Units: sectors of 1 * 512 = 512 bytes
-Sector size (logical/physical): 512 bytes / 512 bytes
-I/O size (minimum/optimal): 512 bytes / <removed> bytes
-Disklabel type: gpt
-Disk identifier: <removed>
-
-Device Start End Sectors Size Type
-<removed>1 2048 4095 2048 1M EFI System
-<removed>2 4096 6143 2048 1M Linux filesystem
-<removed>3 6144 8191 2048 1M Linux filesystem
-<removed>4 8192 10239 2048 1M Linux filesystem
-<removed>5 10240 12287 2048 1M Linux swap
-<removed>6 12288 14335 2048 1M Linux filesystem
-<removed>7 14336 16383 2048 1M Linux filesystem
-<removed>8 16384 18431 2048 1M Linux filesystem
--------------------
-
--- /dev/null
+
+---layout----------
+Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 4095 2048 1M EFI System
+<removed>2 4096 6143 2048 1M Linux filesystem
+<removed>3 6144 8191 2048 1M Linux filesystem
+<removed>4 8192 10239 2048 1M Linux filesystem
+<removed>5 10240 12287 2048 1M Linux filesystem
+<removed>6 12288 14335 2048 1M Linux filesystem
+<removed>7 14336 16383 2048 1M Linux filesystem
+<removed>8 16384 18431 2048 1M Linux filesystem
+-------------------
+
--- /dev/null
+
+---layout----------
+Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 4095 2048 1M EFI System
+<removed>2 4096 6143 2048 1M Linux filesystem
+<removed>3 6144 8191 2048 1M Linux filesystem
+<removed>4 8192 10239 2048 1M Linux filesystem
+<removed>5 10240 12287 2048 1M Linux swap
+<removed>6 12288 14335 2048 1M Linux filesystem
+<removed>7 14336 16383 2048 1M Linux filesystem
+<removed>8 16384 18431 2048 1M Linux filesystem
+-------------------
+
--- /dev/null
+
+---layout----------
+Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 4095 2048 1M EFI System
+<removed>2 4096 6143 2048 1M Linux filesystem
+<removed>3 6144 8191 2048 1M Linux filesystem
+<removed>4 8192 10239 2048 1M Linux filesystem
+<removed>5 10240 12287 2048 1M Linux swap
+<removed>6 12288 14335 2048 1M Linux filesystem
+<removed>7 14336 16383 2048 1M Linux filesystem
+<removed>8 16384 18431 2048 1M Linux filesystem
+-------------------
+
--- /dev/null
+
+---layout----------
+Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 4095 2048 1M EFI System
+<removed>2 4096 6143 2048 1M Linux filesystem
+<removed>3 6144 8191 2048 1M Linux filesystem
+<removed>4 8192 10239 2048 1M Linux filesystem
+<removed>5 10240 12287 2048 1M Linux swap
+<removed>6 12288 14335 2048 1M Linux filesystem
+<removed>7 14336 16383 2048 1M Linux filesystem
+<removed>8 16384 18431 2048 1M Linux filesystem
+-------------------
+
--- /dev/null
+
+---layout----------
+Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 4095 2048 1M EFI System
+<removed>2 4096 6143 2048 1M Linux filesystem
+<removed>3 6144 8191 2048 1M Linux filesystem
+<removed>4 8192 10239 2048 1M Linux filesystem
+<removed>5 10240 12287 2048 1M Linux swap
+<removed>6 12288 14335 2048 1M Linux filesystem
+<removed>7 14336 16383 2048 1M Linux filesystem
+<removed>8 16384 18431 2048 1M Linux filesystem
+-------------------
+
--- /dev/null
+
+---layout----------
+Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 4095 2048 1M EFI System
+<removed>3 6144 8191 2048 1M Linux filesystem
+<removed>4 8192 10239 2048 1M Linux filesystem
+<removed>5 10240 12287 2048 1M Linux swap
+<removed>6 12288 14335 2048 1M Linux filesystem
+<removed>7 14336 16383 2048 1M Linux filesystem
+<removed>8 16384 18431 2048 1M Linux filesystem
+-------------------
+
--- /dev/null
+Initialize empty image
+Create new GPT partition table
+
+---layout----------
+Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+-------------------
+
Initialize empty image
-Create MBR with ID=0x1
-Disk identifier: 0x00000001
-Create MBR with ID=0x2
-Disk identifier: 0x00000002
--- /dev/null
+Disk identifier: 0x00000001
--- /dev/null
+Disk identifier: 0x00000002
Initialize empty image
-Create MBR with ID=0x1
-Create MBR with ID=0x2
-Initialize empty image
-f1c9645dbc14efddc7d8a322685f26eb mbr-dos-mode.img
-Create new DOS partition table
-57e721e38d1266c2df055067c18f2cf9 mbr-dos-mode.img
-
----layout----------
-Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors
-Geometry: 255 heads, 63 sectors/track, 1024 cylinders
-Units: cylinders of 16065 * 512 = 8225280 bytes
-Sector size (logical/physical): 512 bytes / 512 bytes
-I/O size (minimum/optimal): 512 bytes / <removed> bytes
-Disklabel type: dos
-Disk identifier: <removed>
--------------------
-
-Create primary partition
-ae4f9b12f4a768849f72ea36938c30c7 mbr-dos-mode.img
-
----layout----------
-Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors
-Geometry: 255 heads, 63 sectors/track, 1024 cylinders
-Units: cylinders of 16065 * 512 = 8225280 bytes
-Sector size (logical/physical): 512 bytes / 512 bytes
-I/O size (minimum/optimal): 512 bytes / <removed> bytes
-Disklabel type: dos
-Disk identifier: <removed>
-
-Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs
-<removed>1 1 1 1 83 Linux 0/1/1 0/254/63
--------------------
-
-Set partition type
-4a5dba818f9962a82a086d8b99b89a17 mbr-dos-mode.img
-
----layout----------
-Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors
-Geometry: 255 heads, 63 sectors/track, 1024 cylinders
-Units: cylinders of 16065 * 512 = 8225280 bytes
-Sector size (logical/physical): 512 bytes / 512 bytes
-I/O size (minimum/optimal): 512 bytes / <removed> bytes
-Disklabel type: dos
-Disk identifier: <removed>
-
-Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs
-<removed>1 1 1 1 bf Solaris 0/1/1 0/254/63
--------------------
-
-Set primary partition active
-c30e9c761b71cf95c67e758b93706ac5 mbr-dos-mode.img
-
----layout----------
-Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors
-Geometry: 255 heads, 63 sectors/track, 1024 cylinders
-Units: cylinders of 16065 * 512 = 8225280 bytes
-Sector size (logical/physical): 512 bytes / 512 bytes
-I/O size (minimum/optimal): 512 bytes / <removed> bytes
-Disklabel type: dos
-Disk identifier: <removed>
-
-Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs
-<removed>1 * 1 1 1 bf Solaris 0/1/1 0/254/63 80
--------------------
-
-Re-create primary partition
-ae4f9b12f4a768849f72ea36938c30c7 mbr-dos-mode.img
-
----layout----------
-Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors
-Geometry: 255 heads, 63 sectors/track, 1024 cylinders
-Units: cylinders of 16065 * 512 = 8225280 bytes
-Sector size (logical/physical): 512 bytes / 512 bytes
-I/O size (minimum/optimal): 512 bytes / <removed> bytes
-Disklabel type: dos
-Disk identifier: <removed>
-
-Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs
-<removed>1 1 1 1 83 Linux 0/1/1 0/254/63
--------------------
-
-Create extended partition
-76987a00b353687cd1dba3ddea9d66f9 mbr-dos-mode.img
-
----layout----------
-Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors
-Geometry: 255 heads, 63 sectors/track, 1024 cylinders
-Units: cylinders of 16065 * 512 = 8225280 bytes
-Sector size (logical/physical): 512 bytes / 512 bytes
-I/O size (minimum/optimal): 512 bytes / <removed> bytes
-Disklabel type: dos
-Disk identifier: <removed>
-
-Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs
-<removed>1 1 1 1 83 Linux 0/1/1 0/254/63
-<removed>2 2 12 12 5 Extended 1/0/1 11/254/63
--------------------
-
-Create logical partitions
-a1cd6708e4a6d2e5f6bc9d5c0da0cf3b mbr-dos-mode.img
-
----layout----------
-Disk <removed>: 54.91 MiB, 57577472 bytes, 112456 sectors
-Geometry: 255 heads, 63 sectors/track, 1024 cylinders
-Units: cylinders of 16065 * 512 = 8225280 bytes
-Sector size (logical/physical): 512 bytes / 512 bytes
-I/O size (minimum/optimal): 512 bytes / <removed> bytes
-Disklabel type: dos
-Disk identifier: <removed>
-
-Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs
-<removed>1 1 1 1 83 Linux 0/1/1 0/254/63
-<removed>2 2 12 12 5 Extended 1/0/1 11/254/63
-<removed>5 2 3 2 83 Linux 1/1/1 2/254/63
-<removed>6 4 5 2 83 Linux 3/1/1 4/254/63
-<removed>7 6 7 2 83 Linux 5/1/1 6/254/63
-<removed>8 8 9 2 83 Linux 7/1/1 8/254/63
--------------------
-
-Delete logical partitions
-4c6937d529ace5661fb82efb9394154a mbr-dos-mode.img
-
----layout----------
-Disk <removed>: 54.91 MiB, 57577472 bytes, 112456 sectors
-Geometry: 255 heads, 63 sectors/track, 1024 cylinders
-Units: cylinders of 16065 * 512 = 8225280 bytes
-Sector size (logical/physical): 512 bytes / 512 bytes
-I/O size (minimum/optimal): 512 bytes / <removed> bytes
-Disklabel type: dos
-Disk identifier: <removed>
-
-Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs
-<removed>1 1 1 1 83 Linux 0/1/1 0/254/63
-<removed>2 2 12 12 5 Extended 1/0/1 11/254/63
-<removed>5 6 7 2 83 Linux 5/1/1 6/254/63
--------------------
-
-Create another logical partition
-9589eaaed698d2402945ab3e513c1eb4 mbr-dos-mode.img
-
----layout----------
-Disk <removed>: 54.91 MiB, 57577472 bytes, 112456 sectors
-Geometry: 255 heads, 63 sectors/track, 1024 cylinders
-Units: cylinders of 16065 * 512 = 8225280 bytes
-Sector size (logical/physical): 512 bytes / 512 bytes
-I/O size (minimum/optimal): 512 bytes / <removed> bytes
-Disklabel type: dos
-Disk identifier: <removed>
-
-Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs
-<removed>1 1 1 1 83 Linux 0/1/1 0/254/63
-<removed>2 2 12 12 5 Extended 1/0/1 11/254/63
-<removed>5 6 7 2 83 Linux 5/1/1 6/254/63
-<removed>6 2 3 2 83 Linux 1/1/1 2/254/63
-
-Partition table entries are not in disk order.
--------------------
-
-Delete primary partition
-1e6d646e5df66a2664cfbbb13fa9a08a mbr-dos-mode.img
-
----layout----------
-Disk <removed>: 54.91 MiB, 57577472 bytes, 112456 sectors
-Geometry: 255 heads, 63 sectors/track, 1024 cylinders
-Units: cylinders of 16065 * 512 = 8225280 bytes
-Sector size (logical/physical): 512 bytes / 512 bytes
-I/O size (minimum/optimal): 512 bytes / <removed> bytes
-Disklabel type: dos
-Disk identifier: <removed>
-
-Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs
-<removed>2 2 12 12 5 Extended 1/0/1 11/254/63
-<removed>5 6 7 2 83 Linux 5/1/1 6/254/63
-<removed>6 2 3 2 83 Linux 1/1/1 2/254/63
-
-Partition table entries are not in disk order.
--------------------
-
-Delete extended partition
-fc3cdb12326656d7996b09b6f76973e7 mbr-dos-mode.img
-
----layout----------
-Disk <removed>: 54.91 MiB, 57577472 bytes, 112456 sectors
-Geometry: 255 heads, 63 sectors/track, 1024 cylinders
-Units: cylinders of 16065 * 512 = 8225280 bytes
-Sector size (logical/physical): 512 bytes / 512 bytes
-I/O size (minimum/optimal): 512 bytes / <removed> bytes
-Disklabel type: dos
-Disk identifier: <removed>
--------------------
-
--- /dev/null
+9589eaaed698d2402945ab3e513c1eb4 mbr-dos-mode.img
+
+---layout----------
+Disk <removed>: 54.91 MiB, 57577472 bytes, 112456 sectors
+Geometry: 255 heads, 63 sectors/track, 1024 cylinders
+Units: cylinders of 16065 * 512 = 8225280 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs
+<removed>1 1 1 1 83 Linux 0/1/1 0/254/63
+<removed>2 2 12 12 5 Extended 1/0/1 11/254/63
+<removed>5 6 7 2 83 Linux 5/1/1 6/254/63
+<removed>6 2 3 2 83 Linux 1/1/1 2/254/63
+
+Partition table entries are not in disk order.
+-------------------
+
--- /dev/null
+76987a00b353687cd1dba3ddea9d66f9 mbr-dos-mode.img
+
+---layout----------
+Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors
+Geometry: 255 heads, 63 sectors/track, 1024 cylinders
+Units: cylinders of 16065 * 512 = 8225280 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs
+<removed>1 1 1 1 83 Linux 0/1/1 0/254/63
+<removed>2 2 12 12 5 Extended 1/0/1 11/254/63
+-------------------
+
--- /dev/null
+a1cd6708e4a6d2e5f6bc9d5c0da0cf3b mbr-dos-mode.img
+
+---layout----------
+Disk <removed>: 54.91 MiB, 57577472 bytes, 112456 sectors
+Geometry: 255 heads, 63 sectors/track, 1024 cylinders
+Units: cylinders of 16065 * 512 = 8225280 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs
+<removed>1 1 1 1 83 Linux 0/1/1 0/254/63
+<removed>2 2 12 12 5 Extended 1/0/1 11/254/63
+<removed>5 2 3 2 83 Linux 1/1/1 2/254/63
+<removed>6 4 5 2 83 Linux 3/1/1 4/254/63
+<removed>7 6 7 2 83 Linux 5/1/1 6/254/63
+<removed>8 8 9 2 83 Linux 7/1/1 8/254/63
+-------------------
+
--- /dev/null
+ae4f9b12f4a768849f72ea36938c30c7 mbr-dos-mode.img
+
+---layout----------
+Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors
+Geometry: 255 heads, 63 sectors/track, 1024 cylinders
+Units: cylinders of 16065 * 512 = 8225280 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs
+<removed>1 1 1 1 83 Linux 0/1/1 0/254/63
+-------------------
+
--- /dev/null
+fc3cdb12326656d7996b09b6f76973e7 mbr-dos-mode.img
+
+---layout----------
+Disk <removed>: 54.91 MiB, 57577472 bytes, 112456 sectors
+Geometry: 255 heads, 63 sectors/track, 1024 cylinders
+Units: cylinders of 16065 * 512 = 8225280 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+-------------------
+
--- /dev/null
+4c6937d529ace5661fb82efb9394154a mbr-dos-mode.img
+
+---layout----------
+Disk <removed>: 54.91 MiB, 57577472 bytes, 112456 sectors
+Geometry: 255 heads, 63 sectors/track, 1024 cylinders
+Units: cylinders of 16065 * 512 = 8225280 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs
+<removed>1 1 1 1 83 Linux 0/1/1 0/254/63
+<removed>2 2 12 12 5 Extended 1/0/1 11/254/63
+<removed>5 6 7 2 83 Linux 5/1/1 6/254/63
+-------------------
+
--- /dev/null
+1e6d646e5df66a2664cfbbb13fa9a08a mbr-dos-mode.img
+
+---layout----------
+Disk <removed>: 54.91 MiB, 57577472 bytes, 112456 sectors
+Geometry: 255 heads, 63 sectors/track, 1024 cylinders
+Units: cylinders of 16065 * 512 = 8225280 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs
+<removed>2 2 12 12 5 Extended 1/0/1 11/254/63
+<removed>5 6 7 2 83 Linux 5/1/1 6/254/63
+<removed>6 2 3 2 83 Linux 1/1/1 2/254/63
+
+Partition table entries are not in disk order.
+-------------------
+
--- /dev/null
+f1c9645dbc14efddc7d8a322685f26eb mbr-dos-mode.img
+57e721e38d1266c2df055067c18f2cf9 mbr-dos-mode.img
+
+---layout----------
+Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors
+Geometry: 255 heads, 63 sectors/track, 1024 cylinders
+Units: cylinders of 16065 * 512 = 8225280 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+-------------------
+
--- /dev/null
+ae4f9b12f4a768849f72ea36938c30c7 mbr-dos-mode.img
+
+---layout----------
+Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors
+Geometry: 255 heads, 63 sectors/track, 1024 cylinders
+Units: cylinders of 16065 * 512 = 8225280 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs
+<removed>1 1 1 1 83 Linux 0/1/1 0/254/63
+-------------------
+
--- /dev/null
+4a5dba818f9962a82a086d8b99b89a17 mbr-dos-mode.img
+
+---layout----------
+Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors
+Geometry: 255 heads, 63 sectors/track, 1024 cylinders
+Units: cylinders of 16065 * 512 = 8225280 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs
+<removed>1 1 1 1 bf Solaris 0/1/1 0/254/63
+-------------------
+
--- /dev/null
+c30e9c761b71cf95c67e758b93706ac5 mbr-dos-mode.img
+
+---layout----------
+Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors
+Geometry: 255 heads, 63 sectors/track, 1024 cylinders
+Units: cylinders of 16065 * 512 = 8225280 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs
+<removed>1 * 1 1 1 bf Solaris 0/1/1 0/254/63 80
+-------------------
+
-Initialize empty image
-Create new DOS partition table
-
----layout----------
-Disk <removed>: 20 MiB, 20971520 bytes, 40960 sectors
-Units: sectors of 1 * 512 = 512 bytes
-Sector size (logical/physical): 512 bytes / 512 bytes
-I/O size (minimum/optimal): 512 bytes / <removed> bytes
-Disklabel type: dos
-Disk identifier: <removed>
--------------------
-
-Create primary partitions
-
----layout----------
-Disk <removed>: 20 MiB, 20971520 bytes, 40960 sectors
-Units: sectors of 1 * 512 = 512 bytes
-Sector size (logical/physical): 512 bytes / 512 bytes
-I/O size (minimum/optimal): 512 bytes / <removed> bytes
-Disklabel type: dos
-Disk identifier: <removed>
-
-Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs
-<removed>1 4096 6143 2048 83 Linux 0/65/2 0/97/33
-<removed>2 2048 4095 2048 83 Linux 0/32/33 0/65/1
-<removed>3 6144 8191 2048 83 Linux 0/97/34 0/130/2
-<removed>4 8192 40959 32768 5 Extended 0/130/3 2/140/10
-
-Partition table entries are not in disk order.
--------------------
-
-Create logical partitions
-
----layout----------
-Disk <removed>: 20 MiB, 20971520 bytes, 40960 sectors
-Units: sectors of 1 * 512 = 512 bytes
-Sector size (logical/physical): 512 bytes / 512 bytes
-I/O size (minimum/optimal): 512 bytes / <removed> bytes
-Disklabel type: dos
-Disk identifier: <removed>
-
-Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs
-<removed>1 4096 6143 2048 83 Linux 0/65/2 0/97/33
-<removed>2 2048 4095 2048 83 Linux 0/32/33 0/65/1
-<removed>3 6144 8191 2048 83 Linux 0/97/34 0/130/2
-<removed>4 8192 40959 32768 5 Extended 0/130/3 2/140/10
-<removed>5 14336 16383 2048 83 Linux 0/227/36 1/5/4
-<removed>6 22528 24575 2048 83 Linux 1/102/38 1/135/6
-<removed>7 18432 20479 2048 83 Linux 1/37/37 1/70/5
-<removed>8 10240 12287 2048 83 Linux 0/162/35 0/195/3
-
-Partition table entries are not in disk order.
--------------------
-
-Fix order.
-
----layout----------
-Disk <removed>: 20 MiB, 20971520 bytes, 40960 sectors
-Units: sectors of 1 * 512 = 512 bytes
-Sector size (logical/physical): 512 bytes / 512 bytes
-I/O size (minimum/optimal): 512 bytes / <removed> bytes
-Disklabel type: dos
-Disk identifier: <removed>
-
-Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs
-<removed>1 2048 4095 2048 83 Linux 0/32/33 0/65/1
-<removed>2 4096 6143 2048 83 Linux 0/65/2 0/97/33
-<removed>3 6144 8191 2048 83 Linux 0/97/34 0/130/2
-<removed>4 8192 40959 32768 5 Extended 0/130/3 2/140/10
-<removed>5 10240 12287 2048 83 Linux 0/162/35 0/195/3
-<removed>6 14336 16383 2048 83 Linux 0/227/36 1/5/4
-<removed>7 18432 20479 2048 83 Linux 1/37/37 1/70/5
-<removed>8 22528 24575 2048 83 Linux 1/102/38 1/135/6
--------------------
-
--- /dev/null
+
+---layout----------
+Disk <removed>: 20 MiB, 20971520 bytes, 40960 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs
+<removed>1 4096 6143 2048 83 Linux 0/65/2 0/97/33
+<removed>2 2048 4095 2048 83 Linux 0/32/33 0/65/1
+<removed>3 6144 8191 2048 83 Linux 0/97/34 0/130/2
+<removed>4 8192 40959 32768 5 Extended 0/130/3 2/140/10
+<removed>5 14336 16383 2048 83 Linux 0/227/36 1/5/4
+<removed>6 22528 24575 2048 83 Linux 1/102/38 1/135/6
+<removed>7 18432 20479 2048 83 Linux 1/37/37 1/70/5
+<removed>8 10240 12287 2048 83 Linux 0/162/35 0/195/3
+
+Partition table entries are not in disk order.
+-------------------
+
--- /dev/null
+
+---layout----------
+Disk <removed>: 20 MiB, 20971520 bytes, 40960 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs
+<removed>1 4096 6143 2048 83 Linux 0/65/2 0/97/33
+<removed>2 2048 4095 2048 83 Linux 0/32/33 0/65/1
+<removed>3 6144 8191 2048 83 Linux 0/97/34 0/130/2
+<removed>4 8192 40959 32768 5 Extended 0/130/3 2/140/10
+
+Partition table entries are not in disk order.
+-------------------
+
--- /dev/null
+
+---layout----------
+Disk <removed>: 20 MiB, 20971520 bytes, 40960 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+-------------------
+
--- /dev/null
+
+---layout----------
+Disk <removed>: 20 MiB, 20971520 bytes, 40960 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs
+<removed>1 2048 4095 2048 83 Linux 0/32/33 0/65/1
+<removed>2 4096 6143 2048 83 Linux 0/65/2 0/97/33
+<removed>3 6144 8191 2048 83 Linux 0/97/34 0/130/2
+<removed>4 8192 40959 32768 5 Extended 0/130/3 2/140/10
+<removed>5 10240 12287 2048 83 Linux 0/162/35 0/195/3
+<removed>6 14336 16383 2048 83 Linux 0/227/36 1/5/4
+<removed>7 18432 20479 2048 83 Linux 1/37/37 1/70/5
+<removed>8 22528 24575 2048 83 Linux 1/102/38 1/135/6
+-------------------
+
-Initialize empty image
-f1c9645dbc14efddc7d8a322685f26eb sunlabel.img
-Create new SUN partition table
-f050fd2beb99f8d968bf17450f655f06 sunlabel.img
-Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors
-Geometry: 1 heads, 63 sectors/track, 325 cylinders
-Units: cylinders of 63 * 512 = 32256 bytes
-Sector size (logical/physical): 512 bytes / 512 bytes
-I/O size (minimum/optimal): 512 bytes / <removed> bytes
-Disklabel type: sun
-Label ID: Linux cyl 325 alt 0 hd 1 sec 63
-Rpm: 5400
-Alternate cylinders: 0
-Physical cylinders: 325
-Extra sects/cyl: 0
-Interleave: 1
-Create first partition
-e730c7ec8208601f41963f0485147248 sunlabel.img
-Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors
-Geometry: 1 heads, 63 sectors/track, 325 cylinders
-Units: cylinders of 63 * 512 = 32256 bytes
-Sector size (logical/physical): 512 bytes / 512 bytes
-I/O size (minimum/optimal): 512 bytes / <removed> bytes
-Disklabel type: sun
-Label ID: Linux cyl 325 alt 0 hd 1 sec 63
-Rpm: 5400
-Alternate cylinders: 0
-Physical cylinders: 325
-Extra sects/cyl: 0
-Interleave: 1
-
-Device Start End Cylinders Size Id Type Flags
-<removed>1 1 128 129 4128768 83 Linux native
-Set partition sysid
-df75defdb97fbd56222aed18631a22d0 sunlabel.img
-Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors
-Geometry: 1 heads, 63 sectors/track, 325 cylinders
-Units: cylinders of 63 * 512 = 32256 bytes
-Sector size (logical/physical): 512 bytes / 512 bytes
-I/O size (minimum/optimal): 512 bytes / <removed> bytes
-Disklabel type: sun
-Label ID: Linux cyl 325 alt 0 hd 1 sec 63
-Rpm: 5400
-Alternate cylinders: 0
-Physical cylinders: 325
-Extra sects/cyl: 0
-Interleave: 1
-
-Device Start End Cylinders Size Id Type Flags
-<removed>1 1 128 129 4128768 4 SunOS usr
-Set first partition readonly
-da23f66698d9a553162887621d4c7490 sunlabel.img
-Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors
-Geometry: 1 heads, 63 sectors/track, 325 cylinders
-Units: cylinders of 63 * 512 = 32256 bytes
-Sector size (logical/physical): 512 bytes / 512 bytes
-I/O size (minimum/optimal): 512 bytes / <removed> bytes
-Disklabel type: sun
-Label ID: Linux cyl 325 alt 0 hd 1 sec 63
-Rpm: 5400
-Alternate cylinders: 0
-Physical cylinders: 325
-Extra sects/cyl: 0
-Interleave: 1
-
-Device Start End Cylinders Size Id Type Flags
-<removed>1 1 128 129 4128768 4 SunOS usr r
-Set first partition mountable
-3ab76e8491b103eab52b2ae1856c1e30 sunlabel.img
-Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors
-Geometry: 1 heads, 63 sectors/track, 325 cylinders
-Units: cylinders of 63 * 512 = 32256 bytes
-Sector size (logical/physical): 512 bytes / 512 bytes
-I/O size (minimum/optimal): 512 bytes / <removed> bytes
-Disklabel type: sun
-Label ID: Linux cyl 325 alt 0 hd 1 sec 63
-Rpm: 5400
-Alternate cylinders: 0
-Physical cylinders: 325
-Extra sects/cyl: 0
-Interleave: 1
-
-Device Start End Cylinders Size Id Type Flags
-<removed>1 1 128 129 4128768 4 SunOS usr ur
-Create second partition
-
-Welcome to fdisk <removed>.
-Changes will remain in memory only, until you decide to write them.
-Be careful before using the write command.
-
-
-Command (m for help): Partition number (2-8, default 2): First cylinder (128-325, default 128): Last cylinder or +/-cylinders or +/-size{K,M,G,T,P} (128-325, default 325):
-Created a new partition <removed>.
-
-Command (m for help): The partition table has been altered.
-Syncing disks.
-
-a87e80830aa13d2d68b766962f052750 sunlabel.img
-Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors
-Geometry: 1 heads, 63 sectors/track, 325 cylinders
-Units: cylinders of 63 * 512 = 32256 bytes
-Sector size (logical/physical): 512 bytes / 512 bytes
-I/O size (minimum/optimal): 512 bytes / <removed> bytes
-Disklabel type: sun
-Label ID: Linux cyl 325 alt 0 hd 1 sec 63
-Rpm: 5400
-Alternate cylinders: 0
-Physical cylinders: 325
-Extra sects/cyl: 0
-Interleave: 1
-
-Device Start End Cylinders Size Id Type Flags
-<removed>1 1 128 129 4128768 4 SunOS usr ur
-<removed>2 129 325 198 6354432 83 Linux native
-Delete all partitions
-502ba7a0cfdce2849c3a99881f0590c3 sunlabel.img
--- /dev/null
+e730c7ec8208601f41963f0485147248 sunlabel.img
+Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors
+Geometry: 1 heads, 63 sectors/track, 325 cylinders
+Units: cylinders of 63 * 512 = 32256 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: sun
+Label ID: Linux cyl 325 alt 0 hd 1 sec 63
+Rpm: 5400
+Alternate cylinders: 0
+Physical cylinders: 325
+Extra sects/cyl: 0
+Interleave: 1
+
+Device Start End Cylinders Size Id Type Flags
+<removed>1 1 128 129 4128768 83 Linux native
--- /dev/null
+
+Welcome to fdisk <removed>.
+Changes will remain in memory only, until you decide to write them.
+Be careful before using the write command.
+
+
+Command (m for help): Partition number (2-8, default 2): First cylinder (128-325, default 128): Last cylinder or +/-cylinders or +/-size{K,M,G,T,P} (128-325, default 325):
+Created a new partition <removed>.
+
+Command (m for help): The partition table has been altered.
+Syncing disks.
+
+a87e80830aa13d2d68b766962f052750 sunlabel.img
+Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors
+Geometry: 1 heads, 63 sectors/track, 325 cylinders
+Units: cylinders of 63 * 512 = 32256 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: sun
+Label ID: Linux cyl 325 alt 0 hd 1 sec 63
+Rpm: 5400
+Alternate cylinders: 0
+Physical cylinders: 325
+Extra sects/cyl: 0
+Interleave: 1
+
+Device Start End Cylinders Size Id Type Flags
+<removed>1 1 128 129 4128768 4 SunOS usr ur
+<removed>2 129 325 198 6354432 83 Linux native
--- /dev/null
+502ba7a0cfdce2849c3a99881f0590c3 sunlabel.img
--- /dev/null
+f1c9645dbc14efddc7d8a322685f26eb sunlabel.img
+f050fd2beb99f8d968bf17450f655f06 sunlabel.img
+Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors
+Geometry: 1 heads, 63 sectors/track, 325 cylinders
+Units: cylinders of 63 * 512 = 32256 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: sun
+Label ID: Linux cyl 325 alt 0 hd 1 sec 63
+Rpm: 5400
+Alternate cylinders: 0
+Physical cylinders: 325
+Extra sects/cyl: 0
+Interleave: 1
--- /dev/null
+3ab76e8491b103eab52b2ae1856c1e30 sunlabel.img
+Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors
+Geometry: 1 heads, 63 sectors/track, 325 cylinders
+Units: cylinders of 63 * 512 = 32256 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: sun
+Label ID: Linux cyl 325 alt 0 hd 1 sec 63
+Rpm: 5400
+Alternate cylinders: 0
+Physical cylinders: 325
+Extra sects/cyl: 0
+Interleave: 1
+
+Device Start End Cylinders Size Id Type Flags
+<removed>1 1 128 129 4128768 4 SunOS usr ur
--- /dev/null
+da23f66698d9a553162887621d4c7490 sunlabel.img
+Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors
+Geometry: 1 heads, 63 sectors/track, 325 cylinders
+Units: cylinders of 63 * 512 = 32256 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: sun
+Label ID: Linux cyl 325 alt 0 hd 1 sec 63
+Rpm: 5400
+Alternate cylinders: 0
+Physical cylinders: 325
+Extra sects/cyl: 0
+Interleave: 1
+
+Device Start End Cylinders Size Id Type Flags
+<removed>1 1 128 129 4128768 4 SunOS usr r
--- /dev/null
+df75defdb97fbd56222aed18631a22d0 sunlabel.img
+Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors
+Geometry: 1 heads, 63 sectors/track, 325 cylinders
+Units: cylinders of 63 * 512 = 32256 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: sun
+Label ID: Linux cyl 325 alt 0 hd 1 sec 63
+Rpm: 5400
+Alternate cylinders: 0
+Physical cylinders: 325
+Extra sects/cyl: 0
+Interleave: 1
+
+Device Start End Cylinders Size Id Type Flags
+<removed>1 1 128 129 4128768 4 SunOS usr
ts_check_test_command "$TS_CMD_COL"
-ts_log "zero length file"
+ts_init_subtest "zero-length-file"
printf "" | ts_run $TS_CMD_COL >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
-ts_log "one line no nl"
+ts_init_subtest "one-line-no-nl"
printf "1" | ts_run $TS_CMD_COL >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
-ts_log "one line with nl"
+ts_init_subtest "one-line-with-nl"
printf "1\n" | ts_run $TS_CMD_COL >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
-ts_log "second line no nl"
+ts_init_subtest "second-line-no-nl"
printf "1\n2" | ts_run $TS_CMD_COL >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
-ts_log "second line with nl"
+ts_init_subtest "second-line-with-nl"
printf "1\n2\n" | ts_run $TS_CMD_COL >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
ts_finalize
ts_check_test_command "$TS_CMD_COL"
-ts_log "no-backspaces"
+ts_init_subtest "no-backspaces"
printf "FIXME" | ts_run $TS_CMD_COL --no-backspaces >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
-ts_log "pass"
+ts_init_subtest "pass"
printf "a\x11b" | ts_run $TS_CMD_COL >> $TS_OUTPUT 2>> $TS_ERRLOG
printf "a\x11b" | ts_run $TS_CMD_COL --pass >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
-ts_log "tabs"
+ts_init_subtest "tabs"
printf " 1\n" | ts_run $TS_CMD_COL --tabs >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
-ts_log "spaces"
+ts_init_subtest "spaces"
printf "\t1\n" | ts_run $TS_CMD_COL --spaces >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
ts_finalize
echo -ne "\n---layout----------\n" >> $TS_OUTPUT
$TS_CMD_FDISK -l ${TEST_IMAGE_NAME} >> $TS_OUTPUT 2>> $TS_ERRLOG
echo -ne "-------------------\n\n" >> $TS_OUTPUT
+
+ ts_fdisk_clean ${TEST_IMAGE_NAME}
}
+
+ts_init_subtest "empty-pt"
ts_log "Initialize empty image"
TEST_IMAGE_NAME=$(ts_image_init 10)
| $TS_CMD_FDISK --noauto-pt ${TEST_IMAGE_NAME} &> /dev/null
print_layout
+ts_finalize_subtest
-ts_log "Create partitions"
+ts_init_subtest "create-partitions"
for i in {1..8}; do
echo -e "n\n${i}\n\n+1M\n${FDISK_CMD_WRITE_CLOSE}" | \
$TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
done
+ts_finalize_subtest
-ts_log "Change partition type by number"
+ts_init_subtest "change-type-by-number"
echo -e "${FDISK_CMD_CHANGE_TYPE_BY_NUM}${FDISK_CMD_WRITE_CLOSE}" \
| $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
print_layout
+ts_finalize_subtest
-ts_log "Change partition type by UUID"
+ts_init_subtest "change-type-by-uuid"
echo -e "${FDISK_CMD_CHANGE_TYPE_BY_UUID}${FDISK_CMD_WRITE_CLOSE}" \
| $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
print_layout
+ts_finalize_subtest
-ts_log "Delete partition"
+ts_init_subtest "delete-partition"
echo -e "${FDISK_CMD_DELETE_PART}${FDISK_CMD_WRITE_CLOSE}" \
| $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
print_layout
+ts_finalize_subtest
-ts_log "Create again partition"
+ts_init_subtest "create-again-partition"
echo -e "${FDISK_CMD_CREATE_PART}${FDISK_CMD_WRITE_CLOSE}" \
| $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
print_layout
+ts_finalize_subtest
-ts_log "Corrupt primary table"
+ts_init_subtest "corrupt-primary-table"
dd if=/dev/zero of=${TEST_IMAGE_NAME} bs=512 count=1 seek=1 conv=notrunc &> /dev/null
echo -e "w\n" | $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
print_layout
+ts_finalize_subtest
-ts_log "Corrupt backup table"
+ts_init_subtest "corrupt-backup-table"
dd if=/dev/zero of=${TEST_IMAGE_NAME} bs=512 count=1 \
seek=$(( 1024 * 1024 * 10 / 512 - 1)) conv=notrunc &> /dev/null
echo -e "w\n" | $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
print_layout
+ts_finalize_subtest
-ts_fdisk_clean ${TEST_IMAGE_NAME}
ts_finalize
ts_log "Initialize empty image"
TEST_IMAGE_NAME=$(ts_image_init 10)
-ts_log "Create MBR with ID=0x1"
+ts_init_subtest "create-mbr-with-id-0x1"
+TS_EXPECTED+="${ARCH_EXT}"
echo -e "${FDISK_CMD_ID1}" | $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
$TS_CMD_FDISK -l ${TEST_IMAGE_NAME} | grep identifier >> $TS_OUTPUT
+ts_finalize_subtest
-ts_log "Create MBR with ID=0x2"
+ts_init_subtest "create-mbr-with-id-0x2"
+TS_EXPECTED+="${ARCH_EXT}"
echo -e "${FDISK_CMD_ID2}" | $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
$TS_CMD_FDISK -l ${TEST_IMAGE_NAME} | grep identifier >> $TS_OUTPUT
+ts_finalize_subtest
ts_finalize
echo -ne "\n---layout----------\n" >> $TS_OUTPUT
$TS_CMD_FDISK ${FDISK_OPTIONS} -x ${TEST_IMAGE_NAME} >> $TS_OUTPUT
echo -ne "-------------------\n\n" >> $TS_OUTPUT
+
+ ts_fdisk_clean ${TEST_IMAGE_NAME}
}
#
# Note that fdisk will enlarge the disk image (to 57MB) because the logical
# partitions are out of the original range (10MB).
#
-ts_log "Initialize empty image"
+ts_init_subtest "empty-pt"
TEST_IMAGE_NAME=$(ts_image_init 10)
ts_image_md5sum >> $TS_OUTPUT 2>> $TS_ERRLOG
-ts_log "Create new DOS partition table"
echo -e "${FDISK_CMD_CREATE_DOSLABEL}${FDISK_CMD_INIT}${FDISK_CMD_WRITE_CLOSE}" \
| $TS_CMD_FDISK --noauto-pt ${FDISK_OPTIONS} ${TEST_IMAGE_NAME} &> /dev/null
ts_image_md5sum >> $TS_OUTPUT 2>> $TS_ERRLOG
print_layout
+ts_finalize_subtest
-ts_log "Create primary partition"
+ts_init_subtest "create-primary-partition"
echo -e "${FDISK_CMD_CREATE_PRIMARY}${FDISK_CMD_WRITE_CLOSE}" | \
$TS_CMD_FDISK ${FDISK_OPTIONS} ${TEST_IMAGE_NAME} &> /dev/null
ts_image_md5sum >> $TS_OUTPUT 2>> $TS_ERRLOG
print_layout
+ts_finalize_subtest
-ts_log "Set partition type"
+ts_init_subtest "set-partition-type"
echo -e "${FDISK_CMD_CHANGE_PARTTYPE}${FDISK_CMD_WRITE_CLOSE}" | \
$TS_CMD_FDISK ${FDISK_OPTIONS} ${TEST_IMAGE_NAME} &> /dev/null
ts_image_md5sum >> $TS_OUTPUT 2>> $TS_ERRLOG
print_layout
+ts_finalize_subtest
-ts_log "Set primary partition active"
+ts_init_subtest "set-primary-par-active"
echo -e "${FDISK_CMD_SET_ACTIVE}${FDISK_CMD_WRITE_CLOSE}" | \
$TS_CMD_FDISK ${FDISK_OPTIONS} ${TEST_IMAGE_NAME} &> /dev/null
ts_image_md5sum >> $TS_OUTPUT 2>> $TS_ERRLOG
print_layout
+ts_finalize_subtest
-ts_log "Re-create primary partition"
+ts_init_subtest "re-create-primary-par"
echo -e "d\n${FDISK_CMD_CREATE_PRIMARY}${FDISK_CMD_WRITE_CLOSE}" | \
$TS_CMD_FDISK ${FDISK_OPTIONS} ${TEST_IMAGE_NAME} &> /dev/null
ts_image_md5sum >> $TS_OUTPUT 2>> $TS_ERRLOG
print_layout
+ts_finalize_subtest
-ts_log "Create extended partition"
+ts_init_subtest "create-extended-par"
echo -e "${FDISK_CMD_CREATE_EXTENDED}${FDISK_CMD_WRITE_CLOSE}" | \
$TS_CMD_FDISK ${FDISK_OPTIONS} ${TEST_IMAGE_NAME} &> /dev/null
ts_image_md5sum >> $TS_OUTPUT 2>> $TS_ERRLOG
print_layout
+ts_finalize_subtest
-ts_log "Create logical partitions"
+ts_init_subtest "create-logical-par"
echo -e "${FDISK_CMD_CREATE_LOGICAL}${FDISK_CMD_CREATE_LOGICAL}${FDISK_CMD_CREATE_LOGICAL}${FDISK_CMD_CREATE_LOGICAL}${FDISK_CMD_WRITE_CLOSE}" \
| $TS_CMD_FDISK ${FDISK_OPTIONS} ${TEST_IMAGE_NAME} &> /dev/null
ts_image_md5sum >> $TS_OUTPUT 2>> $TS_ERRLOG
print_layout
+ts_finalize_subtest
-ts_log "Delete logical partitions"
+ts_init_subtest "delete-logical-par"
echo -e "${FDISK_CMD_DELETE_LOGICALS}${FDISK_CMD_WRITE_CLOSE}" \
| $TS_CMD_FDISK ${FDISK_OPTIONS} ${TEST_IMAGE_NAME} &> /dev/null
ts_image_md5sum >> $TS_OUTPUT 2>> $TS_ERRLOG
print_layout
+ts_finalize_subtest
-ts_log "Create another logical partition"
+ts_init_subtest "create-another-log-par"
echo -e "${FDISK_CMD_CREATE_LOGICAL}${FDISK_CMD_WRITE_CLOSE}" \
| $TS_CMD_FDISK ${FDISK_OPTIONS} ${TEST_IMAGE_NAME} &> /dev/null
ts_image_md5sum >> $TS_OUTPUT 2>> $TS_ERRLOG
print_layout
+ts_finalize_subtest
-ts_log "Delete primary partition"
+ts_init_subtest "delete-primary-par"
echo -e "${FDISK_CMD_DELETE_PRIMARY}${FDISK_CMD_WRITE_CLOSE}" \
| $TS_CMD_FDISK ${FDISK_OPTIONS} ${TEST_IMAGE_NAME} &> /dev/null
ts_image_md5sum >> $TS_OUTPUT 2>> $TS_ERRLOG
print_layout
+ts_finalize_subtest
-ts_log "Delete extended partition"
+ts_init_subtest "delete-extended-par"
echo -e "${FDISK_CMD_DELETE_EXTENDED}${FDISK_CMD_WRITE_CLOSE}" \
| $TS_CMD_FDISK ${FDISK_OPTIONS} ${TEST_IMAGE_NAME} &> /dev/null
ts_image_md5sum >> $TS_OUTPUT 2>> $TS_ERRLOG
print_layout
+ts_finalize_subtest
-ts_fdisk_clean ${TEST_IMAGE_NAME}
ts_finalize
echo -ne "\n---layout----------\n" >> $TS_OUTPUT
$TS_CMD_FDISK -x ${TEST_IMAGE_NAME} >> $TS_OUTPUT
echo -ne "-------------------\n\n" >> $TS_OUTPUT
+
+ ts_fdisk_clean ${TEST_IMAGE_NAME}
}
#set -x
-ts_log "Initialize empty image"
+ts_init_subtest "empty-pt"
TEST_IMAGE_NAME=$(ts_image_init 20) # 20 MiB
-ts_log "Create new DOS partition table"
echo -e "${FDISK_CMD_CREATE_DOSLABEL}${FDISK_CMD_WRITE_CLOSE}" \
| $TS_CMD_FDISK --noauto-pt ${TEST_IMAGE_NAME} &> /dev/null
print_layout
+ts_finalize_subtest
-ts_log "Create primary partitions"
+ts_init_subtest "create-primary-partitions"
echo -e "${FDISK_CMD_CREATE_1PRIMARY}${FDISK_CMD_CREATE_2PRIMARY}${FDISK_CMD_CREATE_3PRIMARY}${FDISK_CMD_CREATE_EXTENDED}${FDISK_CMD_WRITE_CLOSE}" \
| $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
print_layout
+ts_finalize_subtest
-ts_log "Create logical partitions"
+ts_init_subtest "create-logical-partitions"
echo -e "${FDISK_CMD_CREATE_1LOGICAL}${FDISK_CMD_CREATE_2LOGICAL}${FDISK_CMD_CREATE_3LOGICAL}${FDISK_CMD_CREATE_4LOGICAL}${FDISK_CMD_WRITE_CLOSE}" \
| $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
print_layout
+ts_finalize_subtest
-ts_log "Fix order."
+ts_init_subtest "fix-order"
echo -e "${FDISK_CMD_EXPERT_SORT}${FDISK_CMD_WRITE_CLOSE}" \
| $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
print_layout
+ts_finalize_subtest
-ts_fdisk_clean ${TEST_IMAGE_NAME}
ts_finalize
FDISK_OPTIONS="-H 1 -S 63 -u=cylinders"
+function print_layout {
+ $TS_CMD_FDISK ${FDISK_OPTIONS} -x ${TEST_IMAGE_NAME} >> $TS_OUTPUT
+ ts_fdisk_clean ${TEST_IMAGE_NAME}
+}
+
#set -x
-ts_log "Initialize empty image"
+ts_init_subtest "empty-sun-pt"
TEST_IMAGE_NAME=$(ts_image_init 10)
ts_image_md5sum >> $TS_OUTPUT 2>> $TS_ERRLOG
-ts_log "Create new SUN partition table"
echo -e "${FDISK_CMD_INIT}${FDISK_CMD_DELETEALL}${FDISK_CMD_WRITE_CLOSE}" \
| $TS_CMD_FDISK --noauto-pt ${FDISK_OPTIONS} ${TEST_IMAGE_NAME} &> /dev/null
ts_image_md5sum >> $TS_OUTPUT 2>> $TS_ERRLOG
-$TS_CMD_FDISK ${FDISK_OPTIONS} -x ${TEST_IMAGE_NAME} >> $TS_OUTPUT
+print_layout
+ts_finalize_subtest
+
-ts_log "Create first partition"
+ts_init_subtest "create-first-partition"
echo -e "${FDISK_CMD_CREATE_PRIMARY}${FDISK_CMD_WRITE_CLOSE}" | \
$TS_CMD_FDISK ${FDISK_OPTIONS} ${TEST_IMAGE_NAME} &> /dev/null
ts_image_md5sum >> $TS_OUTPUT 2>> $TS_ERRLOG
-$TS_CMD_FDISK ${FDISK_OPTIONS} -x ${TEST_IMAGE_NAME} >> $TS_OUTPUT
+print_layout
+ts_finalize_subtest
-ts_log "Set partition sysid"
+ts_init_subtest "set-partition-sysid"
echo -e "${FDISK_CMD_CHANGE_SYSID}${FDISK_CMD_WRITE_CLOSE}" | \
$TS_CMD_FDISK ${FDISK_OPTIONS} ${TEST_IMAGE_NAME} &> /dev/null
ts_image_md5sum >> $TS_OUTPUT 2>> $TS_ERRLOG
-$TS_CMD_FDISK ${FDISK_OPTIONS} -x ${TEST_IMAGE_NAME} >> $TS_OUTPUT
+print_layout
+ts_finalize_subtest
-ts_log "Set first partition readonly"
+ts_init_subtest "set-first-par-readonly"
echo -e "${FDISK_CMD_TOGGLE_READONLY}${FDISK_CMD_WRITE_CLOSE}" | \
$TS_CMD_FDISK ${FDISK_OPTIONS} ${TEST_IMAGE_NAME} &> /dev/null
ts_image_md5sum >> $TS_OUTPUT 2>> $TS_ERRLOG
-$TS_CMD_FDISK ${FDISK_OPTIONS} -x ${TEST_IMAGE_NAME} >> $TS_OUTPUT
+print_layout
+ts_finalize_subtest
-ts_log "Set first partition mountable"
+ts_init_subtest "set-first-par-mountable"
echo -e "${FDISK_CMD_TOGGLE_MOUNTABLE}${FDISK_CMD_WRITE_CLOSE}" | \
$TS_CMD_FDISK ${FDISK_OPTIONS} ${TEST_IMAGE_NAME} &> /dev/null
ts_image_md5sum >> $TS_OUTPUT 2>> $TS_ERRLOG
-$TS_CMD_FDISK ${FDISK_OPTIONS} -x ${TEST_IMAGE_NAME} >> $TS_OUTPUT
+print_layout
+ts_finalize_subtest
-ts_log "Create second partition"
+ts_init_subtest "create-second-partition"
echo -e "${FDISK_CMD_CREATE_SECONDARY}${FDISK_CMD_WRITE_CLOSE}" | \
$TS_CMD_FDISK ${FDISK_OPTIONS} ${TEST_IMAGE_NAME} >> $TS_OUTPUT 2>> $TS_ERRLOG
ts_image_md5sum >> $TS_OUTPUT 2>> $TS_ERRLOG
-$TS_CMD_FDISK ${FDISK_OPTIONS} -x ${TEST_IMAGE_NAME} >> $TS_OUTPUT
+print_layout
+ts_finalize_subtest
-ts_log "Delete all partitions"
+ts_init_subtest "delete-all-partitions"
echo -e "${FDISK_CMD_DELETEALL}${FDISK_CMD_WRITE_CLOSE}" | \
$TS_CMD_FDISK ${FDISK_OPTIONS} ${TEST_IMAGE_NAME} &> /dev/null
ts_image_md5sum >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
-ts_fdisk_clean ${TEST_IMAGE_NAME}
ts_finalize