[Toybox] pull: fix modprobe, login, switch_root, improve init, reboot

Rob Landley rob at landley.net
Fri Oct 2 04:26:09 PDT 2015


On 10/01/2015 10:22 PM, Rich Felker wrote:
> On Thu, Oct 01, 2015 at 07:34:25PM -0700, Isaac Dunham wrote:
>> Maybe (1) try to fork(); (2) if we succeed, xexec() modprobe; (3) do the
>> whole mknod/chmod/... bit if appropriate; (4) on completion of that,
>> call wait().
>> Note that a forkbomb, which could temporarily result in fork() failing,
>> should not make the hotplugger die if it's long-running. Making module
>> loading fail temporarily seems like it would be better.
> 
> This will not be nommu compatible. I think this is why Rob suggested
> xrun.

What I really need for this is _test_cases_. Preferably ones I can
reproduce in an automated fashion under qemu.

I'm working on the root-side test infrastructure this week (as well as
the LFS 7.7 build control image), and that means launching an aboriginal
linux image under qemu with a /mnt partition containing a /mnt/init that
runs an or more toybox test. Presumably controlled by environment
variables since extra NAME=VALUE arguments on the kernel command line
add environment variables to PID 1's environment space, so the calling
script can do:

  ./run-root-test.sh ifconfig

And I can somehow configure the plumbing to cd system-image-$ARCH and
call "KERNEL_EXTRA='TOYTEST=ifconfig' ./native-build.sh
/path/to/toybox-test.hdc"...

There's a lot of bits to fit together here. I'll probably need a "make
test_image" target in toybox that does a build and creates an
appropraite squashfs to act as the build control imamge for aboriginal
to run the test in a known root environment. And stuff on the aboriginal
side to build a modular kernel with some modules I can have insmod and
modprobe try to use, and maybe doing that can trigger hotplug events for
mdev tests...

Rob

 1443785169.0


More information about the Toybox mailing list