diff options
author | Firas Sammoura <fsammoura@google.com> | 2022-06-17 16:40:54 +0000 |
---|---|---|
committer | Firas Sammoura <fsammoura@google.com> | 2022-06-17 16:40:54 +0000 |
commit | e5fb0b9ba488614b5684e640530f00821ab7b943 (patch) | |
tree | 9a15b4a98d7987870a1805a33883d0cf9123fc05 /zephyr/test/drivers/src/espi.c | |
parent | ad46fafb27c419bd416bfecc76df6c6426a99b32 (diff) | |
parent | a46d3f3feaac0d69012f61b66f652bff991d05a7 (diff) | |
download | chrome-ec-e5fb0b9ba488614b5684e640530f00821ab7b943.tar.gz |
Merge remote-tracking branch cros/main into firmware-fpmcu-bloonchipper-release
Generated by: ./util/update_release_branch.py --board bloonchipper --relevant_paths_file ./util/fingerprint-relevant-paths.txt firmware-fpmcu-bloonchipper-release
Relevant changes:
git log --oneline ad46fafb27..a46d3f3fea -- board/hatch_fp
board/bloonchipper common/fpsensor docs/fingerprint driver/fingerprint
util/getversion.sh
981fb88cf8 docs/fingerprint: Resolve contradictory FPMCU factory flashing instructions
38ef6b7306 tree: Files should end with single newline
60032a8828 docs/fingerprint: Clean up formatting in fingerprint-factory-quick-guide.md
f49eb6f894 docs/fingerprint: Run mdformat
64aa5fc7bb docs/fingerprint: Add links to info on fuzz testing
8bd99cc434 fpsensor: Use correct return type
2b2d7a991d fpsensor: Use correct return type
BRANCH=None
BUG=b:234772776 b:234181908 b:172020503 b:234181908
TEST=`make -j buildall`
Cq-Include-Trybots: chromeos/cq:cq-orchestrator
Signed-off-by: Firas Sammoura <fsammoura@google.com>
Change-Id: I18b58de542c8b439d0f9327a7d4f0ec897da080f
Diffstat (limited to 'zephyr/test/drivers/src/espi.c')
-rw-r--r-- | zephyr/test/drivers/src/espi.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/zephyr/test/drivers/src/espi.c b/zephyr/test/drivers/src/espi.c index 91746e7c45..67fc3c6f90 100644 --- a/zephyr/test/drivers/src/espi.c +++ b/zephyr/test/drivers/src/espi.c @@ -58,4 +58,25 @@ ZTEST_USER(espi, test_host_command_typec_status) zassert_equal(args.response_size, sizeof(response), NULL); } +ZTEST_USER(espi, test_host_command_usb_pd_get_amode) +{ + /* Only test we've enabled the command */ + struct ec_params_usb_pd_get_mode_request params = { + .port = PORT, + .svid_idx = 0, + }; + struct ec_params_usb_pd_get_mode_response response; + struct host_cmd_handler_args args = BUILD_HOST_COMMAND( + EC_CMD_USB_PD_GET_AMODE, 0, response, params); + + zassert_ok(host_command_process(&args), NULL); + zassert_ok(args.result, NULL); + /* Note: with no SVIDs the response size is the size of the svid field. + * See the usb alt mode test for verifying larger struct sizes + * + * TODO(b/219562077): Add the above described test. + */ + zassert_equal(args.response_size, sizeof(response.svid), NULL); +} + ZTEST_SUITE(espi, drivers_predicate_post_main, NULL, NULL, NULL, NULL); |