summaryrefslogtreecommitdiff
path: root/cts/hook/dut.c
Commit message (Collapse)AuthorAgeFilesLines
* printf: Convert %l to %llEvan Green2019-10-051-2/+2
| | | | | | | | | | | | | | | | | | | | | In order to make our printf more standard, utilize %ll for long long arguments, rather than %l. This does cost a little bit in flash space for that extra l in a couple of places, but enables us to turn on compile-time printf format checking. For this commit only, the semantics are such that both %l and %ll take 64-bit arguments. In the next commit, %l goes to its correct behavior of taking a sizeof(long) argument. BUG=chromium:984041 TEST=make -j buildall BRANCH=none Cq-Depend:chrome-internal:1863686,chrome-internal:1860161,chrome-internal:1914029 Change-Id: I18081b55a8dbf5ef8ec15fc499ca75e59d31da58 Signed-off-by: Evan Green <evgreen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1819652 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* 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>
* eCTS: Print start marker before syncDaisuke Nojiri2017-06-271-19/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes each test print start marker before sync. This will allow us to distinguish the failure before even sync is attempted (CTS_RC_DID_NOT_START, thus probably caused by the previous test) and the failure caused by the hanging partner, in which case the one good and alive will be stuck in sync (and should return _DID_NOT_END or even better _BAD_SYNC once we implement timeout in sync). This patch also: * Adds did_not_start_test to and removes debug_test from meta suite * Consolidates test runner loops into common cts_main_loop * Removes dut_common.h and th_common.h * Removes debug print macro and CTS_DEBUG * Replaces all infinite loops after tests with task_wait_event(-1) * Removes meaningless comments and debug printfs * Removes CTS_TEST_ID_* * Adds sync() to task suite BUG=chromium:736104 BRANCH=none TEST=Run run_ects.sh and verify all tests pass Change-Id: I6ccdf26afac6b8e8cb16483c5d75e4e77e7962f4 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/545176
* eCTS: Convert hook test suite to current formatDaisuke Nojiri2017-06-271-47/+81
| | | | | | | | | | | | | | | | | | This patch updates the hook test suite so that it can be run within the current framework. BUG=chromium:736047 BRANCH=none TEST=cts.py -m hook test name TH_RETURN_CODE DUT_RETURN_CODE TH_STR DUT_STR RESULT test_init_hook SUCCESS SUCCESS 1 1 PASS test_ticks SUCCESS SUCCESS 1 1 PASS test_priority SUCCESS SUCCESS 1 1 PASS test_deferred SUCCESS SUCCESS 1 1 PASS Change-Id: I3e7f29da61e794b06b03241f3d7706c2db94b5be Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/545084
* cts: Add hook testDaisuke Nojiri2016-07-151-0/+147
It's imported from test/hooks.c and adjusted to CTS. BUG=chromium:624520 BRANCH=none TEST=make buildall. Test passed on stm32l476-geval and nucleo-f072rb. Change-Id: I70673f2c0f8316a2b1fd9472eeb7db350fdc2d84 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/360631 Reviewed-by: Chris Chen <twothreecc@google.com>