Olpc-runin-tests
olpc-runin-tests is a collection of tests for the XO-1.5 and XO-1.75 that are run during late stages of laptop production.
(It might also be useful for in-field diagnostics. It is designed to test the hardware as well as the software installation, but is not designed to cover all software functions. The software testing is not intended to discover and report software failures, since these would unnecessarily interrupt production. Care should be taken not to use it for software testing without understanding the limitations.)
By default, the tests are run in a loop for several hours. If any test fails at any point, the system is shutdown.
Logs are written to /runin/logdir, which is later packed into a .tar.gz. fail.log is the single log which you can quickly check for success or failure; the file is empty on success.
For developers
Source:
Current maintainer: James Cameron
Questions and contributions should be sent to the devel mailing list.
One-off Test
To repeat the RUNIN tests on a shipped laptop;
touch /runin/force reboot
After the test run, look in /runin/logdir for the output.
If the file /runin/logdir/fail.log is present and contains text, then the test run failed.
Repeating Tests
At the firmware ok prompt, set the TS manufacturing tag to RUNIN:
ok delete-tag TS ok add-tag TS RUNIN
Boot the system as normal, and instead of the normal boot routine, the runin tests will kick in.
When done, use the ok prompt to reset the TS tag to SHIP:
ok delete-tag TS ok add-tag TS SHIP
Kernel Suspend and Resume Stability Testing
Runin is being used for testing stability of suspend and resume. See XO-1.75/Kernel/Runin.
Original design document
Note: this is not fully reflective of the current implementation, but is enough to give you a feel.
Early in the boot (rc.d S00- or some such) check the TS mfg flag for run in if !run-in then exit run-in = [ `cat /OFW/mfg-data/TS` == "RUNIN" ] (or what ever bash function we have to do this) Start run-in test: remove /bootpart/runin/fail.log remove /bootpart/runin/olpc.fth uncompress fs_hash.md5.whatever Start X with our set of tests in xinitrc. Grab start time. Start tests: - Set the charger pwm to 0% so it runs off of battery as much as possible Tell EC not to charge battery. Run test for n hours on battery. After 4-n hours re-enable full power and tell EC to charge battery - Run md5deep to compare the all the files vs the manifest. run over and over. ? running multiple md5deeps on different parts of the fs for a different type of stress. - Run cpuburn with floating point - Run memtester - Run camera with output to the screen an possbily to file - Run play audio (file of silence) - Check cputemp - ? Turn wireless on and off by reloading firmware? - ? Suspend resume? - ? do some r and r stuff to work the video engine harder ? - Reboot tests [Not quite sure how to do with other long running tests] Wait time < 4hours: watch /tmp/fail.log for any items to show up if present the write fail.log and olpc.fth to /bootpart/runin and reboot Check battery to make sure it returned to fully charged Clean up droppings Re-run md5deep to verify the files are still pristine. Copy Run-In result file into /bootpart/runin
- Each test runs in its own process and checks for pass fail and appends to /tmp/fail.log
- If any test fails it outputs a fail report into a 'fail.log'. Top level script watchs for items in /tmp/fail.log and if found aborts the runin early. Then copies the /tmp/fail.log and rundone.fth to /bootpart/runin.