summaryrefslogtreecommitdiff
path: root/test/usb_pe_drp.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/usb_pe_drp.c')
-rw-r--r--test/usb_pe_drp.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/usb_pe_drp.c b/test/usb_pe_drp.c
index 10269db779..8138bb5ddf 100644
--- a/test/usb_pe_drp.c
+++ b/test/usb_pe_drp.c
@@ -189,6 +189,16 @@ test_static int test_send_caps_error_before_connected(void)
EC_SUCCESS, "%d");
mock_prl_message_sent(PORT0);
+ /*
+ * Cable soft reset is always issued after entry into Src/Snk_Ready
+ * simulate no cable response.
+ */
+ TEST_EQ(mock_prl_wait_for_tx_msg(PORT0, TCPC_TX_SOP_PRIME,
+ PD_CTRL_SOFT_RESET, 0,
+ 60 * MSEC),
+ EC_SUCCESS, "%d");
+ mock_prl_report_error(PORT0, ERR_TCH_XMIT, TCPC_TX_SOP_PRIME);
+
TEST_EQ(finish_src_discovery(), EC_SUCCESS, "%d");
task_wait_event(5 * SECOND);
@@ -225,6 +235,16 @@ test_static int test_send_caps_error_when_connected(void)
mock_prl_message_sent(PORT0);
/*
+ * Cable soft reset is always issued after entry into Src/Snk_Ready
+ * simulate no cable response.
+ */
+ TEST_EQ(mock_prl_wait_for_tx_msg(PORT0, TCPC_TX_SOP_PRIME,
+ PD_CTRL_SOFT_RESET, 0,
+ 60 * MSEC),
+ EC_SUCCESS, "%d");
+ mock_prl_report_error(PORT0, ERR_TCH_XMIT, TCPC_TX_SOP_PRIME);
+
+ /*
* Expect VENDOR_DEF for cable identity, simulate no cable (so no
* GoodCRC, so ERR_TCH_XMIT). Don't reply NOT_SUPPORTED, since the spec
* says a cable never does that.