diff options
author | Jeremy Bettis <jbettis@google.com> | 2022-09-02 09:57:22 -0600 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-09-02 17:27:41 +0000 |
commit | 668b378306e108743bf8434d95f34a800fc9ecc8 (patch) | |
tree | b944fb57e803b0282b820c41e08e326d42cae5fa | |
parent | 47881d3abb588d73aeb2f1cc890f7499f513b481 (diff) | |
download | chrome-ec-668b378306e108743bf8434d95f34a800fc9ecc8.tar.gz |
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 <jbettis@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3871743
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
Commit-Queue: Aaron Massey <aaronmassey@google.com>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Reviewed-by: Aaron Massey <aaronmassey@google.com>
Tested-by: Jeremy Bettis <jbettis@chromium.org>
Auto-Submit: Jeremy Bettis <jbettis@chromium.org>
-rw-r--r-- | zephyr/test/drivers/default/src/console.c | 7 | ||||
-rw-r--r-- | zephyr/test/ec_app/prj.conf | 2 | ||||
-rw-r--r-- | zephyr/test/ec_app/src/main.c | 5 | ||||
-rw-r--r-- | zephyr/test/unblocked_terms.txt | 2 | ||||
-rw-r--r-- | zephyr/test/vboot_efs2/prj.conf | 2 | ||||
-rw-r--r-- | zephyr/test/vboot_efs2/src/main.c | 22 |
6 files changed, 18 insertions, 22 deletions
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 <zephyr/zephyr.h> #include <zephyr/ztest.h> -#include <zephyr/shell/shell_dummy.h> /* nocheck */ +#include <zephyr/shell/shell_dummy.h> #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 <zephyr/ztest_assert.h> #include <zephyr/ztest_test_new.h> -#include <zephyr/shell/shell_dummy.h> /* nocheck */ +#include <zephyr/shell/shell_dummy.h> #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 <zephyr/ztest_assert.h> #include <zephyr/ztest_test_new.h> -#include <zephyr/shell/shell_dummy.h> /* nocheck */ +#include <zephyr/shell/shell_dummy.h> #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, |