From 0f713b36be38449cddea2196d1a135d7bdcfb82a Mon Sep 17 00:00:00 2001 From: Jett Rink Date: Thu, 9 Jul 2020 14:45:56 -0600 Subject: tests: reset the PD task before every test case In order to isolate each test and make each test run from a clean state, reuse the TASK_RESET_DONE event to signal to the test code that we should just jump back to the beginning of the PD task BRANCH=none BUG=none TEST=see that tests are reset in child CLs Signed-off-by: Jett Rink Change-Id: I3c0408ab0dbc3ad3a26f17aadbda1577ffc7d32f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2290650 Reviewed-by: Paul Fagerburg Reviewed-by: Denis Brockus --- include/task.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include/task.h') diff --git a/include/task.h b/include/task.h index 7d424b871c..a0db186eb4 100644 --- a/include/task.h +++ b/include/task.h @@ -47,7 +47,11 @@ #define TASK_EVENT_DMA_TC BIT(26) /* ADC interrupt handler event */ #define TASK_EVENT_ADC_DONE BIT(27) -/* task_reset() that was requested has been completed */ +/* + * task_reset() that was requested has been completed + * + * For test-only builds, may be used by some tasks to restart themselves. + */ #define TASK_EVENT_RESET_DONE BIT(28) /* task_wake() called on task */ #define TASK_EVENT_WAKE BIT(29) -- cgit v1.2.1