diff options
author | Peter Marheine <pmarheine@chromium.org> | 2023-02-16 00:14:21 +0000 |
---|---|---|
committer | Peter Marheine <pmarheine@chromium.org> | 2023-02-16 00:14:21 +0000 |
commit | f43d6df6f2860dbe8ec15aebdc28890771ad7897 (patch) | |
tree | 6877eff7016f9979e46017ea5221a16d36344304 /zephyr/test/drivers/default | |
parent | dce247e97903a2464ff8884106bffa43587c1dcb (diff) | |
parent | 0849542c72359150a357945c010dca6b5a213633 (diff) | |
download | chrome-ec-f43d6df6f2860dbe8ec15aebdc28890771ad7897.tar.gz |
Merge remote-tracking branch cros/main into firmware-nissa-15217.B-mainfirmware-nissa-15217.126.B-main
Generated by: ./util/update_release_branch.py --zephyr --board nissa firmware-
nissa-15217.B-main
Relevant changes:
git log --oneline dce247e979..0849542c72 -- zephyr/program/nissa
util/getversion.sh
0849542c72 zephyr: add sleep property for keyboard factory test
5825d894b9 nissa: disable PLATFORM_EC_TCPC_INTERRUPT
25a400690f yavikso: Update fan table version 3
9263f14536 zephyr: remove shi node and add references to shi0
b40c6970d3 Craask: Charger limit for 65w adapter
6fd2d3ea6c zephyr: add comments for tcpc driver
00986ffb1c zephyr: move usbc interrupt handler to shim
2508094b14 yaviks: reduce RW image size (64KB)
55b6aaf52f yaviks: enable keyboard factory test
4786d1eac6 nissa: Add ocpc init function to Nissa boards
2ae1083638 zephyr: cros_kb: set KSI/KSO kbs mode by pinctrl driver
d415f4665a yaviks: Fix OCPC Vsys overshooting
93f9d42a7c zephyr: config: drop few more redundant options
BRANCH=None
BUG=b:254148652 b:260762509 b:265220075 b:268273712 b:265763662
BUG=b:253557900 b:254148652 b:269212593 b:267404783 b:262352202
TEST=`make -j buildall`
Force-Relevant-Builds: all
Change-Id: I195dd82af114180b611f9afd1465a69f7f43d417
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Diffstat (limited to 'zephyr/test/drivers/default')
5 files changed, 15 insertions, 54 deletions
diff --git a/zephyr/test/drivers/default/src/console_cmd/CMakeLists.txt b/zephyr/test/drivers/default/src/console_cmd/CMakeLists.txt index 7fdabd1c52..b4ed741430 100644 --- a/zephyr/test/drivers/default/src/console_cmd/CMakeLists.txt +++ b/zephyr/test/drivers/default/src/console_cmd/CMakeLists.txt @@ -18,7 +18,6 @@ target_sources(app PRIVATE accelread.c accelres.c button.c - crash.c cutoff.c ec_features.c gpio.c diff --git a/zephyr/test/drivers/default/src/console_cmd/crash.c b/zephyr/test/drivers/default/src/console_cmd/crash.c deleted file mode 100644 index 4218aa74d6..0000000000 --- a/zephyr/test/drivers/default/src/console_cmd/crash.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright 2022 The ChromiumOS Authors - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#include "builtin/assert.h" -#include "console.h" -#include "test/drivers/test_mocks.h" -#include "test/drivers/test_state.h" - -#include <zephyr/shell/shell.h> -#include <zephyr/ztest.h> - -ZTEST_SUITE(console_cmd_crash, drivers_predicate_post_main, NULL, NULL, NULL, - NULL); - -ZTEST_USER(console_cmd_crash, test_wrong_num_args) -{ - int rv = shell_execute_cmd(get_ec_shell(), "crash"); - - zassert_equal(EC_ERROR_PARAM1, rv, "Expected %d, but got %d", - EC_ERROR_PARAM1, rv); -} - -ZTEST_USER(console_cmd_crash, test_assert) -{ - int rv; - - RESET_FAKE(assert_post_action); - rv = shell_execute_cmd(get_ec_shell(), "crash assert"); - - zassert_equal(EC_ERROR_UNKNOWN, rv, NULL); - zassert_equal(1, assert_post_action_fake.call_count, NULL); -} diff --git a/zephyr/test/drivers/default/src/espi.c b/zephyr/test/drivers/default/src/espi.c index e526980ef1..d81718d422 100644 --- a/zephyr/test/drivers/default/src/espi.c +++ b/zephyr/test/drivers/default/src/espi.c @@ -77,25 +77,6 @@ ZTEST_USER(espi, test_host_command_typec_status) zassert_equal(args.response_size, sizeof(response)); } -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)); - zassert_ok(args.result); - /* 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 - */ - zassert_equal(args.response_size, sizeof(response.svid)); -} - ZTEST_USER(espi, test_host_command_gpio_get_v0) { struct ec_params_gpio_get p = { diff --git a/zephyr/test/drivers/default/src/integration/usbc/usb_pd_ctrl_msg.c b/zephyr/test/drivers/default/src/integration/usbc/usb_pd_ctrl_msg.c index 1d3da4921f..0e5d3eecad 100644 --- a/zephyr/test/drivers/default/src/integration/usbc/usb_pd_ctrl_msg.c +++ b/zephyr/test/drivers/default/src/integration/usbc/usb_pd_ctrl_msg.c @@ -213,6 +213,9 @@ ZTEST_F(usb_pd_ctrl_msg_test_sink, verify_pr_swap) snk_resp = host_cmd_typec_status(TEST_USB_PORT); zassert_equal(PD_ROLE_SOURCE, snk_resp.power_role, "SNK Returned power_role=%u", snk_resp.power_role); + + tcpci_partner_common_handler_mask_msg(&super_fixture->partner_emul, + PD_CTRL_ACCEPT, false); } /** diff --git a/zephyr/test/drivers/default/src/isl923x.c b/zephyr/test/drivers/default/src/isl923x.c index 1393466c76..8dbfdf530b 100644 --- a/zephyr/test/drivers/default/src/isl923x.c +++ b/zephyr/test/drivers/default/src/isl923x.c @@ -720,6 +720,18 @@ ZTEST(isl923x, test_isl923x_is_acok) rv = raa489000_is_acok(CHARGER_NUM, &acok); zassert_equal(EC_SUCCESS, rv, "AC OK check did not return success"); zassert_false(acok, "AC OK is true"); + + /* + * Charger is sourcing - ACOK is always false, + * even if the pin is asserted. + */ + raa489000_emul_set_acok_pin(isl923x_emul, 1); + raa489000_emul_set_state_machine_state(isl923x_emul, + RAA489000_INFO2_STATE_OTG); + + rv = raa489000_is_acok(CHARGER_NUM, &acok); + zassert_equal(EC_SUCCESS, rv, "AC OK check did not return success"); + zassert_false(acok, "ACOK is true when sourcing, expected false"); } ZTEST(isl923x, test_isl923x_enable_asgate) |