From: Pali Rohár Date: Fri, 16 Jul 2021 20:26:38 +0000 (+0200) Subject: tests: fdisk: Update CHS values in MBR partitions X-Git-Tag: v2.38-rc1~362^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5d0f0ca563ebde56f37aa0895a6f1752cf035b6f;p=thirdparty%2Futil-linux.git tests: fdisk: Update CHS values in MBR partitions It looks like that old CHS values prior this change in test data are incorrect. Possible explanation why CHS values are incorrect is in commit message 9cade4fbf8c4 ("libfdisk: (dos) Fix determining number of heads and sectors per track from MBR"). This change updates test data to pass test suite after applying mentioned commit. 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 617974c9f5..3f14e8e11f 100644 --- a/tests/expected/fdisk/bsd_1_0.LE +++ b/tests/expected/fdisk/bsd_1_0.LE @@ -55,8 +55,8 @@ Create 2nd primary partition 00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... | -000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 04 |!..A............| -000001d0 01 3e 83 13 41 36 00 10 00 00 00 40 00 00 00 00 |.>..A6.....@....| +000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 41 |!..A...........A| +000001d0 02 00 83 46 05 01 00 10 00 00 00 40 00 00 00 00 |...F.......@....| 000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| 00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -66,8 +66,8 @@ Set 2nd partition type 00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... | -000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 04 |!..A............| -000001d0 01 3e a5 13 41 36 00 10 00 00 00 40 00 00 00 00 |.>..A6.....@....| +000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 41 |!..A...........A| +000001d0 02 00 a5 46 05 01 00 10 00 00 00 40 00 00 00 00 |...F.......@....| 000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| 00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -84,15 +84,15 @@ 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 20479 16384 a5 FreeBSD 62/4/1 310/19/1 +2 4096 20479 16384 a5 FreeBSD 0/65/2 1/70/5 ------------------- Create default BSD 00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... | -000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 04 |!..A............| -000001d0 01 3e a5 13 41 36 00 10 00 00 00 40 00 00 00 00 |.>..A6.....@....| +000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 41 |!..A...........A| +000001d0 02 00 a5 46 05 01 00 10 00 00 00 40 00 00 00 00 |...F.......@....| 000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| 00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| @@ -144,8 +144,8 @@ Command (m for help): 00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... | -000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 04 |!..A............| -000001d0 01 3e a5 13 41 36 00 10 00 00 00 40 00 00 00 00 |.>..A6.....@....| +000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 41 |!..A...........A| +000001d0 02 00 a5 46 05 01 00 10 00 00 00 40 00 00 00 00 |...F.......@....| 000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| 00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| diff --git a/tests/expected/fdisk/mbr-nondos-mode-1st-primary-delete b/tests/expected/fdisk/mbr-nondos-mode-1st-primary-delete index c5fbac2b28..8aaaa1c833 100644 --- a/tests/expected/fdisk/mbr-nondos-mode-1st-primary-delete +++ b/tests/expected/fdisk/mbr-nondos-mode-1st-primary-delete @@ -1,5 +1,5 @@ Delete primary partition -6f1b62718cf8d83602d51de8944cee51 mbr-nondos-mode.img +0b3611fc71ef2d02842feb621077767e mbr-nondos-mode.img ---layout---------- Disk : 20 MiB, 20971520 bytes, 40960 sectors @@ -10,7 +10,7 @@ Disklabel type: dos Disk identifier: 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 +2 8192 12287 4096 83 Linux 0/130/3 0/195/3 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 diff --git a/tests/expected/fdisk/mbr-nondos-mode-1st-primary-recreate b/tests/expected/fdisk/mbr-nondos-mode-1st-primary-recreate index 3951f58631..c359608579 100644 --- a/tests/expected/fdisk/mbr-nondos-mode-1st-primary-recreate +++ b/tests/expected/fdisk/mbr-nondos-mode-1st-primary-recreate @@ -1,5 +1,5 @@ Re-create 1st primary partition -a5543ee1e3d2cf79913a56bae893a0f0 mbr-nondos-mode.img +e21e16b7452d82e2a2810a1de8c3db05 mbr-nondos-mode.img ---layout---------- Disk : 20 MiB, 20971520 bytes, 40960 sectors @@ -10,6 +10,6 @@ Disklabel type: dos Disk identifier: 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 +1 2048 8191 6144 83 Linux 0/32/33 0/130/2 ------------------- diff --git a/tests/expected/fdisk/mbr-nondos-mode-2nd-primary b/tests/expected/fdisk/mbr-nondos-mode-2nd-primary index 0a197c9cce..c3693bf0de 100644 --- a/tests/expected/fdisk/mbr-nondos-mode-2nd-primary +++ b/tests/expected/fdisk/mbr-nondos-mode-2nd-primary @@ -1,5 +1,5 @@ Create 2nd primary partition -9d31ee977e26e72ebce78e8e543cd4ce mbr-nondos-mode.img +3e928fabe884f6d4906b4d9335e7c6a3 mbr-nondos-mode.img ---layout---------- Disk : 20 MiB, 20971520 bytes, 40960 sectors @@ -10,7 +10,7 @@ Disklabel type: dos Disk identifier: 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 +1 2048 8191 6144 83 Linux 0/32/33 0/130/2 +2 8192 12287 4096 83 Linux 0/130/3 0/195/3 ------------------- diff --git a/tests/expected/fdisk/mbr-nondos-mode-extended b/tests/expected/fdisk/mbr-nondos-mode-extended index be8c887dc4..ba1677077b 100644 --- a/tests/expected/fdisk/mbr-nondos-mode-extended +++ b/tests/expected/fdisk/mbr-nondos-mode-extended @@ -1,5 +1,5 @@ Create extended partition -9528631b198e44564f67f8ca97fa51b8 mbr-nondos-mode.img +eed98bd91ea08e63ab6cd9aa18ce544e mbr-nondos-mode.img ---layout---------- Disk : 20 MiB, 20971520 bytes, 40960 sectors @@ -10,8 +10,8 @@ Disklabel type: dos Disk identifier: 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 +1 2048 8191 6144 83 Linux 0/32/33 0/130/2 +2 8192 12287 4096 83 Linux 0/130/3 0/195/3 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 58c58b4953..3656a0b874 100644 --- a/tests/expected/fdisk/mbr-nondos-mode-first-sector-at-end +++ b/tests/expected/fdisk/mbr-nondos-mode-first-sector-at-end @@ -40,7 +40,7 @@ Disk identifier: 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 +2 2048 19999 17952 83 Linux 0/32/33 1/62/29 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 4e88454f51..998769397b 100644 --- a/tests/expected/fdisk/mbr-nondos-mode-logical +++ b/tests/expected/fdisk/mbr-nondos-mode-logical @@ -1,5 +1,5 @@ Create logical partitions -db4406e7bc0773f234fd1db1b58b5997 mbr-nondos-mode.img +7fda11a0988bcb4822105c70cf75c1f2 mbr-nondos-mode.img ---layout---------- Disk : 20 MiB, 20971520 bytes, 40960 sectors @@ -10,8 +10,8 @@ Disklabel type: dos Disk identifier: 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 +1 2048 8191 6144 83 Linux 0/32/33 0/130/2 +2 8192 12287 4096 83 Linux 0/130/3 0/195/3 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 diff --git a/tests/expected/fdisk/mbr-nondos-mode-logical-delete b/tests/expected/fdisk/mbr-nondos-mode-logical-delete index 261b70689e..c875b4a571 100644 --- a/tests/expected/fdisk/mbr-nondos-mode-logical-delete +++ b/tests/expected/fdisk/mbr-nondos-mode-logical-delete @@ -1,5 +1,5 @@ Delete logical partitions -de85b8d74f52f307b9467ea4c33438cb mbr-nondos-mode.img +e2b25d19e00bfe88ed44ca4ac9216c39 mbr-nondos-mode.img ---layout---------- Disk : 20 MiB, 20971520 bytes, 40960 sectors @@ -10,8 +10,8 @@ Disklabel type: dos Disk identifier: 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 +1 2048 8191 6144 83 Linux 0/32/33 0/130/2 +2 8192 12287 4096 83 Linux 0/130/3 0/195/3 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 7e5f943005..764404b2ed 100644 --- a/tests/expected/fdisk/mbr-nondos-mode-logical-recreate +++ b/tests/expected/fdisk/mbr-nondos-mode-logical-recreate @@ -1,5 +1,5 @@ Create another logical partition -28d0cbe795535ee025dc7a4781516965 mbr-nondos-mode.img +640065c08c007d78166954475cd08ff8 mbr-nondos-mode.img ---layout---------- Disk : 20 MiB, 20971520 bytes, 40960 sectors @@ -10,8 +10,8 @@ Disklabel type: dos Disk identifier: 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 +1 2048 8191 6144 83 Linux 0/32/33 0/130/2 +2 8192 12287 4096 83 Linux 0/130/3 0/195/3 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