From 668b378306e108743bf8434d95f34a800fc9ecc8 Mon Sep 17 00:00:00 2001 From: Jeremy Bettis Date: Fri, 2 Sep 2022 09:57:22 -0600 Subject: zephyr: Add unblocked_terms.txt to avoid coil Zephyr has a fake shell that triggers the coil check. Add an unblocked_terms.txt to prevent flagging that api while still blocking other references to the "very naughty" word. BRANCH=None BUG=None TEST=Added all affected files to this cl and ran presubmit. Change-Id: I12c1517d62037d5bd777f54f1f306bdb7945dd20 Signed-off-by: Jeremy Bettis Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3871743 Commit-Queue: Jeremy Bettis Commit-Queue: Aaron Massey Code-Coverage: Zoss Reviewed-by: Aaron Massey Tested-by: Jeremy Bettis Auto-Submit: Jeremy Bettis --- zephyr/test/drivers/default/src/console.c | 7 +++---- zephyr/test/ec_app/prj.conf | 2 +- zephyr/test/ec_app/src/main.c | 5 ++--- zephyr/test/unblocked_terms.txt | 2 ++ zephyr/test/vboot_efs2/prj.conf | 2 +- zephyr/test/vboot_efs2/src/main.c | 22 +++++++++------------- 6 files changed, 18 insertions(+), 22 deletions(-) create mode 100644 zephyr/test/unblocked_terms.txt diff --git a/zephyr/test/drivers/default/src/console.c b/zephyr/test/drivers/default/src/console.c index 3a548fb605..2d46bacdc9 100644 --- a/zephyr/test/drivers/default/src/console.c +++ b/zephyr/test/drivers/default/src/console.c @@ -5,7 +5,7 @@ #include #include -#include /* nocheck */ +#include #include "builtin/stdio.h" #include "test/drivers/test_state.h" @@ -63,11 +63,10 @@ ZTEST_USER(console, shell_fprintf_full) shell_zephyr->fprintf_ctx->buffer_size, "large_string is too short, fix test."); - shell_backend_dummy_clear_output(shell_zephyr); /* nocheck */ + shell_backend_dummy_clear_output(shell_zephyr); shell_fprintf(shell_zephyr, SHELL_NORMAL, "%s", large_string); - outbuffer = shell_backend_dummy_get_output(shell_zephyr, /* nocheck */ - &buffer_size); + outbuffer = shell_backend_dummy_get_output(shell_zephyr, &buffer_size); zassert_true(strncmp(outbuffer, large_string, strlen(large_string)) == 0, "Invalid console output %s", outbuffer); diff --git a/zephyr/test/ec_app/prj.conf b/zephyr/test/ec_app/prj.conf index b1270cae60..a3fcbd082a 100644 --- a/zephyr/test/ec_app/prj.conf +++ b/zephyr/test/ec_app/prj.conf @@ -8,7 +8,7 @@ CONFIG_PLATFORM_EC=y CONFIG_CROS_EC=y CONFIG_SHIMMED_TASKS=y CONFIG_FLASH=y -CONFIG_SHELL_BACKEND_DUMMY=y # nocheck +CONFIG_SHELL_BACKEND_DUMMY=y CONFIG_SHELL_BACKEND_SERIAL=n CONFIG_SERIAL=y CONFIG_RING_BUFFER=y diff --git a/zephyr/test/ec_app/src/main.c b/zephyr/test/ec_app/src/main.c index 1e3703e726..42798f1201 100644 --- a/zephyr/test/ec_app/src/main.c +++ b/zephyr/test/ec_app/src/main.c @@ -5,7 +5,7 @@ #include #include -#include /* nocheck */ +#include #include "ec_app_main.h" #include "hooks.h" @@ -61,8 +61,7 @@ ZTEST(ec_app_tests, test_vboot_main) size_t buffer_size; /* vboot_main logs the message "VB Verifying hash" */ - outbuffer = shell_backend_dummy_get_output(shell_zephyr, /* nocheck */ - &buffer_size); + outbuffer = shell_backend_dummy_get_output(shell_zephyr, &buffer_size); zassert_true(strstr(outbuffer, "VB Verifying hash") != NULL, "'VB Verifying hash' not found in %s", outbuffer); } diff --git a/zephyr/test/unblocked_terms.txt b/zephyr/test/unblocked_terms.txt new file mode 100644 index 0000000000..cf2ed1052f --- /dev/null +++ b/zephyr/test/unblocked_terms.txt @@ -0,0 +1,2 @@ +SHELL_BACKEND_DUMMY +shell_dummy diff --git a/zephyr/test/vboot_efs2/prj.conf b/zephyr/test/vboot_efs2/prj.conf index 971c8ce3ca..1b73555f90 100644 --- a/zephyr/test/vboot_efs2/prj.conf +++ b/zephyr/test/vboot_efs2/prj.conf @@ -35,7 +35,7 @@ CONFIG_PLATFORM_EC_VBOOT_EFS2=y CONFIG_PLATFORM_EC_VBOOT_HASH=y CONFIG_RING_BUFFER=y CONFIG_SERIAL=y -CONFIG_SHELL_BACKEND_DUMMY=y # nocheck +CONFIG_SHELL_BACKEND_DUMMY=y CONFIG_SHELL_BACKEND_SERIAL=n CONFIG_SHIMMED_TASKS=y CONFIG_ZTEST=y diff --git a/zephyr/test/vboot_efs2/src/main.c b/zephyr/test/vboot_efs2/src/main.c index b253deb9b8..b0ef86c92a 100644 --- a/zephyr/test/vboot_efs2/src/main.c +++ b/zephyr/test/vboot_efs2/src/main.c @@ -6,7 +6,7 @@ #include "zephyr/kernel.h" #include #include -#include /* nocheck */ +#include #include "ec_app_main.h" #include "hooks.h" @@ -40,11 +40,10 @@ ZTEST(vboot_efs2, test_vboot_main_system_is_in_rw) /* Set system_is_in_rw */ system_set_shrspi_image_copy(EC_IMAGE_RW); - shell_backend_dummy_clear_output(shell_zephyr); /* nocheck */ + shell_backend_dummy_clear_output(shell_zephyr); vboot_main(); - outbuffer = shell_backend_dummy_get_output(shell_zephyr, /* nocheck */ - &buffer_size); + outbuffer = shell_backend_dummy_get_output(shell_zephyr, &buffer_size); zassert_equal(show_power_shortage_called, 1, NULL); zassert_true(strstr(outbuffer, "VB Already in RW") != NULL, @@ -67,11 +66,10 @@ ZTEST(vboot_efs2, test_vboot_main_system_is_manual_recovery) system_enter_manual_recovery(); - shell_backend_dummy_clear_output(shell_zephyr); /* nocheck */ + shell_backend_dummy_clear_output(shell_zephyr); vboot_main(); - outbuffer = shell_backend_dummy_get_output(shell_zephyr, /* nocheck */ - &buffer_size); + outbuffer = shell_backend_dummy_get_output(shell_zephyr, &buffer_size); zassert_equal(show_power_shortage_called, 0, NULL); zassert_true(strstr(outbuffer, "VB In recovery mode") != NULL, "Expected msg not in %s", outbuffer); @@ -93,11 +91,10 @@ ZTEST(vboot_efs2, test_vboot_main_stay_in_ro) system_set_reset_flags(EC_RESET_FLAG_STAY_IN_RO); - shell_backend_dummy_clear_output(shell_zephyr); /* nocheck */ + shell_backend_dummy_clear_output(shell_zephyr); vboot_main(); - outbuffer = shell_backend_dummy_get_output(shell_zephyr, /* nocheck */ - &buffer_size); + outbuffer = shell_backend_dummy_get_output(shell_zephyr, &buffer_size); zassert_equal(show_power_shortage_called, 0, NULL); /* Verify some things we don't expect also. */ @@ -117,11 +114,10 @@ ZTEST(vboot_efs2, test_vboot_main_jump_timeout) const char *outbuffer; size_t buffer_size; - shell_backend_dummy_clear_output(shell_zephyr); /* nocheck */ + shell_backend_dummy_clear_output(shell_zephyr); vboot_main(); - outbuffer = shell_backend_dummy_get_output(shell_zephyr, /* nocheck */ - &buffer_size); + outbuffer = shell_backend_dummy_get_output(shell_zephyr, &buffer_size); zassert_equal(show_critical_error_called, 1, NULL); zassert_true(strstr(outbuffer, "VB Ping Cr50") != NULL, -- cgit v1.2.1