]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: split several tests into subtests
authorVojtěch Eichler <vojta.eich@gmail.com>
Thu, 14 Oct 2021 10:33:45 +0000 (12:33 +0200)
committerVojtěch Eichler <vojta.eich@gmail.com>
Thu, 14 Oct 2021 10:33:45 +0000 (12:33 +0200)
58 files changed:
tests/expected/col/newlines
tests/expected/col/newlines-one-line-no-nl [new file with mode: 0644]
tests/expected/col/newlines-one-line-with-nl [new file with mode: 0644]
tests/expected/col/newlines-second-line-no-nl [new file with mode: 0644]
tests/expected/col/newlines-second-line-with-nl [new file with mode: 0644]
tests/expected/col/newlines-zero-length-file [new file with mode: 0644]
tests/expected/col/options
tests/expected/col/options-no-backspaces [new file with mode: 0644]
tests/expected/col/options-pass [new file with mode: 0644]
tests/expected/col/options-spaces [new file with mode: 0644]
tests/expected/col/options-tabs [new file with mode: 0644]
tests/expected/fdisk/gpt
tests/expected/fdisk/gpt-change-type-by-number [new file with mode: 0644]
tests/expected/fdisk/gpt-change-type-by-uuid [new file with mode: 0644]
tests/expected/fdisk/gpt-corrupt-backup-table [new file with mode: 0644]
tests/expected/fdisk/gpt-corrupt-primary-table [new file with mode: 0644]
tests/expected/fdisk/gpt-create-again-partition [new file with mode: 0644]
tests/expected/fdisk/gpt-create-partitions [new file with mode: 0644]
tests/expected/fdisk/gpt-delete-partition [new file with mode: 0644]
tests/expected/fdisk/gpt-empty-pt [new file with mode: 0644]
tests/expected/fdisk/id
tests/expected/fdisk/id-create-mbr-with-id-0x1 [new file with mode: 0644]
tests/expected/fdisk/id-create-mbr-with-id-0x1.sparc [new file with mode: 0644]
tests/expected/fdisk/id-create-mbr-with-id-0x2 [new file with mode: 0644]
tests/expected/fdisk/id-create-mbr-with-id-0x2.sparc [new file with mode: 0644]
tests/expected/fdisk/id.sparc
tests/expected/fdisk/mbr-dos-mode
tests/expected/fdisk/mbr-dos-mode-create-another-log-par [new file with mode: 0644]
tests/expected/fdisk/mbr-dos-mode-create-extended-par [new file with mode: 0644]
tests/expected/fdisk/mbr-dos-mode-create-logical-par [new file with mode: 0644]
tests/expected/fdisk/mbr-dos-mode-create-primary-partition [new file with mode: 0644]
tests/expected/fdisk/mbr-dos-mode-delete-extended-par [new file with mode: 0644]
tests/expected/fdisk/mbr-dos-mode-delete-logical-par [new file with mode: 0644]
tests/expected/fdisk/mbr-dos-mode-delete-primary-par [new file with mode: 0644]
tests/expected/fdisk/mbr-dos-mode-empty-pt [new file with mode: 0644]
tests/expected/fdisk/mbr-dos-mode-re-create-primary-par [new file with mode: 0644]
tests/expected/fdisk/mbr-dos-mode-set-partition-type [new file with mode: 0644]
tests/expected/fdisk/mbr-dos-mode-set-primary-par-active [new file with mode: 0644]
tests/expected/fdisk/mbr-sort
tests/expected/fdisk/mbr-sort-create-logical-partitions [new file with mode: 0644]
tests/expected/fdisk/mbr-sort-create-primary-partitions [new file with mode: 0644]
tests/expected/fdisk/mbr-sort-empty-pt [new file with mode: 0644]
tests/expected/fdisk/mbr-sort-fix-order [new file with mode: 0644]
tests/expected/fdisk/sunlabel
tests/expected/fdisk/sunlabel-create-first-partition [new file with mode: 0644]
tests/expected/fdisk/sunlabel-create-second-partition [new file with mode: 0644]
tests/expected/fdisk/sunlabel-delete-all-partitions [new file with mode: 0644]
tests/expected/fdisk/sunlabel-empty-sun-pt [new file with mode: 0644]
tests/expected/fdisk/sunlabel-set-first-par-mountable [new file with mode: 0644]
tests/expected/fdisk/sunlabel-set-first-par-readonly [new file with mode: 0644]
tests/expected/fdisk/sunlabel-set-partition-sysid [new file with mode: 0644]
tests/ts/col/newlines
tests/ts/col/options
tests/ts/fdisk/gpt
tests/ts/fdisk/id
tests/ts/fdisk/mbr-dos-mode
tests/ts/fdisk/mbr-sort
tests/ts/fdisk/sunlabel

index c1ff20d264df46f3fb6a420f5ae9e06eeafe0145..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,11 +0,0 @@
-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
diff --git a/tests/expected/col/newlines-one-line-no-nl b/tests/expected/col/newlines-one-line-no-nl
new file mode 100644 (file)
index 0000000..d00491f
--- /dev/null
@@ -0,0 +1 @@
+1
diff --git a/tests/expected/col/newlines-one-line-with-nl b/tests/expected/col/newlines-one-line-with-nl
new file mode 100644 (file)
index 0000000..d00491f
--- /dev/null
@@ -0,0 +1 @@
+1
diff --git a/tests/expected/col/newlines-second-line-no-nl b/tests/expected/col/newlines-second-line-no-nl
new file mode 100644 (file)
index 0000000..1191247
--- /dev/null
@@ -0,0 +1,2 @@
+1
+2
diff --git a/tests/expected/col/newlines-second-line-with-nl b/tests/expected/col/newlines-second-line-with-nl
new file mode 100644 (file)
index 0000000..1191247
--- /dev/null
@@ -0,0 +1,2 @@
+1
+2
diff --git a/tests/expected/col/newlines-zero-length-file b/tests/expected/col/newlines-zero-length-file
new file mode 100644 (file)
index 0000000..e69de29
index e175e509e1104f797968a655dc8ef1efba19d0b5..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,9 +0,0 @@
-no-backspaces
-FIXME
-pass
-ab
-a\11b
-tabs
-       1
-spaces
-        1
diff --git a/tests/expected/col/options-no-backspaces b/tests/expected/col/options-no-backspaces
new file mode 100644 (file)
index 0000000..9d6cf4b
--- /dev/null
@@ -0,0 +1 @@
+FIXME
diff --git a/tests/expected/col/options-pass b/tests/expected/col/options-pass
new file mode 100644 (file)
index 0000000..5ff7376
--- /dev/null
@@ -0,0 +1,2 @@
+ab
+a\11b
diff --git a/tests/expected/col/options-spaces b/tests/expected/col/options-spaces
new file mode 100644 (file)
index 0000000..dfcf712
--- /dev/null
@@ -0,0 +1 @@
+        1
diff --git a/tests/expected/col/options-tabs b/tests/expected/col/options-tabs
new file mode 100644 (file)
index 0000000..c84197b
--- /dev/null
@@ -0,0 +1 @@
+       1
index 3244874a3bc241c32a6b591e8a4b70eb875ccece..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,138 +0,0 @@
-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
--------------------
-
diff --git a/tests/expected/fdisk/gpt-change-type-by-number b/tests/expected/fdisk/gpt-change-type-by-number
new file mode 100644 (file)
index 0000000..33a6630
--- /dev/null
@@ -0,0 +1,20 @@
+
+---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
+-------------------
+
diff --git a/tests/expected/fdisk/gpt-change-type-by-uuid b/tests/expected/fdisk/gpt-change-type-by-uuid
new file mode 100644 (file)
index 0000000..34b7919
--- /dev/null
@@ -0,0 +1,20 @@
+
+---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
+-------------------
+
diff --git a/tests/expected/fdisk/gpt-corrupt-backup-table b/tests/expected/fdisk/gpt-corrupt-backup-table
new file mode 100644 (file)
index 0000000..34b7919
--- /dev/null
@@ -0,0 +1,20 @@
+
+---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
+-------------------
+
diff --git a/tests/expected/fdisk/gpt-corrupt-primary-table b/tests/expected/fdisk/gpt-corrupt-primary-table
new file mode 100644 (file)
index 0000000..34b7919
--- /dev/null
@@ -0,0 +1,20 @@
+
+---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
+-------------------
+
diff --git a/tests/expected/fdisk/gpt-create-again-partition b/tests/expected/fdisk/gpt-create-again-partition
new file mode 100644 (file)
index 0000000..34b7919
--- /dev/null
@@ -0,0 +1,20 @@
+
+---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
+-------------------
+
diff --git a/tests/expected/fdisk/gpt-create-partitions b/tests/expected/fdisk/gpt-create-partitions
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/expected/fdisk/gpt-delete-partition b/tests/expected/fdisk/gpt-delete-partition
new file mode 100644 (file)
index 0000000..ed6cfa0
--- /dev/null
@@ -0,0 +1,19 @@
+
+---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
+-------------------
+
diff --git a/tests/expected/fdisk/gpt-empty-pt b/tests/expected/fdisk/gpt-empty-pt
new file mode 100644 (file)
index 0000000..788aa65
--- /dev/null
@@ -0,0 +1,12 @@
+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>
+-------------------
+
index 4801f8166414593ebd094cf7ece521884121e85d..960bb6becab14b6884959d02931d84d4896d9747 100644 (file)
@@ -1,5 +1 @@
 Initialize empty image
-Create MBR with ID=0x1
-Disk identifier: 0x00000001
-Create MBR with ID=0x2
-Disk identifier: 0x00000002
diff --git a/tests/expected/fdisk/id-create-mbr-with-id-0x1 b/tests/expected/fdisk/id-create-mbr-with-id-0x1
new file mode 100644 (file)
index 0000000..a9527e4
--- /dev/null
@@ -0,0 +1 @@
+Disk identifier: 0x00000001
diff --git a/tests/expected/fdisk/id-create-mbr-with-id-0x1.sparc b/tests/expected/fdisk/id-create-mbr-with-id-0x1.sparc
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/expected/fdisk/id-create-mbr-with-id-0x2 b/tests/expected/fdisk/id-create-mbr-with-id-0x2
new file mode 100644 (file)
index 0000000..a0a9884
--- /dev/null
@@ -0,0 +1 @@
+Disk identifier: 0x00000002
diff --git a/tests/expected/fdisk/id-create-mbr-with-id-0x2.sparc b/tests/expected/fdisk/id-create-mbr-with-id-0x2.sparc
new file mode 100644 (file)
index 0000000..e69de29
index aa3f407f6f53e6ee7e1f33dfb6124a8b8aa3c678..960bb6becab14b6884959d02931d84d4896d9747 100644 (file)
@@ -1,3 +1 @@
 Initialize empty image
-Create MBR with ID=0x1
-Create MBR with ID=0x2
index 2b2048467accbb630c280d6c44dbab5a5393e351..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,189 +0,0 @@
-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>
--------------------
-
diff --git a/tests/expected/fdisk/mbr-dos-mode-create-another-log-par b/tests/expected/fdisk/mbr-dos-mode-create-another-log-par
new file mode 100644 (file)
index 0000000..61f04c0
--- /dev/null
@@ -0,0 +1,20 @@
+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.
+-------------------
+
diff --git a/tests/expected/fdisk/mbr-dos-mode-create-extended-par b/tests/expected/fdisk/mbr-dos-mode-create-extended-par
new file mode 100644 (file)
index 0000000..3c2229b
--- /dev/null
@@ -0,0 +1,16 @@
+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 
+-------------------
+
diff --git a/tests/expected/fdisk/mbr-dos-mode-create-logical-par b/tests/expected/fdisk/mbr-dos-mode-create-logical-par
new file mode 100644 (file)
index 0000000..e37c296
--- /dev/null
@@ -0,0 +1,20 @@
+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 
+-------------------
+
diff --git a/tests/expected/fdisk/mbr-dos-mode-create-primary-partition b/tests/expected/fdisk/mbr-dos-mode-create-primary-partition
new file mode 100644 (file)
index 0000000..ac8fb0f
--- /dev/null
@@ -0,0 +1,15 @@
+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 
+-------------------
+
diff --git a/tests/expected/fdisk/mbr-dos-mode-delete-extended-par b/tests/expected/fdisk/mbr-dos-mode-delete-extended-par
new file mode 100644 (file)
index 0000000..0fbff6e
--- /dev/null
@@ -0,0 +1,12 @@
+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>
+-------------------
+
diff --git a/tests/expected/fdisk/mbr-dos-mode-delete-logical-par b/tests/expected/fdisk/mbr-dos-mode-delete-logical-par
new file mode 100644 (file)
index 0000000..cdae97e
--- /dev/null
@@ -0,0 +1,17 @@
+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 
+-------------------
+
diff --git a/tests/expected/fdisk/mbr-dos-mode-delete-primary-par b/tests/expected/fdisk/mbr-dos-mode-delete-primary-par
new file mode 100644 (file)
index 0000000..1b9f0a3
--- /dev/null
@@ -0,0 +1,19 @@
+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.
+-------------------
+
diff --git a/tests/expected/fdisk/mbr-dos-mode-empty-pt b/tests/expected/fdisk/mbr-dos-mode-empty-pt
new file mode 100644 (file)
index 0000000..ecb5e4c
--- /dev/null
@@ -0,0 +1,13 @@
+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>
+-------------------
+
diff --git a/tests/expected/fdisk/mbr-dos-mode-re-create-primary-par b/tests/expected/fdisk/mbr-dos-mode-re-create-primary-par
new file mode 100644 (file)
index 0000000..ac8fb0f
--- /dev/null
@@ -0,0 +1,15 @@
+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 
+-------------------
+
diff --git a/tests/expected/fdisk/mbr-dos-mode-set-partition-type b/tests/expected/fdisk/mbr-dos-mode-set-partition-type
new file mode 100644 (file)
index 0000000..2a1aacb
--- /dev/null
@@ -0,0 +1,15 @@
+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 
+-------------------
+
diff --git a/tests/expected/fdisk/mbr-dos-mode-set-primary-par-active b/tests/expected/fdisk/mbr-dos-mode-set-primary-par-active
new file mode 100644 (file)
index 0000000..5c77ea3
--- /dev/null
@@ -0,0 +1,15 @@
+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
+-------------------
+
index bb57432c038bb351132f7cae0f41bb36dc4914e4..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,75 +0,0 @@
-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 
--------------------
-
diff --git a/tests/expected/fdisk/mbr-sort-create-logical-partitions b/tests/expected/fdisk/mbr-sort-create-logical-partitions
new file mode 100644 (file)
index 0000000..9bf6cf5
--- /dev/null
@@ -0,0 +1,22 @@
+
+---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.
+-------------------
+
diff --git a/tests/expected/fdisk/mbr-sort-create-primary-partitions b/tests/expected/fdisk/mbr-sort-create-primary-partitions
new file mode 100644 (file)
index 0000000..0fc5098
--- /dev/null
@@ -0,0 +1,18 @@
+
+---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.
+-------------------
+
diff --git a/tests/expected/fdisk/mbr-sort-empty-pt b/tests/expected/fdisk/mbr-sort-empty-pt
new file mode 100644 (file)
index 0000000..338ac65
--- /dev/null
@@ -0,0 +1,10 @@
+
+---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>
+-------------------
+
diff --git a/tests/expected/fdisk/mbr-sort-fix-order b/tests/expected/fdisk/mbr-sort-fix-order
new file mode 100644 (file)
index 0000000..8802009
--- /dev/null
@@ -0,0 +1,20 @@
+
+---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 
+-------------------
+
index bb1f5a8606e8780116625b2e5a652a7c13d46592..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,116 +0,0 @@
-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
diff --git a/tests/expected/fdisk/sunlabel-create-first-partition b/tests/expected/fdisk/sunlabel-create-first-partition
new file mode 100644 (file)
index 0000000..61fecac
--- /dev/null
@@ -0,0 +1,16 @@
+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 
diff --git a/tests/expected/fdisk/sunlabel-create-second-partition b/tests/expected/fdisk/sunlabel-create-second-partition
new file mode 100644 (file)
index 0000000..f6442d3
--- /dev/null
@@ -0,0 +1,29 @@
+
+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 
diff --git a/tests/expected/fdisk/sunlabel-delete-all-partitions b/tests/expected/fdisk/sunlabel-delete-all-partitions
new file mode 100644 (file)
index 0000000..0dee636
--- /dev/null
@@ -0,0 +1 @@
+502ba7a0cfdce2849c3a99881f0590c3 sunlabel.img
diff --git a/tests/expected/fdisk/sunlabel-empty-sun-pt b/tests/expected/fdisk/sunlabel-empty-sun-pt
new file mode 100644 (file)
index 0000000..0d38bd7
--- /dev/null
@@ -0,0 +1,14 @@
+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
diff --git a/tests/expected/fdisk/sunlabel-set-first-par-mountable b/tests/expected/fdisk/sunlabel-set-first-par-mountable
new file mode 100644 (file)
index 0000000..610dfa1
--- /dev/null
@@ -0,0 +1,16 @@
+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
diff --git a/tests/expected/fdisk/sunlabel-set-first-par-readonly b/tests/expected/fdisk/sunlabel-set-first-par-readonly
new file mode 100644 (file)
index 0000000..042ba76
--- /dev/null
@@ -0,0 +1,16 @@
+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
diff --git a/tests/expected/fdisk/sunlabel-set-partition-sysid b/tests/expected/fdisk/sunlabel-set-partition-sysid
new file mode 100644 (file)
index 0000000..b664433
--- /dev/null
@@ -0,0 +1,16 @@
+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 
index 96e82edb16f43f8ca2f5473058d6feec1476df29..209de0b77559abe3f03eccee0185f1237aba44d1 100755 (executable)
@@ -23,19 +23,24 @@ ts_init "$*"
 
 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
index b7825c66ab11877d5acdc253630002bb173fa5da..50312203abf092beeccde1b6174676ce8ffacb37 100755 (executable)
@@ -23,17 +23,21 @@ ts_init "$*"
 
 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
index 83fe34248ee42ad553d93f20cb6c453171577e48..18e4fab608b86ef8f5b390db54dc39e3874366cd 100755 (executable)
@@ -38,8 +38,12 @@ function print_layout {
        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)
 
@@ -48,49 +52,56 @@ echo -e "${FDISK_CMD_CREATE_GPTLABEL}${FDISK_CMD_WRITE_CLOSE}" \
         | $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
index 85b87d6829425964cf0a3479e7895aa42ea589df..c52e44b24524830292e79ea54d60ed5b0114b599 100755 (executable)
@@ -41,12 +41,16 @@ TS_EXPECTED+="${ARCH_EXT}"
 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
index f869e26596d6c76890791a2b38698a770154807e..cc274299c42a0c1881109f6ea70b08c9e6e84c83 100755 (executable)
@@ -43,92 +43,103 @@ function print_layout {
        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
index c82dc019bd9a98033c716494cac7a8035aff07ff..6a6d3b86f788651d8d611c31afc45688b712c05b 100755 (executable)
@@ -42,38 +42,42 @@ function print_layout {
        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
index 8f75b692af01d43e164e4b538e8c7bb3abcc751b..4c0d37503d3252aeae6fe4b85ba4553e6e854d76 100755 (executable)
@@ -35,58 +35,70 @@ FDISK_CMD_CREATE_SECONDARY="n\n2\n128\n\n" # create secondary partition to the e
 
 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