<div dir="ltr"><div><div>What is the best way to run the toybox tests?  If I just run "make test", I get a lot of failures, some of which are probably because I'm not running as root, while some I don't understand, like:<br><br>PASS: pgrep -o pattern<br>pgrep: bad -s '0'<br>               ^<br>FAIL: pgrep -s<br><br></div>I'm on an Ubuntu 14.04 machine, running against the master branch.  I didn't try running as root since it seems like there is a non-zero chance that it will mess up my machine.<br><br>I saw in the ELC YouTube talk that test infrastructure is a TODO.<br><br><a href="http://landley.net/talks/celf-2015.txt">http://landley.net/talks/celf-2015.txt</a><br><br></div><div>Is this something I can help with?  I guess if you can tell me what environment you use to get all tests to pass, it shouldn't be too hard to make a shell script to create that environment, probably with Aboriginal Linux.  I have built Aboriginal Linux before (like a year ago).  <br><br></div><div>One of the reasons I ran into this was because I wanted to distill a test corpus for fuzzing from the shell test cases.  afl-fuzz has a utility to minimize a test corpus based on code path coverage.  So getting a stable test environment seems like a prerequisite for that.<br><br></div><div>FWIW, I had a different approach for fuzzing each arg:<br><br><a href="https://github.com/andychu/toybox/commit/ff937e97881bfdf4b1221618c38857b75c9534e0">https://github.com/andychu/toybox/commit/ff937e97881bfdf4b1221618c38857b75c9534e0</a><br><br></div><div>This seems to be a little laborious, because I have to manually write shell scripts to fuzz individual inputs (and I didn't find anything beyond that one crash yet).  I think the mass fuzzing thing might work better, but I'm not sure.<br></div><div><br></div><div>thanks,<br></div>Andy<br><br></div>