mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
tests: invert the return logic in storagepoolcapstest
This way if the first test "full" fails we will run the second test as well. Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
a59590c7eb
commit
0b5b221300
@ -84,7 +84,7 @@ test_virStoragePoolCapsFormat(const void *opaque)
|
|||||||
static int
|
static int
|
||||||
mymain(void)
|
mymain(void)
|
||||||
{
|
{
|
||||||
int ret = -1;
|
int ret = 0;
|
||||||
virCapsPtr fullCaps = NULL;
|
virCapsPtr fullCaps = NULL;
|
||||||
virCapsPtr fsCaps = NULL;
|
virCapsPtr fsCaps = NULL;
|
||||||
|
|
||||||
@ -93,12 +93,14 @@ mymain(void)
|
|||||||
struct test_virStoragePoolCapsFormatData data = \
|
struct test_virStoragePoolCapsFormatData data = \
|
||||||
{.filename = Filename, .driverCaps = DriverCaps }; \
|
{.filename = Filename, .driverCaps = DriverCaps }; \
|
||||||
if (virTestRun(Filename, test_virStoragePoolCapsFormat, &data) < 0) \
|
if (virTestRun(Filename, test_virStoragePoolCapsFormat, &data) < 0) \
|
||||||
goto cleanup; \
|
ret = -1; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
if (!(fullCaps = virCapabilitiesNew(VIR_ARCH_NONE, false, false)) ||
|
if (!(fullCaps = virCapabilitiesNew(VIR_ARCH_NONE, false, false)) ||
|
||||||
!(fsCaps = virCapabilitiesNew(VIR_ARCH_NONE, false, false)))
|
!(fsCaps = virCapabilitiesNew(VIR_ARCH_NONE, false, false))) {
|
||||||
|
ret = -1;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
test_virCapabilitiesAddFullStoragePool(fullCaps);
|
test_virCapabilitiesAddFullStoragePool(fullCaps);
|
||||||
test_virCapabilitiesAddFSStoragePool(fsCaps);
|
test_virCapabilitiesAddFSStoragePool(fsCaps);
|
||||||
@ -106,8 +108,6 @@ mymain(void)
|
|||||||
DO_TEST("full", fullCaps);
|
DO_TEST("full", fullCaps);
|
||||||
DO_TEST("fs", fsCaps);
|
DO_TEST("fs", fsCaps);
|
||||||
|
|
||||||
ret = 0;
|
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virObjectUnref(fullCaps);
|
virObjectUnref(fullCaps);
|
||||||
virObjectUnref(fsCaps);
|
virObjectUnref(fsCaps);
|
||||||
|
Loading…
Reference in New Issue
Block a user