From: Vojtěch Eichler Date: Thu, 14 Oct 2021 10:33:45 +0000 (+0200) Subject: tests: split several tests into subtests X-Git-Tag: v2.38-rc1~199^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d4daa330b0baca5e7e55fc3d0b1dd993c12c68b0;p=thirdparty%2Futil-linux.git tests: split several tests into subtests --- diff --git a/tests/expected/col/newlines b/tests/expected/col/newlines index c1ff20d264..e69de29bb2 100644 --- a/tests/expected/col/newlines +++ b/tests/expected/col/newlines @@ -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 index 0000000000..d00491fd7e --- /dev/null +++ b/tests/expected/col/newlines-one-line-no-nl @@ -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 index 0000000000..d00491fd7e --- /dev/null +++ b/tests/expected/col/newlines-one-line-with-nl @@ -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 index 0000000000..1191247b6d --- /dev/null +++ b/tests/expected/col/newlines-second-line-no-nl @@ -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 index 0000000000..1191247b6d --- /dev/null +++ b/tests/expected/col/newlines-second-line-with-nl @@ -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 index 0000000000..e69de29bb2 diff --git a/tests/expected/col/options b/tests/expected/col/options index e175e509e1..e69de29bb2 100644 --- a/tests/expected/col/options +++ b/tests/expected/col/options @@ -1,9 +0,0 @@ -no-backspaces -FIXME -pass -ab -ab -tabs - 1 -spaces - 1 diff --git a/tests/expected/col/options-no-backspaces b/tests/expected/col/options-no-backspaces new file mode 100644 index 0000000000..9d6cf4b7fb --- /dev/null +++ b/tests/expected/col/options-no-backspaces @@ -0,0 +1 @@ +FIXME diff --git a/tests/expected/col/options-pass b/tests/expected/col/options-pass new file mode 100644 index 0000000000..5ff73762f6 --- /dev/null +++ b/tests/expected/col/options-pass @@ -0,0 +1,2 @@ +ab +ab diff --git a/tests/expected/col/options-spaces b/tests/expected/col/options-spaces new file mode 100644 index 0000000000..dfcf7126e0 --- /dev/null +++ b/tests/expected/col/options-spaces @@ -0,0 +1 @@ + 1 diff --git a/tests/expected/col/options-tabs b/tests/expected/col/options-tabs new file mode 100644 index 0000000000..c84197b4b2 --- /dev/null +++ b/tests/expected/col/options-tabs @@ -0,0 +1 @@ + 1 diff --git a/tests/expected/fdisk/gpt b/tests/expected/fdisk/gpt index 3244874a3b..e69de29bb2 100644 --- a/tests/expected/fdisk/gpt +++ b/tests/expected/fdisk/gpt @@ -1,138 +0,0 @@ -Initialize empty image -Create new GPT partition table - ----layout---------- -Disk : 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 / bytes -Disklabel type: gpt -Disk identifier: -------------------- - -Create partitions -Change partition type by number - ----layout---------- -Disk : 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 / bytes -Disklabel type: gpt -Disk identifier: - -Device Start End Sectors Size Type -1 2048 4095 2048 1M EFI System -2 4096 6143 2048 1M Linux filesystem -3 6144 8191 2048 1M Linux filesystem -4 8192 10239 2048 1M Linux filesystem -5 10240 12287 2048 1M Linux filesystem -6 12288 14335 2048 1M Linux filesystem -7 14336 16383 2048 1M Linux filesystem -8 16384 18431 2048 1M Linux filesystem -------------------- - -Change partition type by UUID - ----layout---------- -Disk : 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 / bytes -Disklabel type: gpt -Disk identifier: - -Device Start End Sectors Size Type -1 2048 4095 2048 1M EFI System -2 4096 6143 2048 1M Linux filesystem -3 6144 8191 2048 1M Linux filesystem -4 8192 10239 2048 1M Linux filesystem -5 10240 12287 2048 1M Linux swap -6 12288 14335 2048 1M Linux filesystem -7 14336 16383 2048 1M Linux filesystem -8 16384 18431 2048 1M Linux filesystem -------------------- - -Delete partition - ----layout---------- -Disk : 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 / bytes -Disklabel type: gpt -Disk identifier: - -Device Start End Sectors Size Type -1 2048 4095 2048 1M EFI System -3 6144 8191 2048 1M Linux filesystem -4 8192 10239 2048 1M Linux filesystem -5 10240 12287 2048 1M Linux swap -6 12288 14335 2048 1M Linux filesystem -7 14336 16383 2048 1M Linux filesystem -8 16384 18431 2048 1M Linux filesystem -------------------- - -Create again partition - ----layout---------- -Disk : 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 / bytes -Disklabel type: gpt -Disk identifier: - -Device Start End Sectors Size Type -1 2048 4095 2048 1M EFI System -2 4096 6143 2048 1M Linux filesystem -3 6144 8191 2048 1M Linux filesystem -4 8192 10239 2048 1M Linux filesystem -5 10240 12287 2048 1M Linux swap -6 12288 14335 2048 1M Linux filesystem -7 14336 16383 2048 1M Linux filesystem -8 16384 18431 2048 1M Linux filesystem -------------------- - -Corrupt primary table - ----layout---------- -Disk : 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 / bytes -Disklabel type: gpt -Disk identifier: - -Device Start End Sectors Size Type -1 2048 4095 2048 1M EFI System -2 4096 6143 2048 1M Linux filesystem -3 6144 8191 2048 1M Linux filesystem -4 8192 10239 2048 1M Linux filesystem -5 10240 12287 2048 1M Linux swap -6 12288 14335 2048 1M Linux filesystem -7 14336 16383 2048 1M Linux filesystem -8 16384 18431 2048 1M Linux filesystem -------------------- - -Corrupt backup table - ----layout---------- -Disk : 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 / bytes -Disklabel type: gpt -Disk identifier: - -Device Start End Sectors Size Type -1 2048 4095 2048 1M EFI System -2 4096 6143 2048 1M Linux filesystem -3 6144 8191 2048 1M Linux filesystem -4 8192 10239 2048 1M Linux filesystem -5 10240 12287 2048 1M Linux swap -6 12288 14335 2048 1M Linux filesystem -7 14336 16383 2048 1M Linux filesystem -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 index 0000000000..33a6630562 --- /dev/null +++ b/tests/expected/fdisk/gpt-change-type-by-number @@ -0,0 +1,20 @@ + +---layout---------- +Disk : 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 / bytes +Disklabel type: gpt +Disk identifier: + +Device Start End Sectors Size Type +1 2048 4095 2048 1M EFI System +2 4096 6143 2048 1M Linux filesystem +3 6144 8191 2048 1M Linux filesystem +4 8192 10239 2048 1M Linux filesystem +5 10240 12287 2048 1M Linux filesystem +6 12288 14335 2048 1M Linux filesystem +7 14336 16383 2048 1M Linux filesystem +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 index 0000000000..34b791926e --- /dev/null +++ b/tests/expected/fdisk/gpt-change-type-by-uuid @@ -0,0 +1,20 @@ + +---layout---------- +Disk : 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 / bytes +Disklabel type: gpt +Disk identifier: + +Device Start End Sectors Size Type +1 2048 4095 2048 1M EFI System +2 4096 6143 2048 1M Linux filesystem +3 6144 8191 2048 1M Linux filesystem +4 8192 10239 2048 1M Linux filesystem +5 10240 12287 2048 1M Linux swap +6 12288 14335 2048 1M Linux filesystem +7 14336 16383 2048 1M Linux filesystem +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 index 0000000000..34b791926e --- /dev/null +++ b/tests/expected/fdisk/gpt-corrupt-backup-table @@ -0,0 +1,20 @@ + +---layout---------- +Disk : 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 / bytes +Disklabel type: gpt +Disk identifier: + +Device Start End Sectors Size Type +1 2048 4095 2048 1M EFI System +2 4096 6143 2048 1M Linux filesystem +3 6144 8191 2048 1M Linux filesystem +4 8192 10239 2048 1M Linux filesystem +5 10240 12287 2048 1M Linux swap +6 12288 14335 2048 1M Linux filesystem +7 14336 16383 2048 1M Linux filesystem +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 index 0000000000..34b791926e --- /dev/null +++ b/tests/expected/fdisk/gpt-corrupt-primary-table @@ -0,0 +1,20 @@ + +---layout---------- +Disk : 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 / bytes +Disklabel type: gpt +Disk identifier: + +Device Start End Sectors Size Type +1 2048 4095 2048 1M EFI System +2 4096 6143 2048 1M Linux filesystem +3 6144 8191 2048 1M Linux filesystem +4 8192 10239 2048 1M Linux filesystem +5 10240 12287 2048 1M Linux swap +6 12288 14335 2048 1M Linux filesystem +7 14336 16383 2048 1M Linux filesystem +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 index 0000000000..34b791926e --- /dev/null +++ b/tests/expected/fdisk/gpt-create-again-partition @@ -0,0 +1,20 @@ + +---layout---------- +Disk : 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 / bytes +Disklabel type: gpt +Disk identifier: + +Device Start End Sectors Size Type +1 2048 4095 2048 1M EFI System +2 4096 6143 2048 1M Linux filesystem +3 6144 8191 2048 1M Linux filesystem +4 8192 10239 2048 1M Linux filesystem +5 10240 12287 2048 1M Linux swap +6 12288 14335 2048 1M Linux filesystem +7 14336 16383 2048 1M Linux filesystem +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 index 0000000000..e69de29bb2 diff --git a/tests/expected/fdisk/gpt-delete-partition b/tests/expected/fdisk/gpt-delete-partition new file mode 100644 index 0000000000..ed6cfa05ef --- /dev/null +++ b/tests/expected/fdisk/gpt-delete-partition @@ -0,0 +1,19 @@ + +---layout---------- +Disk : 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 / bytes +Disklabel type: gpt +Disk identifier: + +Device Start End Sectors Size Type +1 2048 4095 2048 1M EFI System +3 6144 8191 2048 1M Linux filesystem +4 8192 10239 2048 1M Linux filesystem +5 10240 12287 2048 1M Linux swap +6 12288 14335 2048 1M Linux filesystem +7 14336 16383 2048 1M Linux filesystem +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 index 0000000000..788aa6598a --- /dev/null +++ b/tests/expected/fdisk/gpt-empty-pt @@ -0,0 +1,12 @@ +Initialize empty image +Create new GPT partition table + +---layout---------- +Disk : 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 / bytes +Disklabel type: gpt +Disk identifier: +------------------- + diff --git a/tests/expected/fdisk/id b/tests/expected/fdisk/id index 4801f81664..960bb6beca 100644 --- a/tests/expected/fdisk/id +++ b/tests/expected/fdisk/id @@ -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 index 0000000000..a9527e49e1 --- /dev/null +++ b/tests/expected/fdisk/id-create-mbr-with-id-0x1 @@ -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 index 0000000000..e69de29bb2 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 index 0000000000..a0a988470a --- /dev/null +++ b/tests/expected/fdisk/id-create-mbr-with-id-0x2 @@ -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 index 0000000000..e69de29bb2 diff --git a/tests/expected/fdisk/id.sparc b/tests/expected/fdisk/id.sparc index aa3f407f6f..960bb6beca 100644 --- a/tests/expected/fdisk/id.sparc +++ b/tests/expected/fdisk/id.sparc @@ -1,3 +1 @@ Initialize empty image -Create MBR with ID=0x1 -Create MBR with ID=0x2 diff --git a/tests/expected/fdisk/mbr-dos-mode b/tests/expected/fdisk/mbr-dos-mode index 2b2048467a..e69de29bb2 100644 --- a/tests/expected/fdisk/mbr-dos-mode +++ b/tests/expected/fdisk/mbr-dos-mode @@ -1,189 +0,0 @@ -Initialize empty image -f1c9645dbc14efddc7d8a322685f26eb mbr-dos-mode.img -Create new DOS partition table -57e721e38d1266c2df055067c18f2cf9 mbr-dos-mode.img - ----layout---------- -Disk : 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 / bytes -Disklabel type: dos -Disk identifier: -------------------- - -Create primary partition -ae4f9b12f4a768849f72ea36938c30c7 mbr-dos-mode.img - ----layout---------- -Disk : 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 / bytes -Disklabel type: dos -Disk identifier: - -Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs -1 1 1 1 83 Linux 0/1/1 0/254/63 -------------------- - -Set partition type -4a5dba818f9962a82a086d8b99b89a17 mbr-dos-mode.img - ----layout---------- -Disk : 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 / bytes -Disklabel type: dos -Disk identifier: - -Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs -1 1 1 1 bf Solaris 0/1/1 0/254/63 -------------------- - -Set primary partition active -c30e9c761b71cf95c67e758b93706ac5 mbr-dos-mode.img - ----layout---------- -Disk : 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 / bytes -Disklabel type: dos -Disk identifier: - -Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs -1 * 1 1 1 bf Solaris 0/1/1 0/254/63 80 -------------------- - -Re-create primary partition -ae4f9b12f4a768849f72ea36938c30c7 mbr-dos-mode.img - ----layout---------- -Disk : 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 / bytes -Disklabel type: dos -Disk identifier: - -Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs -1 1 1 1 83 Linux 0/1/1 0/254/63 -------------------- - -Create extended partition -76987a00b353687cd1dba3ddea9d66f9 mbr-dos-mode.img - ----layout---------- -Disk : 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 / bytes -Disklabel type: dos -Disk identifier: - -Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs -1 1 1 1 83 Linux 0/1/1 0/254/63 -2 2 12 12 5 Extended 1/0/1 11/254/63 -------------------- - -Create logical partitions -a1cd6708e4a6d2e5f6bc9d5c0da0cf3b mbr-dos-mode.img - ----layout---------- -Disk : 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 / bytes -Disklabel type: dos -Disk identifier: - -Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs -1 1 1 1 83 Linux 0/1/1 0/254/63 -2 2 12 12 5 Extended 1/0/1 11/254/63 -5 2 3 2 83 Linux 1/1/1 2/254/63 -6 4 5 2 83 Linux 3/1/1 4/254/63 -7 6 7 2 83 Linux 5/1/1 6/254/63 -8 8 9 2 83 Linux 7/1/1 8/254/63 -------------------- - -Delete logical partitions -4c6937d529ace5661fb82efb9394154a mbr-dos-mode.img - ----layout---------- -Disk : 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 / bytes -Disklabel type: dos -Disk identifier: - -Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs -1 1 1 1 83 Linux 0/1/1 0/254/63 -2 2 12 12 5 Extended 1/0/1 11/254/63 -5 6 7 2 83 Linux 5/1/1 6/254/63 -------------------- - -Create another logical partition -9589eaaed698d2402945ab3e513c1eb4 mbr-dos-mode.img - ----layout---------- -Disk : 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 / bytes -Disklabel type: dos -Disk identifier: - -Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs -1 1 1 1 83 Linux 0/1/1 0/254/63 -2 2 12 12 5 Extended 1/0/1 11/254/63 -5 6 7 2 83 Linux 5/1/1 6/254/63 -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 : 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 / bytes -Disklabel type: dos -Disk identifier: - -Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs -2 2 12 12 5 Extended 1/0/1 11/254/63 -5 6 7 2 83 Linux 5/1/1 6/254/63 -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 : 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 / bytes -Disklabel type: dos -Disk identifier: -------------------- - 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 index 0000000000..61f04c044c --- /dev/null +++ b/tests/expected/fdisk/mbr-dos-mode-create-another-log-par @@ -0,0 +1,20 @@ +9589eaaed698d2402945ab3e513c1eb4 mbr-dos-mode.img + +---layout---------- +Disk : 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 / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs +1 1 1 1 83 Linux 0/1/1 0/254/63 +2 2 12 12 5 Extended 1/0/1 11/254/63 +5 6 7 2 83 Linux 5/1/1 6/254/63 +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 index 0000000000..3c2229b084 --- /dev/null +++ b/tests/expected/fdisk/mbr-dos-mode-create-extended-par @@ -0,0 +1,16 @@ +76987a00b353687cd1dba3ddea9d66f9 mbr-dos-mode.img + +---layout---------- +Disk : 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 / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs +1 1 1 1 83 Linux 0/1/1 0/254/63 +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 index 0000000000..e37c296b37 --- /dev/null +++ b/tests/expected/fdisk/mbr-dos-mode-create-logical-par @@ -0,0 +1,20 @@ +a1cd6708e4a6d2e5f6bc9d5c0da0cf3b mbr-dos-mode.img + +---layout---------- +Disk : 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 / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs +1 1 1 1 83 Linux 0/1/1 0/254/63 +2 2 12 12 5 Extended 1/0/1 11/254/63 +5 2 3 2 83 Linux 1/1/1 2/254/63 +6 4 5 2 83 Linux 3/1/1 4/254/63 +7 6 7 2 83 Linux 5/1/1 6/254/63 +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 index 0000000000..ac8fb0faba --- /dev/null +++ b/tests/expected/fdisk/mbr-dos-mode-create-primary-partition @@ -0,0 +1,15 @@ +ae4f9b12f4a768849f72ea36938c30c7 mbr-dos-mode.img + +---layout---------- +Disk : 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 / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs +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 index 0000000000..0fbff6e70d --- /dev/null +++ b/tests/expected/fdisk/mbr-dos-mode-delete-extended-par @@ -0,0 +1,12 @@ +fc3cdb12326656d7996b09b6f76973e7 mbr-dos-mode.img + +---layout---------- +Disk : 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 / bytes +Disklabel type: dos +Disk identifier: +------------------- + 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 index 0000000000..cdae97e736 --- /dev/null +++ b/tests/expected/fdisk/mbr-dos-mode-delete-logical-par @@ -0,0 +1,17 @@ +4c6937d529ace5661fb82efb9394154a mbr-dos-mode.img + +---layout---------- +Disk : 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 / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs +1 1 1 1 83 Linux 0/1/1 0/254/63 +2 2 12 12 5 Extended 1/0/1 11/254/63 +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 index 0000000000..1b9f0a308e --- /dev/null +++ b/tests/expected/fdisk/mbr-dos-mode-delete-primary-par @@ -0,0 +1,19 @@ +1e6d646e5df66a2664cfbbb13fa9a08a mbr-dos-mode.img + +---layout---------- +Disk : 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 / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs +2 2 12 12 5 Extended 1/0/1 11/254/63 +5 6 7 2 83 Linux 5/1/1 6/254/63 +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 index 0000000000..ecb5e4cdde --- /dev/null +++ b/tests/expected/fdisk/mbr-dos-mode-empty-pt @@ -0,0 +1,13 @@ +f1c9645dbc14efddc7d8a322685f26eb mbr-dos-mode.img +57e721e38d1266c2df055067c18f2cf9 mbr-dos-mode.img + +---layout---------- +Disk : 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 / bytes +Disklabel type: dos +Disk identifier: +------------------- + 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 index 0000000000..ac8fb0faba --- /dev/null +++ b/tests/expected/fdisk/mbr-dos-mode-re-create-primary-par @@ -0,0 +1,15 @@ +ae4f9b12f4a768849f72ea36938c30c7 mbr-dos-mode.img + +---layout---------- +Disk : 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 / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs +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 index 0000000000..2a1aacb6ee --- /dev/null +++ b/tests/expected/fdisk/mbr-dos-mode-set-partition-type @@ -0,0 +1,15 @@ +4a5dba818f9962a82a086d8b99b89a17 mbr-dos-mode.img + +---layout---------- +Disk : 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 / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs +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 index 0000000000..5c77ea38c8 --- /dev/null +++ b/tests/expected/fdisk/mbr-dos-mode-set-primary-par-active @@ -0,0 +1,15 @@ +c30e9c761b71cf95c67e758b93706ac5 mbr-dos-mode.img + +---layout---------- +Disk : 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 / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs +1 * 1 1 1 bf Solaris 0/1/1 0/254/63 80 +------------------- + diff --git a/tests/expected/fdisk/mbr-sort b/tests/expected/fdisk/mbr-sort index bb57432c03..e69de29bb2 100644 --- a/tests/expected/fdisk/mbr-sort +++ b/tests/expected/fdisk/mbr-sort @@ -1,75 +0,0 @@ -Initialize empty image -Create new DOS partition table - ----layout---------- -Disk : 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 / bytes -Disklabel type: dos -Disk identifier: -------------------- - -Create primary partitions - ----layout---------- -Disk : 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 / bytes -Disklabel type: dos -Disk identifier: - -Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs -1 4096 6143 2048 83 Linux 0/65/2 0/97/33 -2 2048 4095 2048 83 Linux 0/32/33 0/65/1 -3 6144 8191 2048 83 Linux 0/97/34 0/130/2 -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 : 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 / bytes -Disklabel type: dos -Disk identifier: - -Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs -1 4096 6143 2048 83 Linux 0/65/2 0/97/33 -2 2048 4095 2048 83 Linux 0/32/33 0/65/1 -3 6144 8191 2048 83 Linux 0/97/34 0/130/2 -4 8192 40959 32768 5 Extended 0/130/3 2/140/10 -5 14336 16383 2048 83 Linux 0/227/36 1/5/4 -6 22528 24575 2048 83 Linux 1/102/38 1/135/6 -7 18432 20479 2048 83 Linux 1/37/37 1/70/5 -8 10240 12287 2048 83 Linux 0/162/35 0/195/3 - -Partition table entries are not in disk order. -------------------- - -Fix order. - ----layout---------- -Disk : 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 / bytes -Disklabel type: dos -Disk identifier: - -Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs -1 2048 4095 2048 83 Linux 0/32/33 0/65/1 -2 4096 6143 2048 83 Linux 0/65/2 0/97/33 -3 6144 8191 2048 83 Linux 0/97/34 0/130/2 -4 8192 40959 32768 5 Extended 0/130/3 2/140/10 -5 10240 12287 2048 83 Linux 0/162/35 0/195/3 -6 14336 16383 2048 83 Linux 0/227/36 1/5/4 -7 18432 20479 2048 83 Linux 1/37/37 1/70/5 -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 index 0000000000..9bf6cf5abd --- /dev/null +++ b/tests/expected/fdisk/mbr-sort-create-logical-partitions @@ -0,0 +1,22 @@ + +---layout---------- +Disk : 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 / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs +1 4096 6143 2048 83 Linux 0/65/2 0/97/33 +2 2048 4095 2048 83 Linux 0/32/33 0/65/1 +3 6144 8191 2048 83 Linux 0/97/34 0/130/2 +4 8192 40959 32768 5 Extended 0/130/3 2/140/10 +5 14336 16383 2048 83 Linux 0/227/36 1/5/4 +6 22528 24575 2048 83 Linux 1/102/38 1/135/6 +7 18432 20479 2048 83 Linux 1/37/37 1/70/5 +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 index 0000000000..0fc50981e4 --- /dev/null +++ b/tests/expected/fdisk/mbr-sort-create-primary-partitions @@ -0,0 +1,18 @@ + +---layout---------- +Disk : 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 / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs +1 4096 6143 2048 83 Linux 0/65/2 0/97/33 +2 2048 4095 2048 83 Linux 0/32/33 0/65/1 +3 6144 8191 2048 83 Linux 0/97/34 0/130/2 +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 index 0000000000..338ac6555a --- /dev/null +++ b/tests/expected/fdisk/mbr-sort-empty-pt @@ -0,0 +1,10 @@ + +---layout---------- +Disk : 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 / bytes +Disklabel type: dos +Disk identifier: +------------------- + diff --git a/tests/expected/fdisk/mbr-sort-fix-order b/tests/expected/fdisk/mbr-sort-fix-order new file mode 100644 index 0000000000..88020095c2 --- /dev/null +++ b/tests/expected/fdisk/mbr-sort-fix-order @@ -0,0 +1,20 @@ + +---layout---------- +Disk : 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 / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs +1 2048 4095 2048 83 Linux 0/32/33 0/65/1 +2 4096 6143 2048 83 Linux 0/65/2 0/97/33 +3 6144 8191 2048 83 Linux 0/97/34 0/130/2 +4 8192 40959 32768 5 Extended 0/130/3 2/140/10 +5 10240 12287 2048 83 Linux 0/162/35 0/195/3 +6 14336 16383 2048 83 Linux 0/227/36 1/5/4 +7 18432 20479 2048 83 Linux 1/37/37 1/70/5 +8 22528 24575 2048 83 Linux 1/102/38 1/135/6 +------------------- + diff --git a/tests/expected/fdisk/sunlabel b/tests/expected/fdisk/sunlabel index bb1f5a8606..e69de29bb2 100644 --- a/tests/expected/fdisk/sunlabel +++ b/tests/expected/fdisk/sunlabel @@ -1,116 +0,0 @@ -Initialize empty image -f1c9645dbc14efddc7d8a322685f26eb sunlabel.img -Create new SUN partition table -f050fd2beb99f8d968bf17450f655f06 sunlabel.img -Disk : 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 / 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 : 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 / 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 -1 1 128 129 4128768 83 Linux native -Set partition sysid -df75defdb97fbd56222aed18631a22d0 sunlabel.img -Disk : 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 / 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 -1 1 128 129 4128768 4 SunOS usr -Set first partition readonly -da23f66698d9a553162887621d4c7490 sunlabel.img -Disk : 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 / 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 -1 1 128 129 4128768 4 SunOS usr r -Set first partition mountable -3ab76e8491b103eab52b2ae1856c1e30 sunlabel.img -Disk : 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 / 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 -1 1 128 129 4128768 4 SunOS usr ur -Create second partition - -Welcome to fdisk . -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 . - -Command (m for help): The partition table has been altered. -Syncing disks. - -a87e80830aa13d2d68b766962f052750 sunlabel.img -Disk : 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 / 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 -1 1 128 129 4128768 4 SunOS usr ur -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 index 0000000000..61fecaca0c --- /dev/null +++ b/tests/expected/fdisk/sunlabel-create-first-partition @@ -0,0 +1,16 @@ +e730c7ec8208601f41963f0485147248 sunlabel.img +Disk : 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 / 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 +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 index 0000000000..f6442d32e5 --- /dev/null +++ b/tests/expected/fdisk/sunlabel-create-second-partition @@ -0,0 +1,29 @@ + +Welcome to fdisk . +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 . + +Command (m for help): The partition table has been altered. +Syncing disks. + +a87e80830aa13d2d68b766962f052750 sunlabel.img +Disk : 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 / 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 +1 1 128 129 4128768 4 SunOS usr ur +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 index 0000000000..0dee636e9b --- /dev/null +++ b/tests/expected/fdisk/sunlabel-delete-all-partitions @@ -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 index 0000000000..0d38bd74ff --- /dev/null +++ b/tests/expected/fdisk/sunlabel-empty-sun-pt @@ -0,0 +1,14 @@ +f1c9645dbc14efddc7d8a322685f26eb sunlabel.img +f050fd2beb99f8d968bf17450f655f06 sunlabel.img +Disk : 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 / 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 index 0000000000..610dfa1de2 --- /dev/null +++ b/tests/expected/fdisk/sunlabel-set-first-par-mountable @@ -0,0 +1,16 @@ +3ab76e8491b103eab52b2ae1856c1e30 sunlabel.img +Disk : 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 / 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 +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 index 0000000000..042ba76c8d --- /dev/null +++ b/tests/expected/fdisk/sunlabel-set-first-par-readonly @@ -0,0 +1,16 @@ +da23f66698d9a553162887621d4c7490 sunlabel.img +Disk : 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 / 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 +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 index 0000000000..b664433a67 --- /dev/null +++ b/tests/expected/fdisk/sunlabel-set-partition-sysid @@ -0,0 +1,16 @@ +df75defdb97fbd56222aed18631a22d0 sunlabel.img +Disk : 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 / 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 +1 1 128 129 4128768 4 SunOS usr diff --git a/tests/ts/col/newlines b/tests/ts/col/newlines index 96e82edb16..209de0b775 100755 --- a/tests/ts/col/newlines +++ b/tests/ts/col/newlines @@ -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 diff --git a/tests/ts/col/options b/tests/ts/col/options index b7825c66ab..50312203ab 100755 --- a/tests/ts/col/options +++ b/tests/ts/col/options @@ -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 diff --git a/tests/ts/fdisk/gpt b/tests/ts/fdisk/gpt index 83fe34248e..18e4fab608 100755 --- a/tests/ts/fdisk/gpt +++ b/tests/ts/fdisk/gpt @@ -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 diff --git a/tests/ts/fdisk/id b/tests/ts/fdisk/id index 85b87d6829..c52e44b245 100755 --- a/tests/ts/fdisk/id +++ b/tests/ts/fdisk/id @@ -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 diff --git a/tests/ts/fdisk/mbr-dos-mode b/tests/ts/fdisk/mbr-dos-mode index f869e26596..cc274299c4 100755 --- a/tests/ts/fdisk/mbr-dos-mode +++ b/tests/ts/fdisk/mbr-dos-mode @@ -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 diff --git a/tests/ts/fdisk/mbr-sort b/tests/ts/fdisk/mbr-sort index c82dc019bd..6a6d3b86f7 100755 --- a/tests/ts/fdisk/mbr-sort +++ b/tests/ts/fdisk/mbr-sort @@ -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 diff --git a/tests/ts/fdisk/sunlabel b/tests/ts/fdisk/sunlabel index 8f75b692af..4c0d37503d 100755 --- a/tests/ts/fdisk/sunlabel +++ b/tests/ts/fdisk/sunlabel @@ -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