A target for the 0.9 release is the test suite running under mkroot, Which is 
also required
for passwd to be re-promoted (We need to test it in a vacuum). Since toysh in 
it's current
state isn't good enough to run test.sh, a possible solution until it does 
become good enough
is to use the host systems bash. Copying the binary into the filesystem and 
running test.sh
with it.

The main downside of this is that you have to look for the dynamic libraries 
bash wants and
copy them into the fs directory, and doing a chroot requires root permissions. 
Also it is very
clearly not a permanent fix (None of this is needed once toysh is ready), just 
enough to get
tests for commands like passwd and chsh running. Another downside of chroot-ing 
is you can't
emulate things that depend on drivers or nommu.

Attached is a mkroot package (Not a patch), that sets up a environment to run 
the test suite
under a chroot in. (./mkroot/mkroot.sh testwhost && sudo chroot root/host/fs 
/test command_name).
It's not something I'm actually expecting to be merged, but that doesn't mean 
it's not potentially
useful for testing the commands that modify /etc/passwd and friends.

Also when making this I spotted some things in the build infrastructure we will 
need to work around
in a airlock-ed test suite, test.sh needs configure, and portability.sh needs 
something for CC or
else it will throw a fit.

-   Oliver Webb <aquahobby...@proton.me>

Attachment: testwhost
Description: Binary data

_______________________________________________
Toybox mailing list
Toybox@lists.landley.net
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to