Peter Maydell <peter.mayd...@linaro.org> writes: [...]
> In summary, we have a few options: > > (1) Expand "assertions always fatal" to test code, and add "panics" > models of the g_assertion_message* functions. Remove all the calls > to g_test_set_nonfatal_assertions(). > > (2) Aim to expand the ability to use g_test_set_nonfatal_assertions() > to other tests than the handful that currently use it (perhaps by > providing a standard place where it gets called for all tests, though > there isn't currently an obvious place to do that). Treat Coverity > issues in our test code which flag up "this would crash if the > assertion fired but execution continued" as bugs to be fixed (though > not very high-priority ones, obviously). Further discussed under Richard's reply. > (3) Something else ? We could try to model what the GLib functions do: g_test_set_nonfatal_assertions() sets a global flag, the g_assert_FOO() other than g_assert_not_reached() check it. We'll then find out whether Coverity's analysis is strong enough to propagate the value passed to g_test_set_nonfatal_assertions() to its uses. [...]