On 2018-05-02 19:56, Jan Kiszka wrote: > On 2018-05-02 14:39, Andreas J. Reichel wrote: >> From: Andreas Reichel <[email protected]> >> >> Register three user variables, add two of them to the registry >> of the garbage collector and call finalize to check if the third >> remains and the registered ones are deleted. >> >> Signed-off-by: Andreas Reichel <[email protected]> >> --- >> tools/tests/test_ebgenv_api.c | 52 ++++++++++++++++++++++++++++++++++- >> 1 file changed, 51 insertions(+), 1 deletion(-) >> >> diff --git a/tools/tests/test_ebgenv_api.c b/tools/tests/test_ebgenv_api.c >> index 533b50b..fb6ca44 100644 >> --- a/tools/tests/test_ebgenv_api.c >> +++ b/tools/tests/test_ebgenv_api.c >> @@ -615,6 +615,55 @@ START_TEST(ebgenv_api_ebg_env_close) >> } >> END_TEST >> >> +START_TEST(ebgenv_api_ebg_env_register_gc_var) >> +{ >> + ebgenv_t e; >> + int ret; >> + memset(&e, 0, sizeof(e)); >> + >> + bgenv_write_fake.return_val = true; >> + bgenv_close_fake.return_val = true; >> + >> + bgenv_init_fake.return_val = true; >> + >> + for (int i = 0; i < ENV_NUM_CONFIG_PARTS; i++) { >> + envdata[i].revision = i + 1; >> + } >> + >> + ret = ebg_env_create_new(&e); > > Missing "ck_assert_int_eq(ret, 0);" here, right? Then I will just fix up > the patch. >
Done, and that made cppcheck happy again. Jan -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux -- You received this message because you are subscribed to the Google Groups "EFI Boot Guard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/efibootguard-dev/a4bc3b63-a95d-36cb-71d1-fc40bb617602%40siemens.com. For more options, visit https://groups.google.com/d/optout.
