[Toybox] [PATCH] ls: fix -h with block counts.

Rob Landley rob at landley.net
Wed Apr 8 14:03:53 PDT 2020


On 4/8/20 12:44 PM, enh via Toybox wrote:
> No new test, because I don't know how to write one that would work on
> all file systems.

My vague todo item here is to run the tests in a qemu system with three known
mount points (squashfs, tmpfs, and ext2 scratch space) for consistent behavior.
More or less like I did in aboriginal linux years ago, but based on mkroot. The
agenda is:

1) get "make root" booting to shell prompt with toysh. (Almost there!)

2) implement build control image support (ala
http://landley.net/aboriginal/control-images/) so I can feed it a squashfs image
with whatever files I need (in this case the extracted toybox source) and a
shell script it runs on startup instead of the interactive shell prompt. (The
init script checks for /mnt/init towards the end, and if it finds it runs that
instead of the shell prompt.)

3) Package and run the toybox tests in this environment, with a known kernel,
known mountpoints, known users, and known modules, as root.

4) Make it work consistently on all the targets (glibc/musl/bionic, x86, x86-64,
arm, arm64, mips, mips64, powerpc, m68k, sh4, s390,
partridge-in-a-pear-tree-nommu-softfloat).

5) Annotate tests that don't provide consistent behavior without a known
environment (A bit like toyonly and SKIP_HOST) so they're skipped when _not_ run
through "make root".

6) Fill out all the tests for all the commands for all the standards and all the
corner cases.

There is a nontrivial amount of work left to do there.

Rob



More information about the Toybox mailing list