summaryrefslogtreecommitdiff
path: root/test/host_command.c
Commit message (Collapse)AuthorAgeFilesLines
* host_command: clear any leftover dataJett Rink2019-11-261-1/+133
| | | | | | | | | | | | | | | We want to ensure that the entire buffer we may be sending back to the host from the EC does not contain any data from previous host command responses. Clear the data in common code so all chips do not have to implement this functionality. BRANCH=none BUG=b:144878983,chromium:1026994 TEST=new unit test shows cleared data Change-Id: I93ad4d36923ba1bf171f740e94830640d3fde3b0 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1930931
* LICENSE: remove unnecessary (c) after CopyrightTom Hughes2019-06-191-1/+1
| | | | | | | | | | | | | | | | Ran the following command: git grep -l 'Copyright (c)' | \ xargs sed -i 's/Copyright (c)/Copyright/g' BRANCH=none BUG=none TEST=make buildall -j Change-Id: I6cc4a0f7e8b30d5b5f97d53c031c299f3e164ca7 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1663262 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* test/host_command: Do not overflow req_bufNicolas Boichat2018-06-211-5/+8
| | | | | | | | | | | | | | The test attempts to access req_buf outside of its bounds during test_hostcmd_too_long, let's increase the buffer size. BRANCH=none BUG=chromium:854924 TEST=make V=1 TEST_ASAN=y run-host_command -j Change-Id: Ibacc080c9e961ad4eb56c17908e704796404a9ca Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1109614 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* Add interrupt support for emulatorVic Yang2014-01-061-0/+1
| | | | | | | | | | | | | | | | | | This provides us a way to inject interrupts during a test. If a test has interrupt_generator() defined, it will run in a separate thread. The generator can then trigger interrupts when it decides to. The current running task is suspended while emulator is executing ISR. Also fixes a bug that tasks run without scheduler notifying them during emulator start-up. BUG=chrome-os-partner:19235 TEST=Repeatedly run all tests. BRANCH=None Change-Id: I0f921c47c0f848a9626da6272d9040e2b7c5ac86 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/55671
* Test more error cases of host command handlingVic Yang2013-10-011-2/+26
| | | | | | | | | | | | | | This adds tests of invalid command version and invalid command. BUG=chrome-os-partner:19236 TEST=Pass host_command test BRANCH=None Change-Id: I49ce1b4c8b31ef98d9ee8203e88adfa521471d6d Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/170935 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
* Add host command testVic Yang2013-09-041-0/+160
This test checks host command interface handles errors correctly. BUG=chrome-os-partner:19236 TEST=Pass host_command test BRANCH=None Change-Id: I62764977d2063edf5abd37e78e074384eec5f0d4 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/167762 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>