On Sat, Mar 24, 2012 at 10:07:49AM +0100, Jim Meyering wrote: > Brian C. Lane wrote: > > From: "Brian C. Lane" <[email protected]> > > > > Make sure parted checks the PMBR before the GPT partition table. > > > > * NEWS: Update with new GPT behavior > > * tests/Makefile.am: Add new test > > * tests/overwrite-gpt-pmbr.sh: new test > > --- > ... > > diff --git a/tests/t0301-overwrite-gpt-pmbr.sh > > b/tests/t0301-overwrite-gpt-pmbr.sh > ... > > +PARTED_SECTOR_SIZE=4096 > > +export PARTED_SECTOR_SIZE > > I suppose the above two lines were just for testing? > Their presence would serve solely to disable tests with a > smaller simulated sector size. I've removed them.
That was carried over from t0300 test which I used as a template for this. You may want to remove it there as well. > > > +dev=loop-file > > +# create a backing file large enough for a GPT partition table > > +dd if=/dev/null of=$dev seek=4001 2> /dev/null || framework_failure > > + > > +# create a GPT partition table > > +parted -s $dev mklabel gpt > out 2>&1 || fail=1 > > +# expect no output > > +compare /dev/null out || fail=1 > > + > > +# create a DOS partition table > > +fdisk $dev > out 2>&1 <<EOF > > +o > > +w > > +EOF > > This would be our first use of fdisk. > Technically, we'd have to skip the test when fdisk is not available. > Instead, I've adjusted the test not to require that: instead, create > an MSDOS table in a separate file and transplant it into the GPT-labeled one. > > I've also adjusted the NEWS entry. > I'll wait for your ACK before pushing this. Looks good, thanks. Brian -- Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
pgpNRcIx0CZP6.pgp
Description: PGP signature

