Re: [TEST/REVIEW] boot0cfg/fdisk issue fix

From: Simon L. Nielsen <simon_at_FreeBSD.org>
Date: Sun, 10 Jul 2005 19:43:48 +0200
On 2005.07.05 22:44:50 +0200, Poul-Henning Kamp wrote:

> This is an attempt to fix an boot0cfg/fdisk issue which I have
> overlooked.
> 
> The patch adds a g_ctl method to geom_mbr and makes boot0cfg and
> fdisk use it to modify the MBR if possible.
> 
> Please test and report ASAP in order to get this solution into
> RELENG_6

I played around with this and made the attached regression test script
and your patch seems to work fine, except for the "fdisk: Geom not
found" output from fdisk (which I already mentioned to you) when it's
not using the GEOM API.

Test result for unpatched -CURRENT, with kern.geom.debugflags=0 :

./geom_mbr....1..38
ok 1 - MBR init
ok 2 - reinstall boot0 bootblock; no slices
ok 3 - set active slice; no slices
ok 4 - add slice 1
ok 5 - reinstall boot0 bootblock; one slice
ok 6 - set active slice; one slice
ok 7 - add slice 2
ok 8 - reinstall boot0 bootblock; two slices
ok 9 - set active slice; two slices
ok 10 - add slice 3
ok 11 - reinstall boot0 bootblock; three slices
ok 12 - set active slice; three slices
ok 13 - add slice 4
ok 14 - reinstall boot0 bootblock; four slices
ok 15 - set active slice; four slices
ok 16 - del slice 4
ok 17 - del slice 3
ok 18 - del slice 2
ok 19 - reinstall boot0 bootblock
ok 20 - set active slice
not ok 21 - reinstall boot0 bootblock; one slice; mounted FS
not ok 22 - set active slice; one slice; mounted FS
not ok 23 - add slice 2; mounted FS
not ok 24 - reinstall boot0 bootblock; two slices; mounted FS
not ok 25 - set active slice; two slices; mounted FS
not ok 26 - add slice 3; mounted FS
not ok 27 - reinstall boot0 bootblock; three slices; mounted FS
not ok 28 - set active slice; three slices; mounted FS
not ok 29 - add slice 4; mounted FS
not ok 30 - reinstall boot0 bootblock; four slices; mounted FS
not ok 31 - set active slice; four slices; mounted FS
not ok 32 - del slice 4; mounted FS
not ok 33 - del slice 3; mounted FS
ok 34 - del slice 2; mounted FS
ok 35 - del all slices, with mounted FS
not ok 36 - add slice 1-4, with mounted FS
ok 37 - unmount FS
not ok 38 - post md reconfig
FAILED tests 21-33, 36, 38
        Failed 15/38 tests, 60.53% okay
Failed Test  Stat Wstat Total Fail  Failed  List of Failed
-------------------------------------------------------------------------------
./geom_mbr.t               38   15  39.47%  21-33 36 38
Failed 1/1 test scripts, 0.00% okay. 15/38 subtests failed, 60.53% okay.


Test result for unpatched -CURRENT, with kern.geom.debugflags=16 :

./geom_mbr....1..38
ok 1 - MBR init
ok 2 - reinstall boot0 bootblock; no slices
ok 3 - set active slice; no slices
ok 4 - add slice 1
ok 5 - reinstall boot0 bootblock; one slice
ok 6 - set active slice; one slice
ok 7 - add slice 2
ok 8 - reinstall boot0 bootblock; two slices
ok 9 - set active slice; two slices
ok 10 - add slice 3
ok 11 - reinstall boot0 bootblock; three slices
ok 12 - set active slice; three slices
ok 13 - add slice 4
ok 14 - reinstall boot0 bootblock; four slices
ok 15 - set active slice; four slices
ok 16 - del slice 4
ok 17 - del slice 3
ok 18 - del slice 2
ok 19 - reinstall boot0 bootblock
ok 20 - set active slice
ok 21 - reinstall boot0 bootblock; one slice; mounted FS
ok 22 - set active slice; one slice; mounted FS
not ok 23 - add slice 2; mounted FS
ok 24 - reinstall boot0 bootblock; two slices; mounted FS
ok 25 - set active slice; two slices; mounted FS
not ok 26 - add slice 3; mounted FS
ok 27 - reinstall boot0 bootblock; three slices; mounted FS
ok 28 - set active slice; three slices; mounted FS
not ok 29 - add slice 4; mounted FS
ok 30 - reinstall boot0 bootblock; four slices; mounted FS
ok 31 - set active slice; four slices; mounted FS
not ok 32 - del slice 4; mounted FS
not ok 33 - del slice 3; mounted FS
ok 34 - del slice 2; mounted FS
ok 35 - del all slices, with mounted FS
not ok 36 - add slice 1-4, with mounted FS
ok 37 - unmount FS
ok 38 - post md reconfig
FAILED tests 23, 26, 29, 32-33, 36
        Failed 6/38 tests, 84.21% okay
Failed Test  Stat Wstat Total Fail  Failed  List of Failed
-------------------------------------------------------------------------------
./geom_mbr.t               38    6  15.79%  23 26 29 32-33 36
Failed 1/1 test scripts, 0.00% okay. 6/38 subtests failed, 84.21% okay.

Patched -CURRENT (not run verbose since there is no reason for verbose):

./geom_mbr....ok
All tests successful.
Files=1, Tests=38,  1 wallclock secs ( 0.12 cusr +  0.20 csys =  0.33 CPU)

-- 
Simon L. Nielsen

Received on Sun Jul 10 2005 - 15:43:51 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:38 UTC