platform/chrome: cros_ec_proto: add Kunit tests for cros_ec_check_result()
authorTzung-Bi Shih <tzungbi@kernel.org>
Wed, 18 May 2022 09:18:14 +0000 (17:18 +0800)
committerTzung-Bi Shih <tzungbi@kernel.org>
Mon, 6 Jun 2022 03:11:37 +0000 (03:11 +0000)
commit4319cbd4ed99003e0c981728ab1626c25be7af4a
tree7417e1d373f58cd2b4ece667515e7d4c4c553098
parent97b11dd6350a1d5fb076df69ebbf504eb5c4fd57
platform/chrome: cros_ec_proto: add Kunit tests for cros_ec_check_result()

cros_ec_check_result() is used to check if the EC communication success but
EC responded EC_RES_IN_PROGRESS.  It should return 0 even if EC wasn't
happy about the host command.

Add Kunit tests for cros_ec_check_result().

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