Skip to content

Commit 00eb36d

Browse files
author
Tzung-Bi Shih
committed
platform/chrome: cros_ec_proto: change Kunit expectation when timed out
While EC_COMMS_STATUS_PROCESSING flag is still on after it tries EC_COMMAND_RETRIES times for sending EC_CMD_GET_COMMS_STATUS, cros_ec_wait_until_complete() doesn't return an error code. Change the expectation to an error code. Reviewed-by: Guenter Roeck <groeck@chromium.org> Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org> Link: https://lore.kernel.org/r/20220718050914.2267370-8-tzungbi@kernel.org
1 parent 0aad9af commit 00eb36d

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

drivers/platform/chrome/cros_ec_proto_test.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1870,9 +1870,7 @@ static void cros_ec_proto_test_cmd_xfer_in_progress_retries_status_processing(st
18701870
}
18711871

18721872
ret = cros_ec_cmd_xfer(ec_dev, &msg);
1873-
KUNIT_EXPECT_EQ(test, ret, sizeof(struct ec_response_get_comms_status));
1874-
1875-
KUNIT_EXPECT_EQ(test, msg.result, EC_RES_SUCCESS);
1873+
KUNIT_EXPECT_EQ(test, ret, -EAGAIN);
18761874

18771875
/* For EC_CMD_GET_COMMS_STATUS EC_COMMAND_RETRIES times. */
18781876
KUNIT_EXPECT_EQ(test, cros_kunit_ec_pkt_xfer_mock_called, 51);

0 commit comments

Comments
 (0)