summaryrefslogtreecommitdiff
path: root/test/hooks.c
Commit message (Collapse)AuthorAgeFilesLines
* Deferred: Use deferred_data instead of function pointerAnton Staaf2016-04-181-7/+11
| | | | | | | | | | | | | | | | | | | | | Previously calls to hook_call_deferred were passed the function to call, which was then looked up in the .rodata.deferred section with a linear search. This linear search can be replaced with a subtract by passing the pointer to the deferred_data object created when DECLARE_DEFERRED was invoked. Signed-off-by: Anton Staaf <robotboy@chromium.org> BRANCH=None BUG=None CQ-DEPEND=CL:*255812 TEST=make buildall -j Change-Id: I951dd1541302875b102dd086154cf05591694440 Reviewed-on: https://chromium-review.googlesource.com/334315 Commit-Ready: Bill Richardson <wfrichar@chromium.org> Tested-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* Fix an integer underflow bug in hooks testVic (Chun-Ju) Yang2014-01-081-1/+1
| | | | | | | | | | | | | | | The variable 'interval' is declared as unsigned integer, and this sometimes causes an integer underflow when substracting it by SECOND, and in turns leads to false test failure. Changing it to signed integer. BUG=chrome-os-partner:19236 TEST=Repeatedly run hooks test BRANCH=None Change-Id: Ic6d8001f90fb8756b6bdadf811a668c02fbccb34 Signed-off-by: Vic (Chun-Ju) Yang <victoryang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/181882 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* Clean up hook priorties on LM4Randall Spangler2013-11-041-0/+1
| | | | | | | | | | | | | | | | | | | | Fan no longer needs a special priority to wait for the host memmap to become available, since LPC inits earlier. I2C and PECI don't need explicit ordering on freq change. Thermal now uses the explicit prio for temp sensors done. Commented hook test. BUG=chromium:314768 BRANCH=none TEST=boot link; enable/disable PLL; verify fanset and temps commands work afterwards. Change-Id: I71766614dff2950dd307acd0635405e6b59e330a Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/175601 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* Add boot key testVic Yang2013-09-051-2/+2
| | | | | | | | | | | | | This checks boot key combination like Power-F3-ESC and Power-F3-Down can be properly detected. BUG=chrome-os-partner:19236 TEST=Pass kb_scan test BRANCH=None Change-Id: I180918977299219a8421798dac2ab9fed84ef9a2 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/167802
* Lessen timing constraints in hooks testVic Yang2013-07-231-3/+3
| | | | | | | | | | | | | | HOOK_TICK and HOOK_SECOND aren't firing with precise interval. Let's lessen the timing constraints. BUG=chromium:263288 TEST=Pass all tests BRANCH=None Change-Id: Ic093c2a27ed1b8621469a4097e567b80d1eeb50d Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/63144 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* More hooks unit testVic Yang2013-06-131-0/+10
| | | | | | | | | | | | | Checks we cannot call non-registered deferred functions. BUG=chrome-os-partner:19236 TEST=Pass the test. BRANCH=None Change-Id: I6cf67f85c7749632627819cc05e6809c040fb697 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/58330 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* Adjust hooks test timingVic Yang2013-05-171-11/+16
| | | | | | | | | | | | | | | | We unit test to be as less time sensitive as possible. This change adjusts the timing in the test to ensure we have enough time for context switching. Otherwise we get false negative sometimes. BUG=chrome-os-partner:19236 TEST=Repeatedly run the test and see it passes. BRANCH=None Change-Id: I90c1200641cb02f95bd7631bd2870ad21b21bffc Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/51562 Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
* Relax timing constraints in hooks testVic Yang2013-05-151-2/+2
| | | | | | | | | | | | | | Current timing constraints are too tight that the test sometimes fails when it shouldn't. BUG=chrome-os-partner:19236 TEST=Pass the test BRANCH=None Change-Id: Ib94ff44691ba36f14dbf02319d0371770b5ece5d Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/51250 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* Add hook testVic Yang2013-05-141-0/+127
Test of hook functionality. BUG=chrome-os-partner:19236 TEST=Pass the test BRANCH=None Change-Id: I4700f3061edd0707932e935a719fc73c3976892e Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/50957 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>