summaryrefslogtreecommitdiff
path: root/util/run_host_test
Commit message (Collapse)AuthorAgeFilesLines
* Add more debugging to run_host_testVincent Palatin2018-01-181-0/+7
| | | | | | | | | | | | | | | | | | | | | | If a host test fails, record the execution state of the EC host process. This is an attempt to provide a hint whether the test was blocked on I/O, if so it might be in 'D' state (but it might have recovered too late too). Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BRANCH=none BUG=chromium:715011 TEST=run 'make runtests -j', then run it again with TIMEOUT reduced to 1 see it fail on 'kb_scan' and 'interrupt' tests with the trace containing '*** test [...] in state Ssl+ ***' Change-Id: I4590a4b84a2aba8d385d3ef911d5d0186e8ce2e3 Reviewed-on: https://chromium-review.googlesource.com/859771 Commit-Ready: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
* Clean up run_host_test scriptVic (Chun-Ju) Yang2014-01-151-8/+10
| | | | | | | | | | | | | | | | | | This includes: - Remove an unused function argument - Style fix - Handle EOF by pexpect instead of catching exception BUG=chrome-os-partner:19235 TEST=Run all tests TEST=Make a test crash and check EOF is handled properly BRANCH=None Change-Id: I3636cdab6e68cacf97c4b245b14b2d57613a1674 Signed-off-by: Vic (Chun-Ju) Yang <victoryang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/182049 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* emulator: Treat unexpected EOF as test failureVic (Chun-Ju) Yang2014-01-081-1/+1
| | | | | | | | | | | | | Unexpected EOF usually means error in the test code or assertion failure. In this case, let's treat it as test failure. BUG=chrome-os-partner:19235 TEST=Check assertion failure fails the test. BRANCH=None Change-Id: I9270d223d7252f611673a2c55af0c2d68b6116c4 Signed-off-by: Vic (Chun-Ju) Yang <victoryang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/181747
* Dump stack trace on emulator test failureVic (Chun-Ju) Yang2014-01-081-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Emulator test failures are sometimes hard to debug, especially when the test is stuck somewhere and times out. Let's have the emulator dump stack trace when an assertion fails or a test times out. The produced stack trace is in this format: #0 build/host/kb_8042/kb_8042.exe() [0x412421] /home/victoryang/trunk/src/platform/ec/test/kb_8042.c:104 #1 build/host/kb_8042/kb_8042.exe() [0x4124a9] /home/victoryang/trunk/src/platform/ec/test/kb_8042.c:129 #2 build/host/kb_8042/kb_8042.exe(run_test+0x3a) [0x412e2c] /home/victoryang/trunk/src/platform/ec/test/kb_8042.c:262 #3 build/host/kb_8042/kb_8042.exe(_run_test+0x11) [0x4061de] /home/victoryang/trunk/src/platform/ec/core/host/task.c:90 #4 build/host/kb_8042/kb_8042.exe(_task_start_impl+0x79) [0x406b72] /home/victoryang/trunk/src/platform/ec/core/host/task.c:408 #5 /lib64/libpthread.so.0(+0x70b1) [0x7f6dc2fa10b1] ??:0 #6 /lib64/libc.so.6(clone+0x6d) [0x7f6dc2cd8efd] ??:0 The file name and line number in the trace is generated by addr2line. BUG=chrome-os-partner:19235 chromium:331548 TEST=Put in a infinite loop in a test, and see stack trace when it times out. TEST=Add a failing assertion, and see stack trace when it fails. BRANCH=None Change-Id: I4494ffd1ebc98081ce40e860a146202084aa2a1e Signed-off-by: Vic (Chun-Ju) Yang <victoryang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/181730
* Reboot emulator with execv()Vic Yang2013-07-241-11/+2
| | | | | | | | | | | | | | | | With this, the emulator is able to reboot itself without the help of run_host_test script. This makes it easier for development and also speeds up the test. BUG=chrome-os-partner:19235 TEST=Pass all tests BRANCH=None Change-Id: Ifa510442de19256c671ab91b6bc75fe9e8b9dc7b Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/62969 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* Make target for test coverage report generationVic Yang2013-06-161-0/+2
| | | | | | | | | | | | | By 'make coverage', lcov is used to generate test coverage report in HTML format stored in coverage_rpt folder. BUG=chrome-os-partner:19235 TEST=Generate a report. BRANCH=None Change-Id: I44142eaaeb897cf09179764781120370920144cd Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/58203
* Support emulator rebootVic Yang2013-05-281-7/+32
| | | | | | | | | | | | | | When emulator exits with reboot exit code, we should run the emulator again. BUG=chrome-os-partner:19235 TEST=Enable flash test on emulator. See it reboots. BRANCH=None Change-Id: Id0b4c21c1be7ae978be8b336a3498181d881c715 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/56701 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* Show run time of unit testsVic Yang2013-05-141-2/+7
| | | | | | | | | | | | | This is useful for finding out which test runs for too long. BUG=chrome-os-partner:19235 TEST=Run tests and see run time logged. BRANCH=None Change-Id: I5cb6727b2e1017fce1107e4892c1898e66598492 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/51105 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* Redirect emulator output to stderr if a test failsVic Yang2013-05-141-3/+25
| | | | | | | | | | | | | | If a test fails, redirect emulator output to stderr so that it shows up even when V=1 is not set. BUG=chrome-os-partner:19235 TEST=Manual BRANCH=None Change-Id: I6d8e05eaa222ebe043556bfcd3f63ca7e27c2721 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/51097 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* Pthread-based emulator for unit testingstabilize-4100.38.BVic Yang2013-05-071-0/+26
This is the first version of pthread-based RTOS emulator. With this, we will be able to test high-level modules entirely on the host machine. BUG=chrome-os-partner:19325 TEST='make runtests' and see tests passing. BRANCH=None Change-Id: I1f5fcd76aa84bdb46c7d35c5e60ae5d92fd3a319 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/49954 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>