From c081674ce5637d709ad6e8f77c060bab94ec992e Mon Sep 17 00:00:00 2001 From: Diana Z Date: Wed, 12 Oct 2022 15:56:20 -0600 Subject: Zephyr test: Add verification of AP mux control flag Add code to verify our AP mux control flag is being set when this feature is enabled. BRANCH=None BUG=None TEST=./twister -T ./zephyr/test Signed-off-by: Diana Z Change-Id: I2c4dcd791c4150e02a4a1985af641ddf3b1ab8ba Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3953481 Reviewed-by: Aaron Massey Code-Coverage: Zoss --- zephyr/test/drivers/ap_mux_control/src/ap_mux_control.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/zephyr/test/drivers/ap_mux_control/src/ap_mux_control.c b/zephyr/test/drivers/ap_mux_control/src/ap_mux_control.c index 49c695b830..d059870f25 100644 --- a/zephyr/test/drivers/ap_mux_control/src/ap_mux_control.c +++ b/zephyr/test/drivers/ap_mux_control/src/ap_mux_control.c @@ -40,6 +40,15 @@ static void ap_mux_control_after(void *data) ZTEST_SUITE(ap_mux_control, drivers_predicate_post_main, NULL, ap_mux_control_before, ap_mux_control_after, NULL); +ZTEST(ap_mux_control, test_feature_present) +{ + struct ec_response_get_features feat = host_cmd_get_features(); + + zassert_true(feat.flags[1] & + EC_FEATURE_MASK_1(EC_FEATURE_TYPEC_AP_MUX_SET), + "Failed to see feature present"); +} + ZTEST(ap_mux_control, test_set_muxes) { struct ec_response_typec_status status; -- cgit v1.2.1