Re: [PATCH] tests: unit: add NULL-pointer check

2022-09-05 Thread Paolo Bonzini
Il mar 6 set 2022, 07:01 Markus Armbruster ha scritto: > Next, permit me a few words on writing tests. For me, a unit test fails > by crashing. Crashing with a nice message is optional. The more likely > the failure, the more useful is niceness. Complete niceness is > impossible --- if we cou

Re: [PATCH] tests: unit: add NULL-pointer check

2022-09-05 Thread Markus Armbruster
Paolo Bonzini writes: > In CID 1432593, Coverity complains that the result of qdict_crumple() > might leak if it is not a dictionary. This is not a practical concern > since the test would fail immediately with a NULL pointer dereference > in qdict_size(). > > However, it is not nice to depend o

Re: [PATCH] tests: unit: add NULL-pointer check

2022-09-05 Thread Alex Bennée
Paolo Bonzini writes: > In CID 1432593, Coverity complains that the result of qdict_crumple() > might leak if it is not a dictionary. This is not a practical concern > since the test would fail immediately with a NULL pointer dereference > in qdict_size(). > > However, it is not nice to depend

[PATCH] tests: unit: add NULL-pointer check

2022-09-05 Thread Paolo Bonzini
In CID 1432593, Coverity complains that the result of qdict_crumple() might leak if it is not a dictionary. This is not a practical concern since the test would fail immediately with a NULL pointer dereference in qdict_size(). However, it is not nice to depend on qdict_size() crashing, so add an