Olpc-runin-tests: Difference between revisions
No edit summary |
No edit summary |
||
(9 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
'''olpc-runin-tests''' is a collection of tests for the XO-1.5 |
'''olpc-runin-tests''' is a collection of tests for the XO-1.5, XO-1.75 and XO-4 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.) |
(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.) |
||
Line 7: | Line 7: | ||
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. |
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. |
||
== |
== One-off Test == |
||
To repeat the RUNIN tests on a shipped laptop, connect the AC adapter, charge the battery, log in, start Terminal, and type; |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
== One-off Test == |
|||
== Setting Burn Time == |
|||
To repeat the RUNIN tests on a shipped laptop; |
|||
The default burn time, the time that the test will run for, is set in the runin sources. |
|||
⚫ | |||
⚫ | |||
For 13.1.0 and later, the BT manufacturing tag may contain a number of seconds for the run. |
|||
⚫ | |||
This allows you to override the default time that set in the code. |
|||
ok add-tag BT 7200 \ 2 hour runin |
|||
⚫ | |||
ok add-tag BT 86400 \ 24 hour runin |
|||
== Repeating Tests == |
== Repeating Tests == |
||
Line 39: | Line 40: | ||
ok delete-tag TS |
ok delete-tag TS |
||
ok add-tag TS SHIP |
ok add-tag TS SHIP |
||
(Was broken in 12.1.0, see <trac>11952</trac>.) |
|||
== Kernel Suspend and Resume Stability Testing == |
== Kernel Suspend and Resume Stability Testing == |
||
Runin is being used for testing stability of suspend and resume. See [[XO-1.75/Kernel/Runin]]. |
Runin is being used for testing stability of suspend and resume. See [[XO-1.75/Kernel/Runin]] and [[XO-4/Kernel/Runin]]. |
||
== |
== For developers == |
||
⚫ | |||
Note: this is not fully reflective of the current implementation, but is enough to give you a feel. |
|||
⚫ | |||
⚫ | |||
⚫ | |||
<pre> |
|||
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 |
|||
</pre> |
|||
⚫ | |||
* 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. |
Latest revision as of 19:49, 7 February 2014
olpc-runin-tests is a collection of tests for the XO-1.5, XO-1.75 and XO-4 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.
One-off Test
To repeat the RUNIN tests on a shipped laptop, connect the AC adapter, charge the battery, log in, start Terminal, and type;
sudo touch /runin/{force,soiled} sudo 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. Further details might be gleaned from the other logs.
Setting Burn Time
The default burn time, the time that the test will run for, is set in the runin sources.
For 13.1.0 and later, the BT manufacturing tag may contain a number of seconds for the run.
This allows you to override the default time that set in the code.
ok add-tag BT 7200 \ 2 hour runin ok add-tag BT 86400 \ 24 hour runin
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
(Was broken in 12.1.0, see <trac>11952</trac>.)
Kernel Suspend and Resume Stability Testing
Runin is being used for testing stability of suspend and resume. See XO-1.75/Kernel/Runin and XO-4/Kernel/Runin.
For developers
Source:
Current maintainer: James Cameron
Questions and contributions can be sent to the maintainer, but should be sent to the devel mailing list.