From: Pali Rohár Date: Tue, 6 Jul 2021 22:56:21 +0000 (+0200) Subject: tests: fdisk: Layout with more details X-Git-Tag: v2.38-rc1~366^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=88c197c690a9e123e6d7d0735cb30711c2b2f85d;p=thirdparty%2Futil-linux.git tests: fdisk: Layout with more details Use fdisk -x instead of fdisk -l for printing layout in fdisk tests. This can help debugging why some fdisk tests fail. Signed-off-by: Pali Rohár --- diff --git a/tests/expected/fdisk/bsd_1_0.LE b/tests/expected/fdisk/bsd_1_0.LE index 71de66a0e0..617974c9f5 100644 --- a/tests/expected/fdisk/bsd_1_0.LE +++ b/tests/expected/fdisk/bsd_1_0.LE @@ -47,8 +47,8 @@ I/O size (minimum/optimal): 512 bytes / bytes Disklabel type: dos Disk identifier: -Device Boot Start End Sectors Size Id Type -1 2048 4095 2048 1M 83 Linux +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 ------------------- Create 2nd primary partition @@ -82,9 +82,9 @@ I/O size (minimum/optimal): 512 bytes / bytes Disklabel type: dos Disk identifier: -Device Boot Start End Sectors Size Id Type -1 2048 4095 2048 1M 83 Linux -2 4096 20479 16384 8M a5 FreeBSD +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 20479 16384 a5 FreeBSD 62/4/1 310/19/1 ------------------- Create default BSD diff --git a/tests/expected/fdisk/mbr-dos-mode b/tests/expected/fdisk/mbr-dos-mode index 5bc1fbf9c0..2b2048467a 100644 --- a/tests/expected/fdisk/mbr-dos-mode +++ b/tests/expected/fdisk/mbr-dos-mode @@ -25,8 +25,8 @@ I/O size (minimum/optimal): 512 bytes / bytes Disklabel type: dos Disk identifier: -Device Boot Start End Cylinders Size Id Type -1 1 1 1 7.8M 83 Linux +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 @@ -41,8 +41,8 @@ I/O size (minimum/optimal): 512 bytes / bytes Disklabel type: dos Disk identifier: -Device Boot Start End Cylinders Size Id Type -1 1 1 1 7.8M bf Solaris +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 @@ -57,8 +57,8 @@ I/O size (minimum/optimal): 512 bytes / bytes Disklabel type: dos Disk identifier: -Device Boot Start End Cylinders Size Id Type -1 * 1 1 1 7.8M bf Solaris +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 @@ -73,8 +73,8 @@ I/O size (minimum/optimal): 512 bytes / bytes Disklabel type: dos Disk identifier: -Device Boot Start End Cylinders Size Id Type -1 1 1 1 7.8M 83 Linux +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 @@ -89,9 +89,9 @@ I/O size (minimum/optimal): 512 bytes / bytes Disklabel type: dos Disk identifier: -Device Boot Start End Cylinders Size Id Type -1 1 1 1 7.8M 83 Linux -2 2 12 12 86.3M 5 Extended +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 @@ -106,13 +106,13 @@ I/O size (minimum/optimal): 512 bytes / bytes Disklabel type: dos Disk identifier: -Device Boot Start End Cylinders Size Id Type -1 1 1 1 7.8M 83 Linux -2 2 12 12 86.3M 5 Extended -5 2 3 2 15.7M 83 Linux -6 4 5 2 15.7M 83 Linux -7 6 7 2 15.7M 83 Linux -8 8 9 2 15.7M 83 Linux +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 @@ -127,10 +127,10 @@ I/O size (minimum/optimal): 512 bytes / bytes Disklabel type: dos Disk identifier: -Device Boot Start End Cylinders Size Id Type -1 1 1 1 7.8M 83 Linux -2 2 12 12 86.3M 5 Extended -5 6 7 2 15.7M 83 Linux +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 @@ -145,11 +145,11 @@ I/O size (minimum/optimal): 512 bytes / bytes Disklabel type: dos Disk identifier: -Device Boot Start End Cylinders Size Id Type -1 1 1 1 7.8M 83 Linux -2 2 12 12 86.3M 5 Extended -5 6 7 2 15.7M 83 Linux -6 2 3 2 15.7M 83 Linux +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. ------------------- @@ -166,10 +166,10 @@ I/O size (minimum/optimal): 512 bytes / bytes Disklabel type: dos Disk identifier: -Device Boot Start End Cylinders Size Id Type -2 2 12 12 86.3M 5 Extended -5 6 7 2 15.7M 83 Linux -6 2 3 2 15.7M 83 Linux +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-nondos-mode-1nd-primary-delete b/tests/expected/fdisk/mbr-nondos-mode-1nd-primary-delete index cc5e1f0f57..a63924419f 100644 --- a/tests/expected/fdisk/mbr-nondos-mode-1nd-primary-delete +++ b/tests/expected/fdisk/mbr-nondos-mode-1nd-primary-delete @@ -9,10 +9,10 @@ I/O size (minimum/optimal): 512 bytes / bytes Disklabel type: dos Disk identifier: -Device Boot Start End Sectors Size Id Type -3 12288 40959 28672 14M 5 Extended -5 26624 30719 4096 2M 83 Linux -6 14336 18431 4096 2M 83 Linux +Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs +3 12288 40959 28672 5 Extended 0/195/4 2/140/10 +5 26624 30719 4096 83 Linux 1/167/39 1/232/39 +6 14336 18431 4096 83 Linux 0/227/36 1/37/36 Partition table entries are not in disk order. ------------------- diff --git a/tests/expected/fdisk/mbr-nondos-mode-1st-active b/tests/expected/fdisk/mbr-nondos-mode-1st-active index 76b761a807..564c0433cf 100644 --- a/tests/expected/fdisk/mbr-nondos-mode-1st-active +++ b/tests/expected/fdisk/mbr-nondos-mode-1st-active @@ -9,7 +9,7 @@ I/O size (minimum/optimal): 512 bytes / bytes Disklabel type: dos Disk identifier: -Device Boot Start End Sectors Size Id Type -1 * 2048 8191 6144 3M 83 Linux +Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs +1 * 2048 8191 6144 83 Linux 0/32/33 0/130/2 80 ------------------- diff --git a/tests/expected/fdisk/mbr-nondos-mode-1st-primary b/tests/expected/fdisk/mbr-nondos-mode-1st-primary index df4bf2ef01..8747bb9dc7 100644 --- a/tests/expected/fdisk/mbr-nondos-mode-1st-primary +++ b/tests/expected/fdisk/mbr-nondos-mode-1st-primary @@ -9,7 +9,7 @@ I/O size (minimum/optimal): 512 bytes / bytes Disklabel type: dos Disk identifier: -Device Boot Start End Sectors Size Id Type -1 2048 8191 6144 3M 83 Linux +Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs +1 2048 8191 6144 83 Linux 0/32/33 0/130/2 ------------------- diff --git a/tests/expected/fdisk/mbr-nondos-mode-1st-primary-delete b/tests/expected/fdisk/mbr-nondos-mode-1st-primary-delete index 7fce4e4afd..c5fbac2b28 100644 --- a/tests/expected/fdisk/mbr-nondos-mode-1st-primary-delete +++ b/tests/expected/fdisk/mbr-nondos-mode-1st-primary-delete @@ -9,11 +9,11 @@ I/O size (minimum/optimal): 512 bytes / bytes Disklabel type: dos Disk identifier: -Device Boot Start End Sectors Size Id Type -2 8192 12287 4096 2M 83 Linux -3 12288 40959 28672 14M 5 Extended -5 26624 30719 4096 2M 83 Linux -6 14336 18431 4096 2M 83 Linux +Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs +2 8192 12287 4096 83 Linux 117/1/1 175/18/2 +3 12288 40959 28672 5 Extended 0/195/4 2/140/10 +5 26624 30719 4096 83 Linux 1/167/39 1/232/39 +6 14336 18431 4096 83 Linux 0/227/36 1/37/36 Partition table entries are not in disk order. ------------------- diff --git a/tests/expected/fdisk/mbr-nondos-mode-1st-primary-recreate b/tests/expected/fdisk/mbr-nondos-mode-1st-primary-recreate index 80e00790bb..3951f58631 100644 --- a/tests/expected/fdisk/mbr-nondos-mode-1st-primary-recreate +++ b/tests/expected/fdisk/mbr-nondos-mode-1st-primary-recreate @@ -9,7 +9,7 @@ I/O size (minimum/optimal): 512 bytes / bytes Disklabel type: dos Disk identifier: -Device Boot Start End Sectors Size Id Type -1 2048 8191 6144 3M 83 Linux +Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs +1 2048 8191 6144 83 Linux 7/107/1 31/34/2 ------------------- diff --git a/tests/expected/fdisk/mbr-nondos-mode-2nd-primary b/tests/expected/fdisk/mbr-nondos-mode-2nd-primary index 0b24808ade..0a197c9cce 100644 --- a/tests/expected/fdisk/mbr-nondos-mode-2nd-primary +++ b/tests/expected/fdisk/mbr-nondos-mode-2nd-primary @@ -9,8 +9,8 @@ I/O size (minimum/optimal): 512 bytes / bytes Disklabel type: dos Disk identifier: -Device Boot Start End Sectors Size Id Type -1 2048 8191 6144 3M 83 Linux -2 8192 12287 4096 2M 83 Linux +Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs +1 2048 8191 6144 83 Linux 7/107/1 31/34/2 +2 8192 12287 4096 83 Linux 117/1/1 175/18/2 ------------------- diff --git a/tests/expected/fdisk/mbr-nondos-mode-extended b/tests/expected/fdisk/mbr-nondos-mode-extended index 3b8c736aa7..be8c887dc4 100644 --- a/tests/expected/fdisk/mbr-nondos-mode-extended +++ b/tests/expected/fdisk/mbr-nondos-mode-extended @@ -9,9 +9,9 @@ I/O size (minimum/optimal): 512 bytes / bytes Disklabel type: dos Disk identifier: -Device Boot Start End Sectors Size Id Type -1 2048 8191 6144 3M 83 Linux -2 8192 12287 4096 2M 83 Linux -3 12288 40959 28672 14M 5 Extended +Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs +1 2048 8191 6144 83 Linux 7/107/1 31/34/2 +2 8192 12287 4096 83 Linux 117/1/1 175/18/2 +3 12288 40959 28672 5 Extended 0/195/4 2/140/10 ------------------- diff --git a/tests/expected/fdisk/mbr-nondos-mode-first-sector-at-end b/tests/expected/fdisk/mbr-nondos-mode-first-sector-at-end index d5c5f45ed0..58c58b4953 100644 --- a/tests/expected/fdisk/mbr-nondos-mode-first-sector-at-end +++ b/tests/expected/fdisk/mbr-nondos-mode-first-sector-at-end @@ -9,8 +9,8 @@ I/O size (minimum/optimal): 512 bytes / bytes Disklabel type: dos Disk identifier: -Device Boot Start End Sectors Size Id Type -1 20000 40959 20960 10.2M 83 Linux +Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs +1 20000 40959 20960 83 Linux 1/62/30 2/140/10 ------------------- Create 2nd primary at the begin of device @@ -38,9 +38,9 @@ I/O size (minimum/optimal): 512 bytes / bytes Disklabel type: dos Disk identifier: -Device Boot Start End Sectors Size Id Type -1 20000 40959 20960 10.2M 83 Linux -2 2048 19999 17952 8.8M 83 Linux +Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs +1 20000 40959 20960 83 Linux 1/62/30 2/140/10 +2 2048 19999 17952 83 Linux 1/63/9 14/25/10 Partition table entries are not in disk order. ------------------- diff --git a/tests/expected/fdisk/mbr-nondos-mode-logical b/tests/expected/fdisk/mbr-nondos-mode-logical index ee98105eb0..4e88454f51 100644 --- a/tests/expected/fdisk/mbr-nondos-mode-logical +++ b/tests/expected/fdisk/mbr-nondos-mode-logical @@ -9,13 +9,13 @@ I/O size (minimum/optimal): 512 bytes / bytes Disklabel type: dos Disk identifier: -Device Boot Start End Sectors Size Id Type -1 2048 8191 6144 3M 83 Linux -2 8192 12287 4096 2M 83 Linux -3 12288 40959 28672 14M 5 Extended -5 14336 18431 4096 2M 83 Linux -6 20480 24575 4096 2M 83 Linux -7 26624 30719 4096 2M 83 Linux -8 32768 36863 4096 2M 83 Linux +Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs +1 2048 8191 6144 83 Linux 7/107/1 31/34/2 +2 8192 12287 4096 83 Linux 117/1/1 175/18/2 +3 12288 40959 28672 5 Extended 0/195/4 2/140/10 +5 14336 18431 4096 83 Linux 0/227/36 1/37/36 +6 20480 24575 4096 83 Linux 1/70/6 1/135/6 +7 26624 30719 4096 83 Linux 1/167/39 1/232/39 +8 32768 36863 4096 83 Linux 2/10/9 2/75/9 ------------------- diff --git a/tests/expected/fdisk/mbr-nondos-mode-logical-delete b/tests/expected/fdisk/mbr-nondos-mode-logical-delete index ca9cd49d14..261b70689e 100644 --- a/tests/expected/fdisk/mbr-nondos-mode-logical-delete +++ b/tests/expected/fdisk/mbr-nondos-mode-logical-delete @@ -9,10 +9,10 @@ I/O size (minimum/optimal): 512 bytes / bytes Disklabel type: dos Disk identifier: -Device Boot Start End Sectors Size Id Type -1 2048 8191 6144 3M 83 Linux -2 8192 12287 4096 2M 83 Linux -3 12288 40959 28672 14M 5 Extended -5 26624 30719 4096 2M 83 Linux +Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs +1 2048 8191 6144 83 Linux 7/107/1 31/34/2 +2 8192 12287 4096 83 Linux 117/1/1 175/18/2 +3 12288 40959 28672 5 Extended 0/195/4 2/140/10 +5 26624 30719 4096 83 Linux 1/167/39 1/232/39 ------------------- diff --git a/tests/expected/fdisk/mbr-nondos-mode-logical-recreate b/tests/expected/fdisk/mbr-nondos-mode-logical-recreate index 3b16015d84..7e5f943005 100644 --- a/tests/expected/fdisk/mbr-nondos-mode-logical-recreate +++ b/tests/expected/fdisk/mbr-nondos-mode-logical-recreate @@ -9,12 +9,12 @@ I/O size (minimum/optimal): 512 bytes / bytes Disklabel type: dos Disk identifier: -Device Boot Start End Sectors Size Id Type -1 2048 8191 6144 3M 83 Linux -2 8192 12287 4096 2M 83 Linux -3 12288 40959 28672 14M 5 Extended -5 26624 30719 4096 2M 83 Linux -6 14336 18431 4096 2M 83 Linux +Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs +1 2048 8191 6144 83 Linux 7/107/1 31/34/2 +2 8192 12287 4096 83 Linux 117/1/1 175/18/2 +3 12288 40959 28672 5 Extended 0/195/4 2/140/10 +5 26624 30719 4096 83 Linux 1/167/39 1/232/39 +6 14336 18431 4096 83 Linux 0/227/36 1/37/36 Partition table entries are not in disk order. ------------------- diff --git a/tests/expected/fdisk/mbr-sort b/tests/expected/fdisk/mbr-sort index e97e3b4f05..bb57432c03 100644 --- a/tests/expected/fdisk/mbr-sort +++ b/tests/expected/fdisk/mbr-sort @@ -20,11 +20,11 @@ I/O size (minimum/optimal): 512 bytes / bytes Disklabel type: dos Disk identifier: -Device Boot Start End Sectors Size Id Type -1 4096 6143 2048 1M 83 Linux -2 2048 4095 2048 1M 83 Linux -3 6144 8191 2048 1M 83 Linux -4 8192 40959 32768 16M 5 Extended +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. ------------------- @@ -39,15 +39,15 @@ I/O size (minimum/optimal): 512 bytes / bytes Disklabel type: dos Disk identifier: -Device Boot Start End Sectors Size Id Type -1 4096 6143 2048 1M 83 Linux -2 2048 4095 2048 1M 83 Linux -3 6144 8191 2048 1M 83 Linux -4 8192 40959 32768 16M 5 Extended -5 14336 16383 2048 1M 83 Linux -6 22528 24575 2048 1M 83 Linux -7 18432 20479 2048 1M 83 Linux -8 10240 12287 2048 1M 83 Linux +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. ------------------- @@ -62,14 +62,14 @@ I/O size (minimum/optimal): 512 bytes / bytes Disklabel type: dos Disk identifier: -Device Boot Start End Sectors Size Id Type -1 2048 4095 2048 1M 83 Linux -2 4096 6143 2048 1M 83 Linux -3 6144 8191 2048 1M 83 Linux -4 8192 40959 32768 16M 5 Extended -5 10240 12287 2048 1M 83 Linux -6 14336 16383 2048 1M 83 Linux -7 18432 20479 2048 1M 83 Linux -8 22528 24575 2048 1M 83 Linux +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 5a24dd2d6b..bb1f5a8606 100644 --- a/tests/expected/fdisk/sunlabel +++ b/tests/expected/fdisk/sunlabel @@ -8,6 +8,12 @@ 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 @@ -16,9 +22,15 @@ 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 3.9M 83 Linux native +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 @@ -27,9 +39,15 @@ 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 3.9M 4 SunOS usr +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 @@ -38,9 +56,15 @@ 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 3.9M 4 SunOS usr r +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 @@ -49,9 +73,15 @@ 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 3.9M 4 SunOS usr ur +Device Start End Cylinders Size Id Type Flags +1 1 128 129 4128768 4 SunOS usr ur Create second partition Welcome to fdisk . @@ -72,9 +102,15 @@ 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 3.9M 4 SunOS usr ur -2 129 325 198 6.1M 83 Linux native +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/ts/fdisk/bsd b/tests/ts/fdisk/bsd index 675468d425..9ce272386b 100755 --- a/tests/ts/fdisk/bsd +++ b/tests/ts/fdisk/bsd @@ -76,7 +76,7 @@ TS_EXPECTED+="_${BSD_LABELSECTOR}_${BSD_LABELOFFSET}${BSD_EXTRA}.${BYTE_ORDER}" function print_layout { echo -ne "\n---layout----------\n" >> $TS_OUTPUT - $TS_CMD_FDISK -l ${TEST_IMAGE_NAME} >> $TS_OUTPUT + $TS_CMD_FDISK -x ${TEST_IMAGE_NAME} >> $TS_OUTPUT echo -ne "-------------------\n\n" >> $TS_OUTPUT } diff --git a/tests/ts/fdisk/mbr-dos-mode b/tests/ts/fdisk/mbr-dos-mode index 4e62cb211d..f869e26596 100755 --- a/tests/ts/fdisk/mbr-dos-mode +++ b/tests/ts/fdisk/mbr-dos-mode @@ -41,7 +41,7 @@ FDISK_OPTIONS="-C 1024 -c=dos -u=cylinders" function print_layout { echo -ne "\n---layout----------\n" >> $TS_OUTPUT - $TS_CMD_FDISK ${FDISK_OPTIONS} -l ${TEST_IMAGE_NAME} >> $TS_OUTPUT + $TS_CMD_FDISK ${FDISK_OPTIONS} -x ${TEST_IMAGE_NAME} >> $TS_OUTPUT echo -ne "-------------------\n\n" >> $TS_OUTPUT } diff --git a/tests/ts/fdisk/mbr-nondos-mode b/tests/ts/fdisk/mbr-nondos-mode index a163d77645..d366f28ac9 100755 --- a/tests/ts/fdisk/mbr-nondos-mode +++ b/tests/ts/fdisk/mbr-nondos-mode @@ -49,7 +49,7 @@ esac function print_layout { echo -ne "\n---layout----------\n" >> $TS_OUTPUT - $TS_CMD_FDISK -l ${TEST_IMAGE_NAME} >> $TS_OUTPUT + $TS_CMD_FDISK -x ${TEST_IMAGE_NAME} >> $TS_OUTPUT echo -ne "-------------------\n\n" >> $TS_OUTPUT ts_fdisk_clean ${TEST_IMAGE_NAME} diff --git a/tests/ts/fdisk/mbr-sort b/tests/ts/fdisk/mbr-sort index 8ae51bf67e..c82dc019bd 100755 --- a/tests/ts/fdisk/mbr-sort +++ b/tests/ts/fdisk/mbr-sort @@ -40,7 +40,7 @@ FDISK_CMD_EXPERT_SORT="x\nf\nr\n" function print_layout { echo -ne "\n---layout----------\n" >> $TS_OUTPUT - $TS_CMD_FDISK -l ${TEST_IMAGE_NAME} >> $TS_OUTPUT + $TS_CMD_FDISK -x ${TEST_IMAGE_NAME} >> $TS_OUTPUT echo -ne "-------------------\n\n" >> $TS_OUTPUT } diff --git a/tests/ts/fdisk/oddinput b/tests/ts/fdisk/oddinput index cd125f71ea..8c23abbf00 100755 --- a/tests/ts/fdisk/oddinput +++ b/tests/ts/fdisk/oddinput @@ -35,19 +35,19 @@ ts_image_md5sum >> $TS_OUTPUT 2>> $TS_ERRLOG ts_log "---Empty image listing" # this should report empty partition table # TEST_IMAGE_NAME has absolute path, and is by definition different on each computer, we need to sed it away -$TS_CMD_FDISK -c=dos -u=cylinders -l ${TEST_IMAGE_NAME} >> $TS_OUTPUT 2>> $TS_ERRLOG +$TS_CMD_FDISK -c=dos -u=cylinders -x ${TEST_IMAGE_NAME} >> $TS_OUTPUT 2>> $TS_ERRLOG sed -i -e "s/${TEST_IMAGE_NAME//\//\\/}/testimage/" $TS_OUTPUT $TS_ERRLOG # # Errors # ts_logerr "---Nonexistent file" -$TS_CMD_FDISK -c=dos -u=cylinders -l _a_file_that_does_not_exist_ >> $TS_OUTPUT 2>> $TS_ERRLOG +$TS_CMD_FDISK -c=dos -u=cylinders -x _a_file_that_does_not_exist_ >> $TS_OUTPUT 2>> $TS_ERRLOG sed -i -e "s@$($TS_HELPER_STRERROR ENOENT)@ENOENT@" $TS_OUTPUT $TS_ERRLOG ts_logerr "---Too small file" echo "This file is too small" >> oddinput.toosmall -$TS_CMD_FDISK -c=dos -u=cylinders -l oddinput.toosmall >> $TS_OUTPUT 2>> $TS_ERRLOG +$TS_CMD_FDISK -c=dos -u=cylinders -x oddinput.toosmall >> $TS_OUTPUT 2>> $TS_ERRLOG sed -i -e "s@$($TS_HELPER_STRERROR EINVAL)@EINVAL@" $TS_OUTPUT $TS_ERRLOG rm oddinput.toosmall ts_finalize diff --git a/tests/ts/fdisk/sunlabel b/tests/ts/fdisk/sunlabel index 7f72743f40..8f75b692af 100755 --- a/tests/ts/fdisk/sunlabel +++ b/tests/ts/fdisk/sunlabel @@ -46,42 +46,42 @@ 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} -l ${TEST_IMAGE_NAME} >> $TS_OUTPUT +$TS_CMD_FDISK ${FDISK_OPTIONS} -x ${TEST_IMAGE_NAME} >> $TS_OUTPUT ts_log "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} -l ${TEST_IMAGE_NAME} >> $TS_OUTPUT +$TS_CMD_FDISK ${FDISK_OPTIONS} -x ${TEST_IMAGE_NAME} >> $TS_OUTPUT ts_log "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} -l ${TEST_IMAGE_NAME} >> $TS_OUTPUT +$TS_CMD_FDISK ${FDISK_OPTIONS} -x ${TEST_IMAGE_NAME} >> $TS_OUTPUT ts_log "Set first partition 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} -l ${TEST_IMAGE_NAME} >> $TS_OUTPUT +$TS_CMD_FDISK ${FDISK_OPTIONS} -x ${TEST_IMAGE_NAME} >> $TS_OUTPUT ts_log "Set first partition 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} -l ${TEST_IMAGE_NAME} >> $TS_OUTPUT +$TS_CMD_FDISK ${FDISK_OPTIONS} -x ${TEST_IMAGE_NAME} >> $TS_OUTPUT ts_log "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} -l ${TEST_IMAGE_NAME} >> $TS_OUTPUT +$TS_CMD_FDISK ${FDISK_OPTIONS} -x ${TEST_IMAGE_NAME} >> $TS_OUTPUT ts_log "Delete all partitions" echo -e "${FDISK_CMD_DELETEALL}${FDISK_CMD_WRITE_CLOSE}" | \