On 10/02/2015 10:00 AM, Isaac Dunham wrote: > On Fri, Oct 02, 2015 at 06:26:09AM -0500, Rob Landley wrote: >> What I really need for this is _test_cases_. Preferably ones I can >> reproduce in an automated fashion under qemu. > <snip> >> 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... > > I think to have modprobe trigger hotplug events that load more modules, > you'll need to have modular drivers for controllers and hard drives/CDs. > (Note that most distro kernels already use such a config.) > > In this case, if you want to have the hard drive accessible, you will also > need to load modules on coldplug. > Typically, mdev-based scripts will either look for /sys/.../modalias > or grep for MODALIAS= in uevent.
The test script call call modprobe manually to kick off a first thing. > [in the context of long running processes] >> Rich Felker wrote: >>> Isaac Dunham wrote: >>>> Agreed. But then, wouldn't xrun() also be the wrong thing? >>> Why? > If I'm not mistaken, xfork() and XVFORK() will perror_exit on failure. Yes, that's the x part. > This results in a fork-bomb killing a long-running hotplug helper. Which is why you can setjmp(toys.rebound) and xexit() will longjmp() to that instead of exiting. The infrastructure may need some adjustment, and I may need to audit to make sure there's no missing cleanup (mallocs without free and unclosed filehandles are most likely) on the paths these things call, but in theory there's a way to do it. Rob _______________________________________________ Toybox mailing list [email protected] http://lists.landley.net/listinfo.cgi/toybox-landley.net
