[Toybox] [PATCH] blkid: adapt tests for util-linux blkid.

enh enh at google.com
Tue Jun 25 18:19:47 PDT 2019


On Tue, Jun 25, 2019 at 4:30 PM Rob Landley <rob at landley.net> wrote:
>
> On 6/25/19 3:42 PM, enh via Toybox wrote:
> > util-linux's blkid doesn't support reading from stdin, so move that to
> > being a special toyonly test rather than the default.
>
> Amusingly enough I had a partial version of this change already in my tree. :)
>
> Pity this slows down the tests so much. (Lots of these filesystems are large and
> empty.)

only takes 2s on my laptop, and 5s on a phone... i haven't bothered to
look where the 3.5mins of test time on a phone goes yet, but it's not
in the blkid tests :-)

> > toybox blkid differs from util-linux in that it doesn't seem to find the
> > LABEL for the checked-in example f2fs file system (the offset is wrong,
> > but also f2fs uses LE16 strings), nor does it support the SEC_TYPE that
> > util-linux blkid shows for several of the test file systems.
>
> I need to dig into config stuff to loopback mount f2fs. All the flash
> filesystems need a fake flash device that emulates erase blocks. You'd think
> /dev/loop would have been modified to do this already with an extra losetup
> flag, but no, they did that block2mtd nonsense instead...

(the only thing i want to do with toybox blkid is share the logic with
toybox file, so `file blah.img` works. i don't need it, but desktop
file can do it, so if we're going to have the code anyway...)

> Sigh. I should teach MY mount to deal with this crap transparently. (It already
> knows how to do "mount file dir" without having to say -o loop. And "mount file
> file" and "mount dir dir" without having to say --bind...
>
> Rob
>
> P.S. Because --loop and -o loop are synonyms, that's why. You can even go
> --remount,rw but that's an implementation side effect. Well I taught busybox
> mount to do that a decade ago, wasn't going to do _less_ in toybox. :)



More information about the Toybox mailing list