On 08/12/2013 05:54 AM, Peter Krempa wrote: > On 08/02/13 23:47, Eric Blake wrote: >> The logic set up in previous patch for exposing VIR_TEST_EXPENSIVE >> to individual tests is as follows: >> >> +++ b/tests/testutils.c >> @@ -66,6 +66,7 @@ >> >> static unsigned int testDebug = -1; >> static unsigned int testVerbose = -1; >> +static unsigned int testExpensive = -1; > > Pre-existing, but initializing unsigneds to -1 is really awkward ... It's shorthand for initializing to UINT_MAX. > >> >> static unsigned int testOOM = 0; >> static size_t testCounter = 0; >> @@ -581,6 +582,13 @@ virTestGetVerbose(void) { >> return testVerbose || virTestGetDebug(); >> } >> >> +unsigned int > > A boolean would be enough given the return values of virTestGetFlag and > the expected results. For virTestGetFlag, we generally only care about 0 or 1; but since it uses the same helper function of virTestGetFlag, which DOES care about the numeric value (ie. VIR_TEST_DEBUG=2 gives more output than VIR_TEST_DEBUG=1), that explains why the helper function returns an integer, and why I copied that paradigm. > > ACK anyways, my comments are pointing out stuff that was pre-existing. Thanks for the review; I'll push shortly as-is; I'm not sure it's worth changing the types of these functions. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list