summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiana Z <dzigterman@chromium.org>2022-04-27 14:06:37 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-05-03 18:44:53 +0000
commit8e7dc8805ff16bb7ae609f6b1a20fad437f1263b (patch)
tree6a689731dedc3d89a39b14c9e614477a19f4cc8d
parentece478cb27ee28931dc067d0700fe178eeeef323 (diff)
downloadchrome-ec-8e7dc8805ff16bb7ae609f6b1a20fad437f1263b.tar.gz
CTVPD: Fix unit test Discovery simulation
The CTVPD unit test sends DiscoverIdentity to itself, but was sending as a Source/UFP with no data role swap. Correct the header to be Source/DFP. BRANCH=None BUG=b:155418161 TEST=zmake testall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I73c217374faa6334e5539e37a5278393bd7c5376 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3612211 Reviewed-by: Scott Collyer <scollyer@chromium.org> Commit-Queue: Scott Collyer <scollyer@chromium.org>
-rw-r--r--test/usb_typec_ctvpd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/usb_typec_ctvpd.c b/test/usb_typec_ctvpd.c
index bbe433c0d9..583c529fca 100644
--- a/test/usb_typec_ctvpd.c
+++ b/test/usb_typec_ctvpd.c
@@ -337,7 +337,7 @@ static void simulate_goodcrc(int port, int role, int id)
static void simulate_discovery_identity(int port)
{
uint16_t header = PD_HEADER(PD_DATA_VENDOR_DEF, PD_ROLE_SOURCE,
- 0, pd_port[port].msg_rx_id,
+ 1, pd_port[port].msg_rx_id,
1, pd_port[port].rev, 0);
uint32_t msg = VDO(USB_SID_PD,
1, /* Structured VDM */