summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAl Semjonovs <asemjonovs@google.com>2022-07-13 10:00:13 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-07-14 14:33:36 +0000
commitbb424dba670a2ecf01635f590bc8adc915b9f329 (patch)
tree9746aefc6e8b76bdc197b20818420fe1d5ad3a7c
parent9ab0c7173ec74a13a8f96249d82e199adc700409 (diff)
downloadchrome-ec-bb424dba670a2ecf01635f590bc8adc915b9f329.tar.gz
zephyr:test: Setup lpc_event_mask with correct events for CLEAR commands
lpc_event_mask is missing appropriate mask to allow proper setup to validate the CLEAR command. BUG=b:238768443 BRANCH=none TEST=zmake test test-drivers (shuffled) Signed-off-by: Al Semjonovs <asemjonovs@google.com> Change-Id: Iecd3425c4f1c6496b7d8d35265364349d171cc9d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3760656 Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
-rw-r--r--zephyr/test/drivers/src/host_cmd/host_event_commands.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/zephyr/test/drivers/src/host_cmd/host_event_commands.c b/zephyr/test/drivers/src/host_cmd/host_event_commands.c
index 48b4d1a059..8efcd6b302 100644
--- a/zephyr/test/drivers/src/host_cmd/host_event_commands.c
+++ b/zephyr/test/drivers/src/host_cmd/host_event_commands.c
@@ -211,8 +211,12 @@ ZTEST_USER(host_cmd_host_event_commands, test_host_event_clear__cmd)
enum ec_status ret_val;
host_event_t events;
host_event_t mask = EC_HOST_EVENT_MASK(EC_HOST_EVENT_KEYBOARD_RECOVERY);
+ host_event_t lpc_event_mask;
struct ec_response_host_event_mask response = { 0 };
+ lpc_event_mask = lpc_get_host_event_mask(LPC_HOST_EVENT_SMI);
+ lpc_set_host_event_mask(LPC_HOST_EVENT_SMI, lpc_event_mask | mask);
+
host_set_single_event(EC_HOST_EVENT_KEYBOARD_RECOVERY);
events = host_get_events();
@@ -236,10 +240,13 @@ ZTEST_USER(host_cmd_host_event_commands, test_host_event_clear_b_cmd)
enum ec_status ret_val;
host_event_t events_b;
host_event_t mask = EC_HOST_EVENT_MASK(EC_HOST_EVENT_KEYBOARD_RECOVERY);
-
+ host_event_t lpc_event_mask;
struct ec_response_host_event_mask response = { 0 };
struct ec_response_host_event result = { 0 };
+ lpc_event_mask = lpc_get_host_event_mask(LPC_HOST_EVENT_SMI);
+ lpc_set_host_event_mask(LPC_HOST_EVENT_SMI, lpc_event_mask | mask);
+
host_set_single_event(EC_HOST_EVENT_KEYBOARD_RECOVERY);
host_event_cmd_helper(EC_HOST_EVENT_GET, EC_HOST_EVENT_B, &result);