[Toybox] [PATCH 2/2] BLKID: Fix SEC_TYPE for vfat and iso9660

Eric Molitor emolitor at molitor.org
Wed Feb 8 09:49:39 PST 2023


On Wed, 8 Feb 2023 at 05:23, Rob Landley <rob at landley.net> wrote:

> It's after mkfs.vfat in my todo list because of rock ridge weirdness.
> Right.
>
I might take a look at that as I need mkfs.vfat (or mtools) to create the
ESP for UEFI bootable images.

And now I need to go back and add a couple extra paremeters, because
> TEST_HOST
> is saying...
>
> FAIL: blkid iso
> echo -ne '' | BLKID iso
> --- expected    2023-02-07 23:02:05.903941946 -0600
> +++ actual      2023-02-07 23:02:05.911941946 -0600
> @@ -1 +1 @@
> -temp.img: SEC_TYPE="msdos" LABEL="MYISO" UUID="1970-01-02-12-55-42-00"
> TYPE="iso9660"
> +temp.img: UUID="2023-02-08-04-47-27-00" LABEL="CDROM" TYPE="iso9660"
>
> And... sigh. Why are the fields out of order?

Let me check a couple more blkid implementations and get back to you. :)


> On 2/6/23 10:11, Eric Molitor wrote:
> > Move SEC_TYPE for vfat to not display when searching by label
> > Remove SEC_TYPE from iso9660
> > ---
> >  tests/blkid.test   | 6 +++---
> >  toys/other/blkid.c | 4 +++-
> >  2 files changed, 6 insertions(+), 4 deletions(-)
> >
> > diff --git a/tests/blkid.test b/tests/blkid.test
> > index 4c385dcb..37bce67a 100755
> > --- a/tests/blkid.test
> > +++ b/tests/blkid.test
> > @@ -29,10 +29,10 @@ testing "f2fs" "BLKID f2fs" \
> >    'temp.img: LABEL="myf2fs" UUID="b53d3619-c204-4c0b-8504-36363578491c"
> > TYPE="f2fs"\n' \
> >    "" ""
> >  testing "iso" "BLKID iso" \
> > -  'temp.img: SEC_TYPE="msdos" LABEL="MYISO"
> UUID="1970-01-02-12-55-42-00"
> > TYPE="iso9660"\n' \
> > +  'temp.img: LABEL="MYISO" UUID="1970-01-02-12-55-42-00"
> TYPE="iso9660"\n' \
> >    "" ""
>
> You removed SEC_TYPE from the output but debian is still producing it. Why
> did
> you do that? I'd think "adjusting the tests to match the different output
> my
> patch produces" would warrant at least a comment...

See below but I will resubmit these as two sets of patches which I believe
will be clearer. I'm guilty of compounding too many changes in a single
patch.
Just removed from the ISO9660 test, not all. I was fixing the order of the
output for SEC_TYPE to be consistent with the EXT code path and other blkid
implementations. Just doing the above smaller change means SEC_TYPE renders
before TYPE. FWICT SEC_TYPE should always follow TYPE. But let me test a
bit more with various implementations and see if there is any consistency
to this.

- Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20230208/1ce78ae5/attachment-0001.htm>


More information about the Toybox mailing list