platform/chrome: Kunit tests and refactor for cros_ec_query_all()
Status from this message: This series was applied to chrome-platform/linux.git (for-kernelci)
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest21 patches 0 repliesApplied 21/21
- v323 patches 18 repliesSuperseded
- v215 patches 12 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 13 patches | 21 replies | Superseded |
Changes in v4 from the cover letter
(https://patchwork.kernel.org/project/chrome-platform/cover/[email protected]/)
- Drop 2 patches regarding din and dout. One of them crashes kernel.
- Fix typo in commit message.
Patches in v4 All 21 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/21 | platform/chrome: cros_ec_commands: fix compile errorsinclude/ | +2 | 0 replies | Applied |
| 2/21 | platform/chrome: cros_ec_proto: add Kunit tests for cros_ec_query_all()drivers/ drivers/ drivers/ +2 more | +943 | 0 replies | Applied |
| 3/21 | platform/chrome: use macros for passthru indexesdrivers/ drivers/ drivers/ +2 more | +20 | 0 replies | Applied |
| 4/21 | platform/chrome: cros_ec_proto: assign buffer size from protocol infodrivers/ | +2 | 0 replies | Applied |
| 5/21 | platform/chrome: cros_ec_proto: remove redundant NULL checkdrivers/ | +0 | 0 replies | Applied |
| 6/21 | platform/chrome: cros_ec_proto: use cros_ec_map_error()drivers/ | +4 | 0 replies | Applied |
| 7/21 | platform/chrome: cros_ec_proto: separate cros_ec_get_proto_info()drivers/ drivers/ | +93 | 0 replies | Applied |
| 8/21 | platform/chrome: cros_ec_proto: add Kunit tests for getting proto infodrivers/ | +132 | 0 replies | Applied |
| 9/21 | platform/chrome: cros_ec_proto: handle empty payload in getting proto infodrivers/ | +5 | 0 replies | Applied |
| 10/21 | platform/chrome: cros_ec_proto: separate cros_ec_get_proto_info_legacy()drivers/ drivers/ | +44 | 0 replies | Applied |
| 11/21 | platform/chrome: cros_ec_proto: add Kunit test for getting legacy infodrivers/ | +49 | 0 replies | Applied |
| 12/21 | platform/chrome: cros_ec_proto: handle empty payload in getting info legacydrivers/ | +9 | 0 replies | Applied |
| 13/21 | platform/chrome: cros_ec_proto: don't show MKBP version if unsupporteddrivers/ | +4 | 0 replies | Applied |
| 14/21 | platform/chrome: cros_ec_proto: return 0 on getting cmd mask successdrivers/ | +5 | 0 replies | Applied |
| 15/21 | platform/chrome: cros_ec_proto: add Kunit test for getting cmd mask errordrivers/ | +89 | 0 replies | Applied |
| 16/21 | platform/chrome: cros_ec_proto: check `msg->result` in getting cmd maskdrivers/ | +13 | 0 replies | Applied |
| 17/21 | platform/chrome: cros_ec_proto: add Kunit tests for getting cmd maskdrivers/ | +197 | 0 replies | Applied |
| 18/21 | platform/chrome: cros_ec_proto: handle empty payload in getting cmd maskdrivers/ | +5 | 0 replies | Applied |
| 19/21 | platform/chrome: cros_ec_proto: return 0 on getting wake mask successdrivers/ | +2 | 0 replies | Applied |
| 20/21 | platform/chrome: cros_ec_proto: add Kunit test for getting wake maskdrivers/ | +128 | 0 replies | Applied |
| 21/21 | platform/chrome: cros_ec_proto: handle empty payload in getting wake maskdrivers/ | +14 | 0 replies | Applied |
Reviews trailers per patch
All 21 patches have a Reviewed-by or Acked-by.
| Patch | Guenter Roeck |
|---|---|
| 1/21 | R-b |
| 2/21 | R-b |
| 3/21 | R-b |
| 4/21 | R-b |
| 5/21 | R-b |
| 6/21 | R-b |
| 7/21 | R-b |
| 8/21 | R-b |
| 9/21 | R-b |
| 10/21 | R-b |
| 11/21 | R-b |
| 12/21 | R-b |
| 13/21 | R-b |
| 14/21 | R-b |
| 15/21 | R-b |
| 16/21 | R-b |
| 17/21 | R-b |
| 18/21 | R-b |
| 19/21 | R-b |
| 20/21 | R-b |
| 21/21 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v4 00/21] platform/chrome: Kunit tests and refactor for cros_ec_query_all()
The series adds Kunit tests, refactors, and clean-ups for cros_ec_query_all().
Tzung-Bi Shih (21):
platform/chrome: cros_ec_commands: fix compile errors
-> Fixes compile errors when including cros_ec_commands.h.
platform/chrome: cros_ec_proto: add Kunit tests for
cros_ec_query_all()
-> Adds Kunit tests for cros_ec_query_all(). They are baseline tests
for the following refactor patches. They are designed to pass current code.
platform/chrome: use macros for passthru indexes platform/chrome: cros_ec_proto: assign buffer size from protocol info
-> Refactors.
platform/chrome: cros_ec_proto: remove redundant NULL check
-> Clean up.
platform/chrome: cros_ec_proto: use cros_ec_map_error()
-> Changes the internal return code.
platform/chrome: cros_ec_proto: separate cros_ec_get_proto_info()
-> Move refactor.
platform/chrome: cros_ec_proto: add Kunit tests for getting proto info platform/chrome: cros_ec_proto: handle empty payload in getting proto
info
-> Test and handle if send_command() returns 0 in cros_ec_get_proto_info().
platform/chrome: cros_ec_proto: separate
cros_ec_get_proto_info_legacy()
-> Move refactor.
platform/chrome: cros_ec_proto: add Kunit test for getting legacy info platform/chrome: cros_ec_proto: handle empty payload in getting info
legacy
-> Test and handle if send_command() returns 0 in
cros_ec_get_proto_info_legacy().
platform/chrome: cros_ec_proto: don't show MKBP version if unsupported
-> Minor fix up.
platform/chrome: cros_ec_proto: return 0 on getting cmd mask success
-> Conform to kernel convention: return 0 on success;
otherwise, negative integers.
platform/chrome: cros_ec_proto: add Kunit test for getting cmd mask
error
platform/chrome: cros_ec_proto: check msg->result in getting cmd
mask
-> Test and handle if msg->result isn't EC_RES_SUCCESS in
cros_ec_get_host_command_version_mask().
platform/chrome: cros_ec_proto: add Kunit tests for getting cmd mask platform/chrome: cros_ec_proto: handle empty payload in getting cmd
mask
-> Test and handle if send_command() returns 0 in
cros_ec_get_host_command_version_mask().
platform/chrome: cros_ec_proto: return 0 on getting wake mask success
-> Conform to kernel convention: return 0 on success;
otherwise, negative integers.
platform/chrome: cros_ec_proto: add Kunit test for getting wake mask platform/chrome: cros_ec_proto: handle empty payload in getting wake
mask
-> Test and handle if send_command() returns 0 in
cros_ec_get_host_event_wake_mask().
drivers/platform/chrome/Kconfig | 6 + drivers/platform/chrome/Makefile | 1 + drivers/platform/chrome/cros_ec.c | 3 - drivers/platform/chrome/cros_ec_proto.c | 291 ++-- drivers/platform/chrome/cros_ec_proto_test.c | 1402 +++++++++++++++++ drivers/platform/chrome/cros_ec_trace.h | 8 +- drivers/platform/chrome/cros_kunit_util.c | 98 ++ drivers/platform/chrome/cros_kunit_util.h | 36 + .../linux/platform_data/cros_ec_commands.h | 4 +- include/linux/platform_data/cros_ec_proto.h | 3 + 10 files changed, 1700 insertions(+), 152 deletions(-) create mode 100644 drivers/platform/chrome/cros_kunit_util.c create mode 100644 drivers/platform/chrome/cros_kunit_util.h
Changes from v3:
(https://patchwork.kernel.org/project/chrome-platform/cover/[email protected]/)
- Drop 2 patches regarding din and dout. One of them crashes kernel.
- Fix typo in commit message.
Changes from v2:
(https://patchwork.kernel.org/project/chrome-platform/cover/[email protected]/)
- Split patches into smaller pieces.
Changes from v1:
(https://patchwork.kernel.org/project/chrome-platform/cover/[email protected]/)
- Fix review comments.
- Split and reorder patches.
Signature · 1 line
2.36.1.255.ge46751e96f-goog