diff options
author | Caveh Jalali <caveh@chromium.org> | 2022-08-30 00:03:12 -0700 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-09-01 22:41:45 +0000 |
commit | 2e864b253903b8fbcfa509113be2407e76daea2e (patch) | |
tree | e383593749ba7d726dcdb45e30c2098a47bb4a05 /test | |
parent | 76789c78aff4a73c2dc0aca526267714fffb075b (diff) | |
download | chrome-ec-2e864b253903b8fbcfa509113be2407e76daea2e.tar.gz |
tree-wide: const-ify argv for console commands
This updates the API for console commands
from "int cmd(int argc, char **argv)"
to "int cmd(int argc, const char **argv)"
which is more accurate and in line with common convention.
BRANCH=none
BUG=b:244387210
TEST="make buildall" passes
TEST="zmake build -a" passes
TEST="util/compare_build.sh -b all" passes
TEST="./twister -v -T zephyr/test" passes
Cq-Depend: chrome-internal:4960125
Cq-Depend: chrome-internal:4959932
Change-Id: I57de9f35b85b8f3c7119df36aefb2abf25d2625f
Signed-off-by: Caveh Jalali <caveh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3863941
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'test')
101 files changed, 137 insertions, 138 deletions
diff --git a/test/aes.c b/test/aes.c index 50160f38a0..51acf51bd3 100644 --- a/test/aes.c +++ b/test/aes.c @@ -568,7 +568,7 @@ static void test_aes_speed(void) ccprintf("AES duration %lld us\n", (long long)(t1.val - t0.val)); } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { watchdog_reload(); diff --git a/test/battery_get_params_smart.c b/test/battery_get_params_smart.c index d60be9a5bc..087a0b8d5c 100644 --- a/test/battery_get_params_smart.c +++ b/test/battery_get_params_smart.c @@ -86,7 +86,7 @@ static int test_param_failures(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { RUN_TEST(test_param_failures); diff --git a/test/bklight_lid.c b/test/bklight_lid.c index 99167a71a6..992182f50d 100644 --- a/test/bklight_lid.c +++ b/test/bklight_lid.c @@ -95,7 +95,7 @@ static int test_hostcommand(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/bklight_passthru.c b/test/bklight_passthru.c index 170cc734cd..fbddc002ba 100644 --- a/test/bklight_passthru.c +++ b/test/bklight_passthru.c @@ -129,7 +129,7 @@ static int test_hostcommand(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/body_detection.c b/test/body_detection.c index 4a6e5a7c90..489f79ea0f 100644 --- a/test/body_detection.c +++ b/test/body_detection.c @@ -105,7 +105,7 @@ static int test_body_detect(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/button.c b/test/button.c index 9e06246d7f..66aa491a61 100644 --- a/test/button.c +++ b/test/button.c @@ -272,7 +272,7 @@ static void button_test_init(void) button_state[i] = UNCHANGED; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/cec.c b/test/cec.c index 28464dfab0..d03131a4fe 100644 --- a/test/cec.c +++ b/test/cec.c @@ -114,7 +114,7 @@ static int test_queue_overflow(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { queue = &overflow_queue.queue; diff --git a/test/charge_manager.c b/test/charge_manager.c index d1270da0aa..fcf00a5f10 100644 --- a/test/charge_manager.c +++ b/test/charge_manager.c @@ -782,7 +782,7 @@ static int test_unknown_dualrole_capability(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/charge_ramp.c b/test/charge_ramp.c index 6356b44c57..1cc0a90e42 100644 --- a/test/charge_ramp.c +++ b/test/charge_ramp.c @@ -496,7 +496,7 @@ static int test_ramp_limit(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/chipset.c b/test/chipset.c index caad08b52e..c2e915b941 100644 --- a/test/chipset.c +++ b/test/chipset.c @@ -22,7 +22,7 @@ static int test_get_shutdown_reason(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/compile_time_macros.c b/test/compile_time_macros.c index f02fc366a4..326a5cd3bf 100644 --- a/test/compile_time_macros.c +++ b/test/compile_time_macros.c @@ -105,7 +105,7 @@ test_static int test_IS_ARRAY(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/console_edit.c b/test/console_edit.c index 20a553b81a..7133d58c3a 100644 --- a/test/console_edit.c +++ b/test/console_edit.c @@ -16,14 +16,14 @@ static int cmd_1_call_cnt; static int cmd_2_call_cnt; -static int command_test_1(int argc, char **argv) +static int command_test_1(int argc, const char **argv) { cmd_1_call_cnt++; return EC_SUCCESS; } DECLARE_CONSOLE_COMMAND(test1, command_test_1, NULL, NULL); -static int command_test_2(int argc, char **argv) +static int command_test_2(int argc, const char **argv) { cmd_2_call_cnt++; return EC_SUCCESS; @@ -314,7 +314,7 @@ static int test_buf_notify_null(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/cortexm_fpu.c b/test/cortexm_fpu.c index a5e944f9d0..153fe3b789 100644 --- a/test/cortexm_fpu.c +++ b/test/cortexm_fpu.c @@ -158,7 +158,7 @@ test_static int test_cortexm_fpu_inexact(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/crc.c b/test/crc.c index b757d117e6..c025dc3e9d 100644 --- a/test/crc.c +++ b/test/crc.c @@ -83,7 +83,7 @@ static int test_cros_crc8(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/debug.c b/test/debug.c index 0a742ff773..604eefa557 100644 --- a/test/debug.c +++ b/test/debug.c @@ -22,7 +22,7 @@ test_static int test_debugger_is_connected(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/entropy.c b/test/entropy.c index 5fdca3969f..ecd0ff9a30 100644 --- a/test/entropy.c +++ b/test/entropy.c @@ -29,7 +29,7 @@ uint32_t log2(int32_t val) return log2_mult * (val1 + val2) / 2; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { const int loopcount = 512; diff --git a/test/extpwr_gpio.c b/test/extpwr_gpio.c index d1f77c9167..ec25eaf5ed 100644 --- a/test/extpwr_gpio.c +++ b/test/extpwr_gpio.c @@ -51,7 +51,7 @@ static int test_hook(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/fan.c b/test/fan.c index a3d53f470c..a781c348d6 100644 --- a/test/fan.c +++ b/test/fan.c @@ -104,7 +104,7 @@ static int test_fan(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { RUN_TEST(test_fan); diff --git a/test/flash.c b/test/flash.c index c571c4e05f..c6bc6f711b 100644 --- a/test/flash.c +++ b/test/flash.c @@ -503,7 +503,7 @@ int task_test(void *data) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { msleep(30); /* Wait for TASK_ID_TEST to initialize */ task_wake(TASK_ID_TEST); diff --git a/test/flash_physical.c b/test/flash_physical.c index 9c8277de7c..f59c709e86 100644 --- a/test/flash_physical.c +++ b/test/flash_physical.c @@ -118,7 +118,7 @@ test_static int test_flash_config(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { ccprintf("Running flash physical test\n"); RUN_TEST(test_flash_config); diff --git a/test/flash_write_protect.c b/test/flash_write_protect.c index b8d729331d..8361338186 100644 --- a/test/flash_write_protect.c +++ b/test/flash_write_protect.c @@ -130,7 +130,7 @@ int task_test(void *unused) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { msleep(30); /* Wait for TASK_ID_TEST to initialize */ task_wake(TASK_ID_TEST); @@ -368,7 +368,7 @@ test_static int test_isinf(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/fpsensor.c b/test/fpsensor.c index 1e7015882d..b7f3ee2c5a 100644 --- a/test/fpsensor.c +++ b/test/fpsensor.c @@ -84,7 +84,7 @@ test_static int test_host_command_protocol_info_spi(void) FP_TRANSPORT_TYPE_SPI, &expected_info[FP_TRANSPORT_TYPE_SPI]); } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { if (IS_ENABLED(HAS_TASK_FPSENSOR)) { /* TODO(b/171924356): The "emulator" build only builds RO and diff --git a/test/fpsensor_crypto.c b/test/fpsensor_crypto.c index 81bb9428d1..b912acd7d1 100644 --- a/test/fpsensor_crypto.c +++ b/test/fpsensor_crypto.c @@ -749,7 +749,7 @@ test_static int test_command_read_match_secret_unreadable(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { RUN_TEST(test_hkdf_expand); RUN_TEST(test_derive_encryption_key_failure_seed_not_set); diff --git a/test/fpsensor_hw.c b/test/fpsensor_hw.c index 306046e2a2..a0eb297b77 100644 --- a/test/fpsensor_hw.c +++ b/test/fpsensor_hw.c @@ -32,7 +32,7 @@ test_static int test_fp_check_hwid(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { RUN_TEST(test_fp_check_hwid); test_print_result(); diff --git a/test/fpsensor_state.c b/test/fpsensor_state.c index 3822fe49ab..66936af7ca 100644 --- a/test/fpsensor_state.c +++ b/test/fpsensor_state.c @@ -186,7 +186,7 @@ test_static int test_fp_set_maintenance_mode(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { RUN_TEST(test_fp_enc_status_valid_flags); RUN_TEST(test_fp_tpm_seed_not_set); diff --git a/test/gyro_cal.c b/test/gyro_cal.c index 3b55ab86d4..64233086f0 100644 --- a/test/gyro_cal.c +++ b/test/gyro_cal.c @@ -495,7 +495,7 @@ static int test_gyro_cal_remove_bias(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/hooks.c b/test/hooks.c index e47ebf43dc..00731772b0 100644 --- a/test/hooks.c +++ b/test/hooks.c @@ -156,7 +156,7 @@ static int test_repeating_deferred(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/host_command.c b/test/host_command.c index 17637b52de..b50c405aab 100644 --- a/test/host_command.c +++ b/test/host_command.c @@ -306,7 +306,7 @@ static int test_hostcmd_clears_unused_data(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { wait_for_task_started(); test_reset(); diff --git a/test/i2c_bitbang.c b/test/i2c_bitbang.c index 41ae383d78..e77bc3a6fb 100644 --- a/test/i2c_bitbang.c +++ b/test/i2c_bitbang.c @@ -182,7 +182,7 @@ static int test_i2c_write(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/inductive_charging.c b/test/inductive_charging.c index 7892c7fab4..f5a81be4f1 100644 --- a/test/inductive_charging.c +++ b/test/inductive_charging.c @@ -157,7 +157,7 @@ static int test_debounce_charge_done(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/interrupt.c b/test/interrupt.c index ca98309e1f..1e51770189 100644 --- a/test/interrupt.c +++ b/test/interrupt.c @@ -88,7 +88,7 @@ static int test_wait_for_ready(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/irq_locking.c b/test/irq_locking.c index 6d08b1175d..96a615b560 100644 --- a/test/irq_locking.c +++ b/test/irq_locking.c @@ -71,7 +71,7 @@ void before_test(void) interrupt_enable_count = 0; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/is_enabled.c b/test/is_enabled.c index 4813eb4734..943f6bc7fc 100644 --- a/test/is_enabled.c +++ b/test/is_enabled.c @@ -24,7 +24,7 @@ static int test_blank(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/is_enabled_error.c b/test/is_enabled_error.c index 45ab4ed6bd..413f19308b 100644 --- a/test/is_enabled_error.c +++ b/test/is_enabled_error.c @@ -17,7 +17,7 @@ static int test_invalid_value(void) return EC_ERROR_UNKNOWN; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/kasa.c b/test/kasa.c index 6dea8a20e7..a10717be7d 100644 --- a/test/kasa.c +++ b/test/kasa.c @@ -62,7 +62,7 @@ static int test_kasa_calculate(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/kb_8042.c b/test/kb_8042.c index 6ca67b56ab..e660d3753c 100644 --- a/test/kb_8042.c +++ b/test/kb_8042.c @@ -953,7 +953,7 @@ static int test_vivaldi_top_keys(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); wait_for_task_started(); diff --git a/test/kb_mkbp.c b/test/kb_mkbp.c index 7d73479382..3e11559cf5 100644 --- a/test/kb_mkbp.c +++ b/test/kb_mkbp.c @@ -286,7 +286,7 @@ int fifo_underrun(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { ec_int_level = 1; test_reset(); diff --git a/test/kb_scan.c b/test/kb_scan.c index 57d16bc73d..99361c6c8e 100644 --- a/test/kb_scan.c +++ b/test/kb_scan.c @@ -645,7 +645,7 @@ int test_task(void *data) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { msleep(30); /* Wait for TASK_ID_TEST to initialize */ task_wake(TASK_ID_TEST); diff --git a/test/lid_sw.c b/test/lid_sw.c index 8163f74716..320e63fabb 100644 --- a/test/lid_sw.c +++ b/test/lid_sw.c @@ -83,7 +83,7 @@ static int test_debounce(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/lightbar.c b/test/lightbar.c index 3818c30684..ba0fb1b2c4 100644 --- a/test/lightbar.c +++ b/test/lightbar.c @@ -316,7 +316,7 @@ test_static int test_als_lightbar(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { /* Ensure tasks are started before running tests */ usleep(SECOND); diff --git a/test/mag_cal.c b/test/mag_cal.c index 40b71a2d34..7255e7d062 100644 --- a/test/mag_cal.c +++ b/test/mag_cal.c @@ -63,7 +63,7 @@ static int test_mag_cal_computes_bias(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/math_util.c b/test/math_util.c index 0188384b2a..558cb3e40a 100644 --- a/test/math_util.c +++ b/test/math_util.c @@ -120,7 +120,7 @@ test_static int test_temp_conversion(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/motion_angle.c b/test/motion_angle.c index 06a896fbdd..efd00d7226 100644 --- a/test/motion_angle.c +++ b/test/motion_angle.c @@ -88,7 +88,7 @@ static int test_lid_angle_less180(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/motion_angle_tablet.c b/test/motion_angle_tablet.c index 1265a973f7..9ec68eb82c 100644 --- a/test/motion_angle_tablet.c +++ b/test/motion_angle_tablet.c @@ -95,7 +95,7 @@ static int test_lid_angle_less180(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/motion_lid.c b/test/motion_lid.c index a241612c12..2c386b0a91 100644 --- a/test/motion_lid.c +++ b/test/motion_lid.c @@ -315,7 +315,7 @@ static int test_lid_angle(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/motion_sense_fifo.c b/test/motion_sense_fifo.c index f2ad86a951..647c255ba1 100644 --- a/test/motion_sense_fifo.c +++ b/test/motion_sense_fifo.c @@ -427,7 +427,7 @@ void before_test(void) motion_sense_fifo_reset(); } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); motion_sense_fifo_init(); diff --git a/test/mpu.c b/test/mpu.c index 0ace4ee710..bac6af09c5 100644 --- a/test/mpu.c +++ b/test/mpu.c @@ -172,7 +172,7 @@ test_static int test_mpu_get_rw_regions(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { enum ec_image cur_image = system_get_image_copy(); diff --git a/test/mutex.c b/test/mutex.c index bd0e033453..0ea8563e2e 100644 --- a/test/mutex.c +++ b/test/mutex.c @@ -110,7 +110,7 @@ int mutex_main_task(void *unused) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { wait_for_task_started(); task_wake(TASK_ID_MTX1); diff --git a/test/newton_fit.c b/test/newton_fit.c index 9648fbfd9a..3a82c56085 100644 --- a/test/newton_fit.c +++ b/test/newton_fit.c @@ -126,7 +126,7 @@ static int test_newton_fit_calculate(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/nvidia_gpu.c b/test/nvidia_gpu.c index d9136cf6c7..22f31be8d0 100644 --- a/test/nvidia_gpu.c +++ b/test/nvidia_gpu.c @@ -201,7 +201,7 @@ static void board_gpu_init(void) } DECLARE_HOOK(HOOK_INIT, board_gpu_init, HOOK_PRIO_DEFAULT); -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { memmap_gpu = (uint8_t *)host_get_memmap(EC_MEMMAP_GPU); diff --git a/test/online_calibration.c b/test/online_calibration.c index 8a9215caa3..1923210117 100644 --- a/test/online_calibration.c +++ b/test/online_calibration.c @@ -227,7 +227,7 @@ void before_test(void) online_calibration_init(); } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/online_calibration_spoof.c b/test/online_calibration_spoof.c index 66ef5d01de..64741d0f04 100644 --- a/test/online_calibration_spoof.c +++ b/test/online_calibration_spoof.c @@ -184,7 +184,7 @@ void before_test(void) gyro_cal_initialization_for_test(&gyro_cal_data); } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/panic_data.c b/test/panic_data.c index 8b8aa07460..ef902e9141 100644 --- a/test/panic_data.c +++ b/test/panic_data.c @@ -132,7 +132,7 @@ int task_test(void *unused) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); msleep(30); /* Wait for TASK_ID_TEST to initialize */ diff --git a/test/pingpong.c b/test/pingpong.c index 9d3a7ed7af..9150d23755 100644 --- a/test/pingpong.c +++ b/test/pingpong.c @@ -60,7 +60,7 @@ int task_tick(void *data) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { wait_for_task_started(); task_wake(TASK_ID_TICK); diff --git a/test/power_button.c b/test/power_button.c index 5fe9136105..536ea6d595 100644 --- a/test/power_button.c +++ b/test/power_button.c @@ -89,7 +89,7 @@ static int test_debounce(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/printf.c b/test/printf.c index 2a571be54f..ef9229688c 100644 --- a/test/printf.c +++ b/test/printf.c @@ -674,7 +674,7 @@ test_static int test_uint64_to_str(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/queue.c b/test/queue.c index f25906ca6d..ecbfa9dec4 100644 --- a/test/queue.c +++ b/test/queue.c @@ -414,7 +414,7 @@ void before_test(void) queue_init(&test_queue8); } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/rgb_keyboard.c b/test/rgb_keyboard.c index 1c6f235e16..9d5d8e6c82 100644 --- a/test/rgb_keyboard.c +++ b/test/rgb_keyboard.c @@ -212,7 +212,7 @@ static int test_rgbkbd_startup(void) return EC_SUCCESS; } -int cc_rgb(int argc, char **argv); +int cc_rgb(int argc, const char **argv); extern enum ec_rgbkbd_demo demo; static int test_rgbkbd_console_command(void) @@ -222,10 +222,10 @@ static int test_rgbkbd_console_command(void) char buf[8]; int i, x, y, r, c; uint8_t offset; - char *argv_demo[] = { "rgbk", "demo", "0" }; - char *argv_gcc[] = { "rgbk", "100" }; - char *argv_color[] = { "rgbk", buf, "0x010203" }; - char *argv_all[] = { "rgbk", "all", "0x010203" }; + const char *argv_demo[] = { "rgbk", "demo", "0" }; + const char *argv_gcc[] = { "rgbk", "100" }; + const char *argv_color[] = { "rgbk", buf, "0x010203" }; + const char *argv_all[] = { "rgbk", "all", "0x010203" }; /* Test 'rgbk demo 0'. */ before_test(); @@ -342,7 +342,7 @@ static int test_rgbkbd_rotate_color(void) static int test_rgbkbd_demo_flow(void) { struct rgb_s copy[ARRAY_SIZE(rgbkbds)][RGB_GRID0_COL * RGB_GRID0_ROW]; - char *argv_demo[] = { "rgbk", "demo", "1" }; + const char *argv_demo[] = { "rgbk", "demo", "1" }; struct rgb_s *p; int argc; struct rgbkbd *ctx; @@ -387,7 +387,7 @@ static int test_rgbkbd_demo_flow(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { RUN_TEST(test_rgbkbd_startup); RUN_TEST(test_rgbkbd_console_command); diff --git a/test/rollback.c b/test/rollback.c index 1300e8105b..da2e194202 100644 --- a/test/rollback.c +++ b/test/rollback.c @@ -105,7 +105,7 @@ test_static int test_lock_rollback_region_1(void) return _test_lock_rollback(&rollback_info, 1); } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { if (argc < 2) { ccprintf("usage: runtest [region0|region1]\n"); diff --git a/test/rollback_entropy.c b/test/rollback_entropy.c index ce846e80a5..88626e16c2 100644 --- a/test/rollback_entropy.c +++ b/test/rollback_entropy.c @@ -182,7 +182,7 @@ test_static int test_add_entropy(void) return rv; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { ccprintf("Running rollback_entropy test\n"); RUN_TEST(test_add_entropy); diff --git a/test/rsa.c b/test/rsa.c index 73c6ae0bfa..85a616d2ba 100644 --- a/test/rsa.c +++ b/test/rsa.c @@ -23,7 +23,7 @@ static uint32_t rsa_workbuf[3 * RSANUMBYTES / 4]; -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { int good; diff --git a/test/rtc.c b/test/rtc.c index d7f20f831f..c9c5ed2811 100644 --- a/test/rtc.c +++ b/test/rtc.c @@ -95,7 +95,7 @@ static int test_time_conversion(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { RUN_TEST(test_time_conversion); diff --git a/test/sbs_charging_v2.c b/test/sbs_charging_v2.c index 2a76229a76..20d06368d0 100644 --- a/test/sbs_charging_v2.c +++ b/test/sbs_charging_v2.c @@ -942,7 +942,7 @@ static int test_battery_sustainer_discharge_idle(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { RUN_TEST(test_charge_state); RUN_TEST(test_low_battery); diff --git a/test/scratchpad.c b/test/scratchpad.c index 1bea76f7a1..8bc68de91b 100644 --- a/test/scratchpad.c +++ b/test/scratchpad.c @@ -27,7 +27,7 @@ test_static int test_scratchpad(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { RUN_TEST(test_scratchpad); test_print_result(); diff --git a/test/sha256.c b/test/sha256.c index 955167f53a..14557bd97d 100644 --- a/test/sha256.c +++ b/test/sha256.c @@ -168,7 +168,7 @@ static int test_hmac(const uint8_t *key, int key_len, const uint8_t *input, return 1; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { ccprintf("Testing short message (8 bytes)\n"); if (!test_sha256(sha256_8_input, sizeof(sha256_8_input), diff --git a/test/shmalloc.c b/test/shmalloc.c index 31696b2a27..340ca70ce6 100644 --- a/test/shmalloc.c +++ b/test/shmalloc.c @@ -206,7 +206,7 @@ bailout: */ static uint32_t test_map; -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { int index; const int shmem_size = shared_mem_size(); diff --git a/test/static_if.c b/test/static_if.c index f70f7d30c3..63b26bdf25 100644 --- a/test/static_if.c +++ b/test/static_if.c @@ -39,7 +39,7 @@ static int test_static_if_unused_no_fail(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/static_if_error.c b/test/static_if_error.c index 65882b3bbd..e4f2df6eec 100644 --- a/test/static_if_error.c +++ b/test/static_if_error.c @@ -24,7 +24,7 @@ /* This is intended to cause a compilation error. */ TEST_MACRO(CONFIG_FOO) __maybe_unused int foo; -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/stdlib.c b/test/stdlib.c index 7b95a51cce..189581d797 100644 --- a/test/stdlib.c +++ b/test/stdlib.c @@ -494,7 +494,7 @@ static int test_memchr(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/stillness_detector.c b/test/stillness_detector.c index c8a7a22b50..c1c0c23a58 100644 --- a/test/stillness_detector.c +++ b/test/stillness_detector.c @@ -119,7 +119,7 @@ static int test_resets(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/stm32f_rtc.c b/test/stm32f_rtc.c index 77e6e5d256..d820662526 100644 --- a/test/stm32f_rtc.c +++ b/test/stm32f_rtc.c @@ -76,7 +76,7 @@ test_static int test_rtc_match_delay(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/stress.c b/test/stress.c index de53d58a7c..becfffe9cb 100644 --- a/test/stress.c +++ b/test/stress.c @@ -128,7 +128,7 @@ static int test_adc(void) } #endif -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/system.c b/test/system.c index 75757f4237..0fed44900a 100644 --- a/test/system.c +++ b/test/system.c @@ -92,7 +92,7 @@ static void fail_and_clean_up(void) test_fail(); } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { uint32_t state = 0; diff --git a/test/system_is_locked.c b/test/system_is_locked.c index f4e5e64159..9c35e206be 100644 --- a/test/system_is_locked.c +++ b/test/system_is_locked.c @@ -90,7 +90,7 @@ int task_test(void *unused) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/thermal.c b/test/thermal.c index c79f18ab2a..6971eea2aa 100644 --- a/test/thermal.c +++ b/test/thermal.c @@ -625,7 +625,7 @@ static int test_thermistor_linear_interpolate(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { RUN_TEST(test_init_val); RUN_TEST(test_sensors_can_be_read); diff --git a/test/timer_calib.c b/test/timer_calib.c index fe2d26761d..87eeeb0bb0 100644 --- a/test/timer_calib.c +++ b/test/timer_calib.c @@ -56,7 +56,7 @@ int timer_calib_task(void *data) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { task_wake(TASK_ID_TESTTMR); } diff --git a/test/timer_dos.c b/test/timer_dos.c index c681300102..69b7888c46 100644 --- a/test/timer_dos.c +++ b/test/timer_dos.c @@ -68,7 +68,7 @@ int task_timer(void *seed) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { wait_for_task_started(); task_wake(TASK_ID_TMRD); diff --git a/test/uptime.c b/test/uptime.c index 651628ab7b..d1edc34f5d 100644 --- a/test/uptime.c +++ b/test/uptime.c @@ -62,7 +62,7 @@ test_static int test_host_uptime_info_command_failure(void) return EC_RES_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/usb_common_test.c b/test/usb_common_test.c index 620e061f74..d09ffb9f27 100644 --- a/test/usb_common_test.c +++ b/test/usb_common_test.c @@ -194,7 +194,7 @@ int test_pd_extract_pdo_power(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { RUN_TEST(test_pd_get_cc_state); RUN_TEST(test_pd_extract_pdo_power); diff --git a/test/usb_pd.c b/test/usb_pd.c index f68f5d98c1..5183acb991 100644 --- a/test/usb_pd.c +++ b/test/usb_pd.c @@ -911,7 +911,7 @@ static int test_sink(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); init_ports(); diff --git a/test/usb_pd_console.c b/test/usb_pd_console.c index 8587edfe94..80b9978ea3 100644 --- a/test/usb_pd_console.c +++ b/test/usb_pd_console.c @@ -17,8 +17,7 @@ #include "test_util.h" /* Defined in implementation */ -int command_pd(int argc, char **argv); -int remote_flashing(int argc, char **argv); +int command_pd(int argc, const char **argv); static enum debug_level prl_debug_level; static enum debug_level pe_debug_level; @@ -249,7 +248,7 @@ enum pd_cc_states pd_get_task_cc_state(int port) static int test_command_pd_dump(void) { int argc = 3; - char *argv[] = { "pd", "dump", "", 0, 0, 0 }; + const char *argv[] = { "pd", "dump", "", 0, 0, 0 }; char test[2]; sprintf(test, "e"); @@ -277,7 +276,7 @@ static int test_command_pd_dump(void) static int test_command_pd_try_src(void) { int argc = 3; - char *argv[] = { "pd", "trysrc", "2", 0, 0 }; + const char *argv[] = { "pd", "trysrc", "2", 0, 0 }; try_src_override = 0; TEST_ASSERT(command_pd(argc, argv) == EC_SUCCESS); @@ -297,7 +296,7 @@ static int test_command_pd_try_src(void) static int test_command_pd_version(void) { int argc = 2; - char *argv[] = { "pd", "version", 0, 0, 0 }; + const char *argv[] = { "pd", "version", 0, 0, 0 }; TEST_ASSERT(command_pd(argc, argv) == EC_SUCCESS); @@ -307,7 +306,7 @@ static int test_command_pd_version(void) static int test_command_pd_arg_count(void) { int argc; - char *argv[] = { "pd", "", 0, 0, 0 }; + const char *argv[] = { "pd", "", 0, 0, 0 }; for (argc = 0; argc < 3; argc++) TEST_ASSERT(command_pd(argc, argv) == EC_ERROR_PARAM_COUNT); @@ -318,7 +317,7 @@ static int test_command_pd_arg_count(void) static int test_command_pd_port_num(void) { int argc = 3; - char *argv[10] = { "pd", "0", 0, 0, 0 }; + const char *argv[10] = { "pd", "0", 0, 0, 0 }; char test[2]; sprintf(test, "%d", CONFIG_USB_PD_PORT_MAX_COUNT); @@ -331,7 +330,7 @@ static int test_command_pd_port_num(void) static int test_command_pd_tx(void) { int argc = 3; - char *argv[] = { "pd", "0", "tx", 0, 0 }; + const char *argv[] = { "pd", "0", "tx", 0, 0 }; request = 0; TEST_ASSERT(command_pd(argc, argv) == EC_SUCCESS); @@ -344,7 +343,7 @@ static int test_command_pd_tx(void) static int test_command_pd_charger(void) { int argc = 3; - char *argv[] = { "pd", "1", "charger", 0, 0 }; + const char *argv[] = { "pd", "1", "charger", 0, 0 }; request = 0; TEST_ASSERT(command_pd(argc, argv) == EC_SUCCESS); @@ -357,7 +356,7 @@ static int test_command_pd_charger(void) static int test_command_pd_dev1(void) { int argc = 4; - char *argv[] = { "pd", "0", "dev", "20", 0 }; + const char *argv[] = { "pd", "0", "dev", "20", 0 }; request = 0; max_volt = 0; @@ -372,7 +371,7 @@ static int test_command_pd_dev1(void) static int test_command_pd_dev2(void) { int argc = 3; - char *argv[] = { "pd", "1", "dev", 0, 0 }; + const char *argv[] = { "pd", "1", "dev", 0, 0 }; request = 0; TEST_ASSERT(command_pd(argc, argv) == EC_SUCCESS); @@ -386,7 +385,7 @@ static int test_command_pd_dev2(void) static int test_command_pd_disable(void) { int argc = 3; - char *argv[] = { "pd", "0", "disable", 0, 0 }; + const char *argv[] = { "pd", "0", "disable", 0, 0 }; comm_enable = 1; TEST_ASSERT(command_pd(argc, argv) == EC_SUCCESS); @@ -399,7 +398,7 @@ static int test_command_pd_disable(void) static int test_command_pd_enable(void) { int argc = 3; - char *argv[] = { "pd", "1", "enable", 0, 0 }; + const char *argv[] = { "pd", "1", "enable", 0, 0 }; comm_enable = 0; TEST_ASSERT(command_pd(argc, argv) == EC_SUCCESS); @@ -412,7 +411,7 @@ static int test_command_pd_enable(void) static int test_command_pd_hard(void) { int argc = 3; - char *argv[] = { "pd", "0", "hard", 0, 0 }; + const char *argv[] = { "pd", "0", "hard", 0, 0 }; request = 0; TEST_ASSERT(command_pd(argc, argv) == EC_SUCCESS); @@ -425,7 +424,7 @@ static int test_command_pd_hard(void) static int test_command_pd_soft(void) { int argc = 3; - char *argv[] = { "pd", "0", "soft", 0, 0 }; + const char *argv[] = { "pd", "0", "soft", 0, 0 }; request = 0; TEST_ASSERT(command_pd(argc, argv) == EC_SUCCESS); @@ -438,7 +437,7 @@ static int test_command_pd_soft(void) static int test_command_pd_swap1(void) { int argc = 3; - char *argv[] = { "pd", "0", "swap", 0, 0 }; + const char *argv[] = { "pd", "0", "swap", 0, 0 }; TEST_ASSERT(command_pd(argc, argv) == EC_ERROR_PARAM_COUNT); @@ -448,7 +447,7 @@ static int test_command_pd_swap1(void) static int test_command_pd_swap2(void) { int argc = 4; - char *argv[] = { "pd", "0", "swap", "power", 0 }; + const char *argv[] = { "pd", "0", "swap", "power", 0 }; request = 0; TEST_ASSERT(command_pd(argc, argv) == EC_SUCCESS); @@ -461,7 +460,7 @@ static int test_command_pd_swap2(void) static int test_command_pd_swap3(void) { int argc = 4; - char *argv[] = { "pd", "1", "swap", "data", 0 }; + const char *argv[] = { "pd", "1", "swap", "data", 0 }; request = 0; TEST_ASSERT(command_pd(argc, argv) == EC_SUCCESS); @@ -474,7 +473,7 @@ static int test_command_pd_swap3(void) static int test_command_pd_swap4(void) { int argc = 4; - char *argv[] = { "pd", "0", "swap", "vconn", 0 }; + const char *argv[] = { "pd", "0", "swap", "vconn", 0 }; request = 0; TEST_ASSERT(command_pd(argc, argv) == EC_SUCCESS); @@ -487,7 +486,7 @@ static int test_command_pd_swap4(void) static int test_command_pd_swap5(void) { int argc = 4; - char *argv[] = { "pd", "0", "swap", "xyz", 0 }; + const char *argv[] = { "pd", "0", "swap", "xyz", 0 }; TEST_ASSERT(command_pd(argc, argv) == EC_ERROR_PARAM3); @@ -497,7 +496,7 @@ static int test_command_pd_swap5(void) static int test_command_pd_dualrole0(void) { int argc = 3; - char *argv[] = { "pd", "0", "dualrole", 0, 0 }; + const char *argv[] = { "pd", "0", "dualrole", 0, 0 }; TEST_ASSERT(command_pd(argc, argv) == EC_SUCCESS); @@ -507,7 +506,7 @@ static int test_command_pd_dualrole0(void) static int test_command_pd_dualrole1(void) { int argc = 4; - char *argv[] = { "pd", "0", "dualrole", "on", 0 }; + const char *argv[] = { "pd", "0", "dualrole", "on", 0 }; dr_state = 0; TEST_ASSERT(command_pd(argc, argv) == EC_SUCCESS); @@ -520,7 +519,7 @@ static int test_command_pd_dualrole1(void) static int test_command_pd_dualrole2(void) { int argc = 4; - char *argv[] = { "pd", "0", "dualrole", "off", 0 }; + const char *argv[] = { "pd", "0", "dualrole", "off", 0 }; dr_state = 0; TEST_ASSERT(command_pd(argc, argv) == EC_SUCCESS); @@ -533,7 +532,7 @@ static int test_command_pd_dualrole2(void) static int test_command_pd_dualrole3(void) { int argc = 4; - char *argv[] = { "pd", "0", "dualrole", "freeze", 0 }; + const char *argv[] = { "pd", "0", "dualrole", "freeze", 0 }; dr_state = 0; TEST_ASSERT(command_pd(argc, argv) == EC_SUCCESS); @@ -546,7 +545,7 @@ static int test_command_pd_dualrole3(void) static int test_command_pd_dualrole4(void) { int argc = 4; - char *argv[] = { "pd", "0", "dualrole", "sink", 0 }; + const char *argv[] = { "pd", "0", "dualrole", "sink", 0 }; dr_state = 0; TEST_ASSERT(command_pd(argc, argv) == EC_SUCCESS); @@ -559,7 +558,7 @@ static int test_command_pd_dualrole4(void) static int test_command_pd_dualrole5(void) { int argc = 4; - char *argv[] = { "pd", "0", "dualrole", "source", 0 }; + const char *argv[] = { "pd", "0", "dualrole", "source", 0 }; dr_state = 0; TEST_ASSERT(command_pd(argc, argv) == EC_SUCCESS); @@ -572,7 +571,7 @@ static int test_command_pd_dualrole5(void) static int test_command_pd_state(void) { int argc = 3; - char *argv[] = { "pd", "0", "state", 0, 0 }; + const char *argv[] = { "pd", "0", "state", 0, 0 }; pd_get_polarity_called = false; pd_comm_is_enabled_called = false; @@ -601,7 +600,7 @@ static int test_command_pd_state(void) static int test_command_pd_srccaps(void) { int argc = 3; - char *argv[] = { "pd", "0", "srccaps", 0, 0 }; + const char *argv[] = { "pd", "0", "srccaps", 0, 0 }; pd_srccaps_dump_called = false; TEST_ASSERT(command_pd(argc, argv) == EC_SUCCESS); @@ -613,7 +612,7 @@ static int test_command_pd_srccaps(void) static int test_command_pd_timer(void) { int argc = 3; - char *argv[] = { "pd", "0", "timer", 0, 0 }; + const char *argv[] = { "pd", "0", "timer", 0, 0 }; pd_timer_dump_called = false; TEST_ASSERT(command_pd(argc, argv) == EC_SUCCESS); @@ -622,7 +621,7 @@ static int test_command_pd_timer(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/usb_pd_int.c b/test/usb_pd_int.c index c0caa67bcb..d61d45a73f 100644 --- a/test/usb_pd_int.c +++ b/test/usb_pd_int.c @@ -97,7 +97,7 @@ void before_test(void) pd_set_suspend(PORT0, 0); } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { /* Let tasks settle down */ task_wait_event(MINUTE); diff --git a/test/usb_pd_pdo_fixed_test.c b/test/usb_pd_pdo_fixed_test.c index ad247c3ba2..6bc537ab84 100644 --- a/test/usb_pd_pdo_fixed_test.c +++ b/test/usb_pd_pdo_fixed_test.c @@ -39,7 +39,7 @@ test_static int test_pd_find_pdo_index(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { RUN_TEST(test_pd_find_pdo_index); diff --git a/test/usb_pd_timer.c b/test/usb_pd_timer.c index 91e1360fb1..705da03f96 100644 --- a/test/usb_pd_timer.c +++ b/test/usb_pd_timer.c @@ -207,7 +207,7 @@ int test_pd_timers(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { RUN_TEST(test_pd_timers_init); RUN_TEST(test_pd_timers_bit_ops); diff --git a/test/usb_pe_drp.c b/test/usb_pe_drp.c index 894d825b87..a224a0fddd 100644 --- a/test/usb_pe_drp.c +++ b/test/usb_pe_drp.c @@ -317,7 +317,7 @@ test_static int test_interrupting_pr_swap(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/usb_pe_drp_noextended.c b/test/usb_pe_drp_noextended.c index 2e5593fea3..38920fdf98 100644 --- a/test/usb_pe_drp_noextended.c +++ b/test/usb_pe_drp_noextended.c @@ -33,7 +33,7 @@ void before_test(void) mock_tc_port_reset(); } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/usb_pe_drp_old.c b/test/usb_pe_drp_old.c index c45c9b7033..a74d8c5d06 100644 --- a/test/usb_pe_drp_old.c +++ b/test/usb_pe_drp_old.c @@ -413,7 +413,7 @@ static int test_send_caps_error(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/usb_pe_drp_old_noextended.c b/test/usb_pe_drp_old_noextended.c index ddf6fda897..f0ec34c7d0 100644 --- a/test/usb_pe_drp_old_noextended.c +++ b/test/usb_pe_drp_old_noextended.c @@ -342,7 +342,7 @@ static int test_send_caps_error(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/usb_ppc.c b/test/usb_ppc.c index 4d37992348..a50498a443 100644 --- a/test/usb_ppc.c +++ b/test/usb_ppc.c @@ -168,7 +168,7 @@ static int test_ppc_is_vbus_present(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/usb_prl.c b/test/usb_prl.c index 1b4f78a0fe..d6f144bab1 100644 --- a/test/usb_prl.c +++ b/test/usb_prl.c @@ -166,7 +166,7 @@ void after_test(void) enable_prl(PORT0, 0); } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { RUN_TEST(test_receive_control_msg); RUN_TEST(test_send_control_msg); diff --git a/test/usb_prl_noextended.c b/test/usb_prl_noextended.c index c0b5d8696d..3450c012af 100644 --- a/test/usb_prl_noextended.c +++ b/test/usb_prl_noextended.c @@ -1301,7 +1301,7 @@ void before_test(void) cycle_through_state_machine(PORT0, 10, MSEC); } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/usb_prl_old.c b/test/usb_prl_old.c index c0b5d8696d..3450c012af 100644 --- a/test/usb_prl_old.c +++ b/test/usb_prl_old.c @@ -1301,7 +1301,7 @@ void before_test(void) cycle_through_state_machine(PORT0, 10, MSEC); } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/usb_sm_framework_h3.c b/test/usb_sm_framework_h3.c index 09904dfb8f..1afb822516 100644 --- a/test/usb_sm_framework_h3.c +++ b/test/usb_sm_framework_h3.c @@ -1161,7 +1161,7 @@ int test_task(void *u) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); #if defined(TEST_USB_SM_FRAMEWORK_H3) diff --git a/test/usb_tcpmv2_compliance.c b/test/usb_tcpmv2_compliance.c index e0288feb18..249d62d38b 100644 --- a/test/usb_tcpmv2_compliance.c +++ b/test/usb_tcpmv2_compliance.c @@ -30,7 +30,7 @@ void before_test(void) tc_try_src_override(TRY_SRC_OVERRIDE_OFF); } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/usb_typec_ctvpd.c b/test/usb_typec_ctvpd.c index 2c7404ec9b..23cc39d3c8 100644 --- a/test/usb_typec_ctvpd.c +++ b/test/usb_typec_ctvpd.c @@ -1488,7 +1488,7 @@ static int test_ctvpd_behavior_case6(void) } #endif -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/usb_typec_drp_acc_trysrc.c b/test/usb_typec_drp_acc_trysrc.c index 47599d7975..0b36fa9e8a 100644 --- a/test/usb_typec_drp_acc_trysrc.c +++ b/test/usb_typec_drp_acc_trysrc.c @@ -814,7 +814,7 @@ void before_test(void) mock_tcpc.should_print_call = true; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/utils.c b/test/utils.c index 042e3a1ac0..58899fe7c2 100644 --- a/test/utils.c +++ b/test/utils.c @@ -379,7 +379,7 @@ test_static int test_parse_bool(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/utils_str.c b/test/utils_str.c index 7607b071f2..16fcfc4484 100644 --- a/test/utils_str.c +++ b/test/utils_str.c @@ -104,7 +104,7 @@ static int test_strzcpy(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/vboot.c b/test/vboot.c index 7dab08ac05..f11f8fabaf 100644 --- a/test/vboot.c +++ b/test/vboot.c @@ -131,7 +131,7 @@ static int test_vboot(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { test_reset(); diff --git a/test/version.c b/test/version.c index ad7571d5f6..a44029f459 100644 --- a/test/version.c +++ b/test/version.c @@ -139,7 +139,7 @@ static int test_image_unknown(void) return EC_SUCCESS; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { RUN_TEST(test_version); RUN_TEST(test_fwid); |