I'll edit the g_test_set_nonfatal_assertions in a separate patch explaining the reasoning behind it in version 2.
On Thu, Nov 14, 2024 at 4:55 AM Peter Maydell <peter.mayd...@linaro.org> wrote: > > On Fri, 8 Nov 2024 at 19:10, Roque Arcudia Hernandez <roq...@google.com> > wrote: > > > > Currently the CMSDK APB watchdog tests target an specialized version > > of the device (luminaris using the lm3s811evb machine) that prevents > > the development of tests for the more generic device documented in: > > > > https://developer.arm.com/documentation/ddi0479/d/apb-components/apb-watchdog/programmers-model > > > > This patch allows the execution of the watchdog tests in an MPS2 > > machine (when applicable) which uses the generic version of the CMSDK > > APB watchdog. > > > > Finally the rules for compiling the test have to change because it is > > possible not to have CONFIG_STELLARIS (required for the lm3s811evb > > machine) while still having CONFIG_CMSDK_APB_WATCHDOG and the test > > will fail. Due to the addition of the MPS2 machine CONFIG_MPS2 > > becomes also a dependency for the test compilation. > > > > Signed-off-by: Roque Arcudia Hernandez <roq...@google.com> > > Reviewed-by: Stephen Longfield <slongfi...@google.com> > > > This refactoring mostly looks good. > > > @@ -116,16 +164,21 @@ int main(int argc, char **argv) > > int r; > > > > g_test_init(&argc, &argv, NULL); > > - > > - qtest_start("-machine lm3s811evb"); > > - > > - qtest_add_func("/cmsdk-apb-watchdog/watchdog", test_watchdog); > > - qtest_add_func("/cmsdk-apb-watchdog/watchdog_clock_change", > > - test_clock_change); > > + g_test_set_nonfatal_assertions(); > > But this addition of g_test_set_nonfatal_assertions() is > not related to the refactoring and not mentioned in the > commit message. > > thanks > -- PMM