]> git.baikalelectronics.ru Git - kernel.git/commit
platform/chrome: cros_ec_proto: add Kunit test for empty payload
authorTzung-Bi Shih <tzungbi@kernel.org>
Mon, 18 Jul 2022 05:09:13 +0000 (05:09 +0000)
committerTzung-Bi Shih <tzungbi@kernel.org>
Wed, 20 Jul 2022 01:22:58 +0000 (01:22 +0000)
commit0dcf56cc586354d8ae21432e693d188de2d811f4
tree9df6312360abd77b42998642e486a91a5f5dd27b
parent7ad2d431bbe6964acd5322efc081ccd9ffd56e8b
platform/chrome: cros_ec_proto: add Kunit test for empty payload

cros_ec_wait_until_complete() sends EC_CMD_GET_COMMS_STATUS which expects
to receive sizeof(struct ec_response_get_comms_status) from
cros_ec_xfer_command().

Add Kunit test and expect to receive an error code when
cros_ec_xfer_command() returns 0.

Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Link: https://lore.kernel.org/r/20220718050914.2267370-10-tzungbi@kernel.org
drivers/platform/chrome/cros_ec_proto_test.c