qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: QEMU tests, Coverity, and g_test_set_nonfatal_assertions()


From: Peter Maydell
Subject: Re: QEMU tests, Coverity, and g_test_set_nonfatal_assertions()
Date: Mon, 3 May 2021 18:18:28 +0100

On Mon, 3 May 2021 at 18:15, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> On 5/3/21 9:49 AM, Peter Maydell wrote:
> > (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().
>
> I vaguely prefer this.  To me, "assert" means can't continue.
>
> If we want tests that report and continue, we should use something else.
> Though of course could mean quite a bit of churn.

The thing is that this is fighting against the glib test
framework's intent, which is that one uses g_assert_cmpstr() etc
(but not plain g_assert()) to do the "report and continue" part.
We could wrap them all in QEMU-specific versions that rename
them to something other than g_assert_* but I'm not sure that
that's a great idea.

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]