diff options
author | Aaron Massey <aaronmassey@google.com> | 2022-04-11 11:28:43 -0600 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-04-11 19:47:21 +0000 |
commit | 81933b47d4b3942f1a5fac14dcc50b8574991198 (patch) | |
tree | 008043bf26f4d4c6c26227e8335f003dd1de55e0 | |
parent | e8f04ef8e0d3ad8f4bd6afa1d54da88f4baf768f (diff) | |
download | chrome-ec-81933b47d4b3942f1a5fac14dcc50b8574991198.tar.gz |
zephyr: test: Correct port target for detach_src
The verify_detach_src test invokes a power info host command at the
wrong target port before asserting the appropriate PD power role.
Correct port target.
BRANCH=none
BUG=b:228850425
TEST=zmake test test-drivers
Signed-off-by: Aaron Massey <aaronmassey@google.com>
Change-Id: I5ecef2a19ec97f27bbb3312ed071d29018ac6238
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3581293
Reviewed-by: Yuval Peress <peress@google.com>
-rw-r--r-- | zephyr/test/drivers/src/integration/usbc/usb_attach_src_snk.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/zephyr/test/drivers/src/integration/usbc/usb_attach_src_snk.c b/zephyr/test/drivers/src/integration/usbc/usb_attach_src_snk.c index 4ed9dcb8d1..54598c4685 100644 --- a/zephyr/test/drivers/src/integration/usbc/usb_attach_src_snk.c +++ b/zephyr/test/drivers/src/integration/usbc/usb_attach_src_snk.c @@ -769,13 +769,13 @@ ZTEST_F(usb_detach_test, verify_detach_sink) ZTEST_F(usb_detach_test, verify_detach_source) { struct emul_state *fixture = &this->fixture; - struct ec_response_usb_pd_power_info pd_power_info = { 0 }; + struct ec_response_usb_pd_power_info pd_power_info = { SNK_PORT }; integration_usb_test_source_detach(fixture); k_sleep(K_SECONDS(10)); isl923x_emul_set_adc_vbus(fixture->charger_isl923x_emul, 0); - pd_power_info = host_cmd_power_info(SRC_PORT); + pd_power_info = host_cmd_power_info(SNK_PORT); /* Assert */ zassert_equal(pd_power_info.role, USB_PD_PORT_POWER_DISCONNECTED, |