Remove test case average timing

The test case average timing code has not been used by any test
case ever. Delete it to remove complexity.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrange 2013-09-20 19:13:35 +01:00
parent 40911b66d4
commit eee6eb666c
71 changed files with 206 additions and 246 deletions

View File

@ -1020,7 +1020,7 @@ mymain(void)
# define DO_TEST(NAME) \
if (virtTestRun("Command Exec " #NAME " test", \
1, NAME, NULL) < 0) \
NAME, NULL) < 0) \
ret = -1
DO_TEST(test0);

View File

@ -472,7 +472,7 @@ cpuTestRun(const char *name, const struct data *data)
tmp = virtTestLogContentAndReset();
VIR_FREE(tmp);
if (virtTestRun(label, 1, cpuTest[data->api], data) < 0) {
if (virtTestRun(label, cpuTest[data->api], data) < 0) {
if (virTestGetDebug()) {
char *log;
if ((log = virtTestLogContentAndReset()) &&

View File

@ -102,7 +102,7 @@ mymain(void)
do { \
const struct testInfo info = {name, uuid, internal}; \
if (virtTestRun("SNAPSHOT XML-2-XML " name, \
1, testCompareXMLToXMLHelper, &info) < 0) \
testCompareXMLToXMLHelper, &info) < 0) \
ret = -1; \
} while (0)

View File

@ -253,7 +253,7 @@ mymain(void)
# define DO_TEST(_name) \
do { \
if (virtTestRun("VMware "#_name, 1, test##_name, \
if (virtTestRun("VMware "#_name, test##_name, \
NULL) < 0) { \
result = -1; \
} \

View File

@ -169,15 +169,15 @@ mymain(void)
goto cleanup;
}
if (virtTestRun("test1", 1, test1, NULL) < 0)
if (virtTestRun("test1", test1, NULL) < 0)
ret = -1;
if (virtTestRun("test2", 1, test2, NULL) < 0)
if (virtTestRun("test2", test2, NULL) < 0)
ret = -1;
if (virtTestRun("test3", 1, test3, NULL) < 0)
if (virtTestRun("test3", test3, NULL) < 0)
ret = -1;
if (virtTestRun("test4", 1, test4, NULL) < 0)
if (virtTestRun("test4", test4, NULL) < 0)
ret = -1;
if (virtTestRun("test5", 1, test5, NULL) < 0)
if (virtTestRun("test5", test5, NULL) < 0)
ret = -1;
cleanup:

View File

@ -328,13 +328,13 @@ mymain(void)
abort();
}
if (virtTestRun("Stream read blocking ", 1, testFDStreamReadBlock, scratchdir) < 0)
if (virtTestRun("Stream read blocking ", testFDStreamReadBlock, scratchdir) < 0)
ret = -1;
if (virtTestRun("Stream read non-blocking ", 1, testFDStreamReadNonblock, scratchdir) < 0)
if (virtTestRun("Stream read non-blocking ", testFDStreamReadNonblock, scratchdir) < 0)
ret = -1;
if (virtTestRun("Stream write blocking ", 1, testFDStreamWriteBlock, scratchdir) < 0)
if (virtTestRun("Stream write blocking ", testFDStreamWriteBlock, scratchdir) < 0)
ret = -1;
if (virtTestRun("Stream write non-blocking ", 1, testFDStreamWriteNonblock, scratchdir) < 0)
if (virtTestRun("Stream write non-blocking ", testFDStreamWriteNonblock, scratchdir) < 0)
ret = -1;
if (getenv("LIBVIRT_SKIP_CLEANUP") == NULL)

View File

@ -69,9 +69,9 @@ mymain(void)
{
int ret = 0;
#define DO_TEST(name) \
if (virtTestRun("Interface XML-2-XML " name, \
1, testCompareXMLToXMLHelper, (name)) < 0) \
#define DO_TEST(name) \
if (virtTestRun("Interface XML-2-XML " name, \
testCompareXMLToXMLHelper, (name)) < 0) \
ret = -1
DO_TEST("ethernet-dhcp");

View File

@ -138,7 +138,7 @@ mymain(void)
#define DO_TEST_FULL(name, cmd, doc, expect, pass) \
do { \
struct testInfo info = { doc, expect, pass }; \
if (virtTestRun(name, 1, testJSON ## cmd, &info) < 0) \
if (virtTestRun(name, testJSON ## cmd, &info) < 0) \
ret = -1; \
} while (0)

View File

@ -223,7 +223,7 @@ mymain(void)
VIR_DEBUG("Initial config [%s]", filedata);
for (i = 0; params[i] != 0; i++) {
const struct testCorruptData data = { params, filedata, filename, i };
if (virtTestRun("Test corruption", 1, testCorrupt, &data) < 0)
if (virtTestRun("Test corruption", testCorrupt, &data) < 0)
ret = -1;
}

View File

@ -117,8 +117,8 @@ mymain(void)
# define DO_TEST_FULL(name, is_different, inactive) \
do { \
const struct testInfo info = {name, is_different, inactive}; \
if (virtTestRun("LXC XML-2-XML " name, \
1, testCompareXMLToXMLHelper, &info) < 0) \
if (virtTestRun("LXC XML-2-XML " name, \
testCompareXMLToXMLHelper, &info) < 0) \
ret = -1; \
} while (0)

View File

@ -231,11 +231,11 @@ mymain(void)
virtTestQuiesceLibvirtErrors(false);
if (virtTestRun("Assign metadata ", 1, testAssignMetadata, &test) < 0)
if (virtTestRun("Assign metadata ", testAssignMetadata, &test) < 0)
ret = EXIT_FAILURE;
if (virtTestRun("Rewrite Metadata ", 1, testRewriteMetadata, &test) < 0)
if (virtTestRun("Rewrite Metadata ", testRewriteMetadata, &test) < 0)
ret = EXIT_FAILURE;
if (virtTestRun("Erase metadata ", 1, testEraseMetadata, &test) < 0)
if (virtTestRun("Erase metadata ", testEraseMetadata, &test) < 0)
ret = EXIT_FAILURE;
virDomainFree(test.dom);

View File

@ -130,7 +130,7 @@ mymain(void)
info.name = xname; \
info.caps = xcaps; \
if (virtTestRun("Network XML-2-Conf " xname, \
1, testCompareXMLToConfHelper, &info) < 0) { \
testCompareXMLToConfHelper, &info) < 0) { \
ret = -1; \
} \
} while (0)

View File

@ -90,7 +90,7 @@ mymain(void)
do { \
const struct testInfo info = {name, flags}; \
if (virtTestRun("Network XML-2-XML " name, \
1, testCompareXMLToXMLHelper, &info) < 0) \
testCompareXMLToXMLHelper, &info) < 0) \
ret = -1; \
} while (0)
#define DO_TEST(name) DO_TEST_FULL(name, 0)

View File

@ -130,7 +130,7 @@ mymain(void)
command, section, flags, \
parentIndex, expectFailure}; \
if (virtTestRun("Network XML-2-XML " name, \
1, testCompareXMLToXMLHelper, &info) < 0) \
testCompareXMLToXMLHelper, &info) < 0) \
ret = -1; \
} while (0)

View File

@ -69,9 +69,9 @@ mymain(void)
{
int ret = 0;
#define DO_TEST(name) \
if (virtTestRun("Node device XML-2-XML " name, \
1, testCompareXMLToXMLHelper, (name)) < 0) \
#define DO_TEST(name) \
if (virtTestRun("Node device XML-2-XML " name, \
testCompareXMLToXMLHelper, (name)) < 0) \
ret = -1
DO_TEST("computer");

View File

@ -142,7 +142,7 @@ mymain(void)
return EXIT_FAILURE;
for (i = 0; i < ARRAY_CARDINALITY(nodeData); i++)
if (virtTestRun(nodeData[i], 1, linuxTestNodeInfo, nodeData[i]) != 0)
if (virtTestRun(nodeData[i], linuxTestNodeInfo, nodeData[i]) != 0)
ret = -1;
return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;

View File

@ -104,7 +104,7 @@ mymain(void)
.expect_warning = EXPECT_WARN, \
}; \
if (virtTestRun("NWFilter XML-2-XML " NAME, \
1, testCompareXMLToXMLHelper, (&tp)) < 0) \
testCompareXMLToXMLHelper, (&tp)) < 0) \
ret = -1; \
} while (0)

View File

@ -148,7 +148,7 @@ mymain(void)
# define DO_TEST(_name) \
do { \
if (virtTestRun("OpenVZ "#_name, 1, test##_name, \
if (virtTestRun("OpenVZ "#_name, test##_name, \
NULL) < 0) { \
result = -1; \
} \

View File

@ -594,8 +594,8 @@ mymain(void)
virEventRegisterDefaultImpl();
#define DO_TEST(name) \
if (virtTestRun(# name, 1, testQemuAgent ## name, xmlopt) < 0) \
#define DO_TEST(name) \
if (virtTestRun(# name, testQemuAgent ## name, xmlopt) < 0) \
ret = -1
DO_TEST(FSFreeze);

View File

@ -126,11 +126,11 @@ mymain(void)
if (!(driver.xmlopt = virQEMUDriverCreateXMLConf(&driver)))
return EXIT_FAILURE;
# define DO_TEST_FULL(name, extraFlags, migrateFrom) \
# define DO_TEST_FULL(name, extraFlags, migrateFrom) \
do { \
const struct testInfo info = { name, extraFlags, migrateFrom }; \
if (virtTestRun("QEMU ARGV-2-XML " name, \
1, testCompareXMLToArgvHelper, &info) < 0) \
testCompareXMLToArgvHelper, &info) < 0) \
ret = -1; \
} while (0)

View File

@ -229,7 +229,7 @@ mymain(void)
#define DO_TEST(name) \
data.base = name; \
if (virtTestRun(name, 1, testQemuCaps, &data) < 0) \
if (virtTestRun(name, testQemuCaps, &data) < 0) \
ret = -1
DO_TEST("caps_1.2.2-1");

View File

@ -141,7 +141,7 @@ mymain(void)
return EXIT_FAILURE; \
virQEMUCapsSetList(info.flags, __VA_ARGS__, QEMU_CAPS_LAST); \
if (virtTestRun("QEMU Help String Parsing " name, \
1, testHelpStrParsing, &info) < 0) \
testHelpStrParsing, &info) < 0) \
ret = -1; \
virObjectUnref(info.flags); \
} while (0)

View File

@ -372,7 +372,7 @@ mymain(void)
data.mon = my_mon; \
data.keep = kep; \
data.deviceDeletedEvent = event; \
if (virtTestRun(name, 1, testQemuHotplug, &data) < 0) \
if (virtTestRun(name, testQemuHotplug, &data) < 0) \
ret = -1; \
} while (0)

View File

@ -1760,14 +1760,14 @@ mymain(void)
virEventRegisterDefaultImpl();
#define DO_TEST(name) \
if (virtTestRun(# name, 1, testQemuMonitorJSON ## name, xmlopt) < 0) \
#define DO_TEST(name) \
if (virtTestRun(# name, testQemuMonitorJSON ## name, xmlopt) < 0) \
ret = -1
#define DO_TEST_SIMPLE(CMD, FNC, ...) \
#define DO_TEST_SIMPLE(CMD, FNC, ...) \
simpleFunc = (testQemuMonitorJSONSimpleFuncData) {.cmd = CMD, .func = FNC, \
.xmlopt = xmlopt, __VA_ARGS__ }; \
if (virtTestRun(# FNC, 1, testQemuMonitorJSONSimpleFunc, &simpleFunc) < 0) \
if (virtTestRun(# FNC, testQemuMonitorJSONSimpleFunc, &simpleFunc) < 0) \
ret = -1
DO_TEST(GetStatus);

View File

@ -93,7 +93,7 @@ mymain(void)
# define DO_TEST(_name) \
do { \
if (virtTestRun("qemu monitor "#_name, 1, test##_name, \
if (virtTestRun("qemu monitor "#_name, test##_name, \
NULL) < 0) { \
result = -1; \
} \

View File

@ -332,7 +332,7 @@ mymain(void)
return EXIT_FAILURE; \
virQEMUCapsSetList(info.extraFlags, __VA_ARGS__, QEMU_CAPS_LAST);\
if (virtTestRun("QEMU XML-2-ARGV " name, \
1, testCompareXMLToArgvHelper, &info) < 0) \
testCompareXMLToArgvHelper, &info) < 0) \
ret = -1; \
virObjectUnref(info.extraFlags); \
} while (0)

View File

@ -120,7 +120,7 @@ mymain(void)
do { \
const struct testInfo info = {name, is_different, when}; \
if (virtTestRun("QEMU XML-2-XML " name, \
1, testCompareXMLToXMLHelper, &info) < 0) \
testCompareXMLToXMLHelper, &info) < 0) \
ret = -1; \
} while (0)

View File

@ -225,7 +225,7 @@ mymain(void)
return EXIT_FAILURE; \
virQEMUCapsSetList(info.extraFlags, __VA_ARGS__, QEMU_CAPS_LAST);\
if (virtTestRun("QEMU XML-2-ARGV " name, \
1, testCompareXMLToArgvHelper, &info) < 0) \
testCompareXMLToArgvHelper, &info) < 0) \
ret = -1; \
virObjectUnref(info.extraFlags); \
} while (0)

View File

@ -335,9 +335,9 @@ mymain(void)
if (!(xmlopt = virQEMUDriverCreateXMLConf(NULL)))
return EXIT_FAILURE;
#define DO_TEST_LABELING(name) \
if (virtTestRun("Labelling " # name, 1, testSELinuxLabeling, name) < 0) \
ret = -1; \
#define DO_TEST_LABELING(name) \
if (virtTestRun("Labelling " # name, testSELinuxLabeling, name) < 0) \
ret = -1;
setcon((security_context_t)"system_r:system_u:libvirtd_t:s0:c0.c1023");

View File

@ -291,7 +291,7 @@ mymain(void)
user, role, imageRole, type, imageType, \
sensMin, sensMax, catMin, catMax \
}; \
if (virtTestRun("GenLabel " # desc, 1, testSELinuxGenLabel, &data) < 0) \
if (virtTestRun("GenLabel " # desc, testSELinuxGenLabel, &data) < 0) \
ret = -1; \
} while (0)

View File

@ -123,7 +123,7 @@ mymain(void)
struct testInfo info = { in, out, version }; \
virResetLastError(); \
if (virtTestRun("Xen SEXPR-2-XML " in " -> " out, \
1, testCompareHelper, &info) < 0) \
testCompareHelper, &info) < 0) \
ret = -1; \
} while (0)

View File

@ -190,7 +190,7 @@ mymain(void)
struct testParseData data = { &addr, addrstr, family, pass }; \
memset(&addr, 0, sizeof(addr)); \
if (virtTestRun("Test parse " addrstr, \
1, testParseHelper, &data) < 0) \
testParseHelper, &data) < 0) \
ret = -1; \
} while (0)
@ -200,11 +200,11 @@ mymain(void)
struct testParseData data = { &addr, addrstr, family, pass }; \
memset(&addr, 0, sizeof(addr)); \
if (virtTestRun("Test parse " addrstr " family " #family, \
1, testParseHelper, &data) < 0) \
testParseHelper, &data) < 0) \
ret = -1; \
struct testFormatData data2 = { &addr, addrstr, pass }; \
if (virtTestRun("Test format " addrstr " family " #family, \
1, testFormatHelper, &data2) < 0) \
testFormatHelper, &data2) < 0) \
ret = -1; \
} while (0)
@ -214,11 +214,11 @@ mymain(void)
struct testParseData data = { &addr, addrstr, family, true}; \
memset(&addr, 0, sizeof(addr)); \
if (virtTestRun("Test parse " addrstr " family " #family, \
1, testParseHelper, &data) < 0) \
testParseHelper, &data) < 0) \
ret = -1; \
struct testFormatData data2 = { &addr, addrformated, pass }; \
if (virtTestRun("Test format " addrstr " family " #family, \
1, testFormatHelper, &data2) < 0) \
testFormatHelper, &data2) < 0) \
ret = -1; \
} while (0)
@ -226,7 +226,7 @@ mymain(void)
do { \
struct testRangeData data = { saddr, eaddr, size, pass }; \
if (virtTestRun("Test range " saddr " -> " eaddr " size " #size, \
1, testRangeHelper, &data) < 0) \
testRangeHelper, &data) < 0) \
ret = -1; \
} while (0)
@ -234,14 +234,14 @@ mymain(void)
do { \
struct testNetmaskData data = { addr1, addr2, netmask, pass }; \
if (virtTestRun("Test netmask " addr1 " + " addr2 " in " netmask, \
1, testNetmaskHelper, &data) < 0) \
testNetmaskHelper, &data) < 0) \
ret = -1; \
} while (0)
#define DO_TEST_WILDCARD(addr, pass) \
do { \
struct testWildcardData data = { addr, pass}; \
if (virtTestRun("Test wildcard " addr, 1, \
if (virtTestRun("Test wildcard " addr, \
testWildcardHelper, &data) < 0) \
ret = -1; \
} while (0)

View File

@ -67,7 +67,7 @@ mymain(void)
do { \
struct testInfo info = { dev, num }; \
if (virtTestRun("Device " dev " -> " # num, \
1, testDeviceHelper, &info) < 0) \
testDeviceHelper, &info) < 0) \
ret = -1; \
} while (0)

View File

@ -79,9 +79,9 @@ mymain(void)
{
int ret = 0;
#define DO_TEST(name) \
if (virtTestRun("Storage Pool XML-2-XML " name, \
1, testCompareXMLToXMLHelper, (name)) < 0) \
#define DO_TEST(name) \
if (virtTestRun("Storage Pool XML-2-XML " name, \
testCompareXMLToXMLHelper, (name)) < 0) \
ret = -1
DO_TEST("pool-dir");

View File

@ -212,7 +212,7 @@ mymain(void)
struct testInfo info = { shouldFail, pool, vol, inputpool, inputvol, \
cmdline, flags, imgformat }; \
if (virtTestRun("Storage Vol XML-2-argv " cmdline, \
1, testCompareXMLToArgvHelper, &info) < 0) \
testCompareXMLToArgvHelper, &info) < 0) \
ret = -1; \
} \
while (0);

View File

@ -100,13 +100,13 @@ mymain(void)
{
int ret = 0;
#define DO_TEST(pool, name) \
do { \
struct testInfo info = { pool, name }; \
if (virtTestRun("Storage Vol XML-2-XML " name, \
1, testCompareXMLToXMLHelper, &info) < 0) \
ret = -1; \
} \
#define DO_TEST(pool, name) \
do { \
struct testInfo info = { pool, name }; \
if (virtTestRun("Storage Vol XML-2-XML " name, \
testCompareXMLToXMLHelper, &info) < 0) \
ret = -1; \
} \
while (0);
DO_TEST("pool-dir", "vol-file");

View File

@ -117,7 +117,7 @@ sysinfotest_run(const char *test,
goto error;
}
if (virtTestRun(test, 1, testSysinfo, &testdata) < 0)
if (virtTestRun(test, testSysinfo, &testdata) < 0)
goto error;
ret = EXIT_SUCCESS;

View File

@ -71,19 +71,6 @@ static size_t testEnd = 0;
char *progname;
char *abs_srcdir;
double
virtTestCountAverage(double *items, int nitems)
{
long double sum = 0;
size_t i;
for (i=1; i < nitems; i++)
sum += items[i];
return (double) (sum / nitems);
}
void virtTestResult(const char *name, int ret, const char *msg, ...)
{
va_list vargs;
@ -123,16 +110,15 @@ void virtTestResult(const char *name, int ret, const char *msg, ...)
}
/*
* Runs test and count average time (if the nloops is grater than 1)
* Runs test
*
* returns: -1 = error, 0 = success
*/
int
virtTestRun(const char *title, int nloops, int (*body)(const void *data), const void *data)
virtTestRun(const char *title,
int (*body)(const void *data), const void *data)
{
int ret = 0;
size_t i;
double *ts = NULL;
if (testCounter == 0 && !virTestGetVerbose())
fprintf(stderr, " ");
@ -149,37 +135,16 @@ virtTestRun(const char *title, int nloops, int (*body)(const void *data), const
if (virTestGetVerbose())
fprintf(stderr, "%2zu) %-65s ... ", testCounter, title);
if (nloops > 1 && (VIR_ALLOC_N(ts, nloops) < 0))
return -1;
for (i=0; i < nloops; i++) {
struct timeval before, after;
if (ts)
GETTIMEOFDAY(&before);
virResetLastError();
ret = body(data);
virErrorPtr err = virGetLastError();
if (err) {
if (virTestGetVerbose() || virTestGetDebug())
virDispatchError(NULL);
}
if (ret != 0) {
break;
}
if (ts) {
GETTIMEOFDAY(&after);
ts[i] = DIFF_MSEC(&after, &before);
}
virResetLastError();
ret = body(data);
virErrorPtr err = virGetLastError();
if (err) {
if (virTestGetVerbose() || virTestGetDebug())
virDispatchError(NULL);
}
if (virTestGetVerbose()) {
if (ret == 0 && ts)
fprintf(stderr, "OK [%.5f ms]\n",
virtTestCountAverage(ts, nloops));
else if (ret == 0)
if (ret == 0)
fprintf(stderr, "OK\n");
else if (ret == EXIT_AM_SKIP)
fprintf(stderr, "SKIP\n");
@ -199,7 +164,6 @@ virtTestRun(const char *title, int nloops, int (*body)(const void *data), const
fprintf(stderr, "!");
}
VIR_FREE(ts);
return ret;
}

View File

@ -40,13 +40,9 @@
extern char *progname;
extern char *abs_srcdir;
double virtTestCountAverage(double *items,
int nitems);
void virtTestResult(const char *name, int ret, const char *msg, ...)
ATTRIBUTE_FMT_PRINTF(3,4);
int virtTestRun(const char *title,
int nloops,
int (*body)(const void *data),
const void *data);
int virtTestLoadFile(const char *file, char **buf);

View File

@ -152,9 +152,9 @@ mymain(void)
virtTestQuiesceLibvirtErrors(true);
#define DO_TEST(_name) \
#define DO_TEST(_name) \
do { \
if (virtTestRun("Util "#_name, 1, test##_name, \
if (virtTestRun("Util "#_name, test##_name, \
NULL) < 0) { \
result = -1; \
} \

View File

@ -167,9 +167,9 @@ mymain(void)
if (virThreadInitialize() < 0)
return -1;
if (virtTestRun("types", 1, testTypes, NULL) < 0)
if (virtTestRun("types", testTypes, NULL) < 0)
ret = -1;
if (virtTestRun("threads", 1, testThreads, NULL) < 0)
if (virtTestRun("threads", testThreads, NULL) < 0)
ret = -1;
return ret;

View File

@ -96,7 +96,7 @@ mymain(void)
config, hostname, service, credname, expect \
}; \
if (virtTestRun("Test Lookup " hostname "-" service "-" credname, \
1, testAuthLookup, &data) < 0) \
testAuthLookup, &data) < 0) \
ret = -1; \
} while (0)

View File

@ -502,23 +502,23 @@ mymain(void)
{
int ret = 0;
if (virtTestRun("test1", 1, test1, NULL) < 0)
if (virtTestRun("test1", test1, NULL) < 0)
ret = -1;
if (virtTestRun("test2", 1, test2, NULL) < 0)
if (virtTestRun("test2", test2, NULL) < 0)
ret = -1;
if (virtTestRun("test3", 1, test3, NULL) < 0)
if (virtTestRun("test3", test3, NULL) < 0)
ret = -1;
if (virtTestRun("test4", 1, test4, NULL) < 0)
if (virtTestRun("test4", test4, NULL) < 0)
ret = -1;
if (virtTestRun("test5", 1, test5, NULL) < 0)
if (virtTestRun("test5", test5, NULL) < 0)
ret = -1;
if (virtTestRun("test6", 1, test6, NULL) < 0)
if (virtTestRun("test6", test6, NULL) < 0)
ret = -1;
if (virtTestRun("test7", 1, test7, NULL) < 0)
if (virtTestRun("test7", test7, NULL) < 0)
ret = -1;
if (virtTestRun("test8", 1, test8, NULL) < 0)
if (virtTestRun("test8", test8, NULL) < 0)
ret = -1;
if (virtTestRun("test9", 1, test9, NULL) < 0)
if (virtTestRun("test9", test9, NULL) < 0)
ret = -1;
return ret;

View File

@ -210,7 +210,7 @@ mymain(void)
#define DO_TEST(msg, cb, data) \
do { \
struct testInfo info = { data }; \
if (virtTestRun("Buf: " msg, 1, cb, &info) < 0) \
if (virtTestRun("Buf: " msg, cb, &info) < 0) \
ret = -1; \
} while (0)

View File

@ -550,38 +550,38 @@ mymain(void)
setenv("LIBVIRT_FAKE_SYSFS_DIR", fakesysfsdir, 1);
if (virtTestRun("New cgroup for self", 1, testCgroupNewForSelf, NULL) < 0)
if (virtTestRun("New cgroup for self", testCgroupNewForSelf, NULL) < 0)
ret = -1;
if (virtTestRun("New cgroup for partition", 1, testCgroupNewForPartition, NULL) < 0)
if (virtTestRun("New cgroup for partition", testCgroupNewForPartition, NULL) < 0)
ret = -1;
if (virtTestRun("New cgroup for partition nested", 1, testCgroupNewForPartitionNested, NULL) < 0)
if (virtTestRun("New cgroup for partition nested", testCgroupNewForPartitionNested, NULL) < 0)
ret = -1;
if (virtTestRun("New cgroup for partition nested deeply", 1, testCgroupNewForPartitionNestedDeep, NULL) < 0)
if (virtTestRun("New cgroup for partition nested deeply", testCgroupNewForPartitionNestedDeep, NULL) < 0)
ret = -1;
if (virtTestRun("New cgroup for domain partition", 1, testCgroupNewForPartitionDomain, NULL) < 0)
if (virtTestRun("New cgroup for domain partition", testCgroupNewForPartitionDomain, NULL) < 0)
ret = -1;
if (virtTestRun("New cgroup for domain partition escaped", 1, testCgroupNewForPartitionDomainEscaped, NULL) < 0)
if (virtTestRun("New cgroup for domain partition escaped", testCgroupNewForPartitionDomainEscaped, NULL) < 0)
ret = -1;
if (virtTestRun("Cgroup available", 1, testCgroupAvailable, (void*)0x1) < 0)
if (virtTestRun("Cgroup available", testCgroupAvailable, (void*)0x1) < 0)
ret = -1;
setenv("VIR_CGROUP_MOCK_MODE", "allinone", 1);
if (virtTestRun("New cgroup for self (allinone)", 1, testCgroupNewForSelfAllInOne, NULL) < 0)
if (virtTestRun("New cgroup for self (allinone)", testCgroupNewForSelfAllInOne, NULL) < 0)
ret = -1;
if (virtTestRun("Cgroup available", 1, testCgroupAvailable, (void*)0x1) < 0)
if (virtTestRun("Cgroup available", testCgroupAvailable, (void*)0x1) < 0)
ret = -1;
unsetenv("VIR_CGROUP_MOCK_MODE");
setenv("VIR_CGROUP_MOCK_MODE", "logind", 1);
if (virtTestRun("New cgroup for self (logind)", 1, testCgroupNewForSelfLogind, NULL) < 0)
if (virtTestRun("New cgroup for self (logind)", testCgroupNewForSelfLogind, NULL) < 0)
ret = -1;
if (virtTestRun("Cgroup available", 1, testCgroupAvailable, (void*)0x0) < 0)
if (virtTestRun("Cgroup available", testCgroupAvailable, (void*)0x0) < 0)
ret = -1;
unsetenv("VIR_CGROUP_MOCK_MODE");

View File

@ -377,15 +377,15 @@ mymain(void)
{
int ret = 0;
if (virtTestRun("Test message simple ", 1, testMessageSimple, NULL) < 0)
if (virtTestRun("Test message simple ", testMessageSimple, NULL) < 0)
ret = -1;
if (virtTestRun("Test message variant ", 1, testMessageVariant, NULL) < 0)
if (virtTestRun("Test message variant ", testMessageVariant, NULL) < 0)
ret = -1;
if (virtTestRun("Test message array ", 1, testMessageArray, NULL) < 0)
if (virtTestRun("Test message array ", testMessageArray, NULL) < 0)
ret = -1;
if (virtTestRun("Test message struct ", 1, testMessageStruct, NULL) < 0)
if (virtTestRun("Test message struct ", testMessageStruct, NULL) < 0)
ret = -1;
if (virtTestRun("Test message dict ", 1, testMessageDict, NULL) < 0)
if (virtTestRun("Test message dict ", testMessageDict, NULL) < 0)
ret = -1;
return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
}

View File

@ -59,7 +59,7 @@ mymain(void)
#define TEST(name, dep1) \
do { \
const struct testDriverData data = { name, dep1 }; \
if (virtTestRun("Test driver " # name, 1, testDriverModule, &data) < 0) \
if (virtTestRun("Test driver " # name, testDriverModule, &data) < 0) \
ret = -1; \
} while (0)

View File

@ -91,9 +91,9 @@ mymain(void)
{
int ret = 0;
if (virtTestRun("test1", 1, test1, NULL) < 0)
if (virtTestRun("test1", test1, NULL) < 0)
ret = -1;
if (virtTestRun("test2", 1, test2, NULL) < 0)
if (virtTestRun("test2", test2, NULL) < 0)
ret = -1;
return ret;

View File

@ -668,7 +668,7 @@ mymain(void)
#define DO_TEST_FULL(name, cmd, data, count) \
do { \
struct testInfo info = { data, count }; \
if (virtTestRun(name, 1, testHash ## cmd, &info) < 0) \
if (virtTestRun(name, testHash ## cmd, &info) < 0) \
ret = -1; \
} while (0)

View File

@ -164,9 +164,9 @@ mymain(void)
{
int ret = 0;
if (virtTestRun("Identity attributes ", 1, testIdentityAttrs, NULL) < 0)
if (virtTestRun("Identity attributes ", testIdentityAttrs, NULL) < 0)
ret = -1;
if (virtTestRun("Identity equality ", 1, testIdentityEqual, NULL) < 0)
if (virtTestRun("Identity equality ", testIdentityEqual, NULL) < 0)
ret = -1;
return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;

View File

@ -96,9 +96,9 @@ mymain(void)
{
int ret = 0;
if (virtTestRun("Keycode mapping ", 1, testKeycodeMapping, NULL) < 0)
if (virtTestRun("Keycode mapping ", testKeycodeMapping, NULL) < 0)
ret = -1;
if (virtTestRun("Keycode strings ", 1, testKeycodeStrings, NULL) < 0)
if (virtTestRun("Keycode strings ", testKeycodeStrings, NULL) < 0)
ret = -1;
return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;

View File

@ -113,7 +113,7 @@ mymain(void)
signal(SIGPIPE, SIG_IGN);
if (virtTestRun("Test parse", 1, testParse, NULL) < 0)
if (virtTestRun("Test parse", testParse, NULL) < 0)
ret = -1;
return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;

View File

@ -345,25 +345,25 @@ mymain(void)
signal(SIGPIPE, SIG_IGN);
if (virtTestRun("Lockspace creation", 1, testLockSpaceCreate, NULL) < 0)
if (virtTestRun("Lockspace creation", testLockSpaceCreate, NULL) < 0)
ret = -1;
if (virtTestRun("Lockspace res lifecycle", 1, testLockSpaceResourceLifecycle, NULL) < 0)
if (virtTestRun("Lockspace res lifecycle", testLockSpaceResourceLifecycle, NULL) < 0)
ret = -1;
if (virtTestRun("Lockspace res lock excl", 1, testLockSpaceResourceLockExcl, NULL) < 0)
if (virtTestRun("Lockspace res lock excl", testLockSpaceResourceLockExcl, NULL) < 0)
ret = -1;
if (virtTestRun("Lockspace res lock shr", 1, testLockSpaceResourceLockShr, NULL) < 0)
if (virtTestRun("Lockspace res lock shr", testLockSpaceResourceLockShr, NULL) < 0)
ret = -1;
if (virtTestRun("Lockspace res lock excl auto", 1, testLockSpaceResourceLockExclAuto, NULL) < 0)
if (virtTestRun("Lockspace res lock excl auto", testLockSpaceResourceLockExclAuto, NULL) < 0)
ret = -1;
if (virtTestRun("Lockspace res lock shr auto", 1, testLockSpaceResourceLockShrAuto, NULL) < 0)
if (virtTestRun("Lockspace res lock shr auto", testLockSpaceResourceLockShrAuto, NULL) < 0)
ret = -1;
if (virtTestRun("Lockspace res full path", 1, testLockSpaceResourceLockPath, NULL) < 0)
if (virtTestRun("Lockspace res full path", testLockSpaceResourceLockPath, NULL) < 0)
ret = -1;
return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;

View File

@ -527,19 +527,19 @@ mymain(void)
signal(SIGPIPE, SIG_IGN);
if (virtTestRun("Message Header Encode", 1, testMessageHeaderEncode, NULL) < 0)
if (virtTestRun("Message Header Encode", testMessageHeaderEncode, NULL) < 0)
ret = -1;
if (virtTestRun("Message Header Decode", 1, testMessageHeaderDecode, NULL) < 0)
if (virtTestRun("Message Header Decode", testMessageHeaderDecode, NULL) < 0)
ret = -1;
if (virtTestRun("Message Payload Encode", 1, testMessagePayloadEncode, NULL) < 0)
if (virtTestRun("Message Payload Encode", testMessagePayloadEncode, NULL) < 0)
ret = -1;
if (virtTestRun("Message Payload Decode", 1, testMessagePayloadDecode, NULL) < 0)
if (virtTestRun("Message Payload Decode", testMessagePayloadDecode, NULL) < 0)
ret = -1;
if (virtTestRun("Message Payload Stream Encode", 1, testMessagePayloadStreamEncode, NULL) < 0)
if (virtTestRun("Message Payload Stream Encode", testMessagePayloadStreamEncode, NULL) < 0)
ret = -1;
return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;

View File

@ -143,7 +143,7 @@ mymain(void)
int ret = 0;
if (virtTestRun("Identity", 1,
if (virtTestRun("Identity",
testIdentity, NULL) < 0)
ret = -1;

View File

@ -471,35 +471,35 @@ mymain(void)
if (hasIPv4) {
struct testTCPData tcpData = { "127.0.0.1", freePort, "127.0.0.1" };
if (virtTestRun("Socket TCP/IPv4 Accept", 1, testSocketTCPAccept, &tcpData) < 0)
if (virtTestRun("Socket TCP/IPv4 Accept", testSocketTCPAccept, &tcpData) < 0)
ret = -1;
}
if (hasIPv6) {
struct testTCPData tcpData = { "::1", freePort, "::1" };
if (virtTestRun("Socket TCP/IPv6 Accept", 1, testSocketTCPAccept, &tcpData) < 0)
if (virtTestRun("Socket TCP/IPv6 Accept", testSocketTCPAccept, &tcpData) < 0)
ret = -1;
}
if (hasIPv6 && hasIPv4) {
struct testTCPData tcpData = { NULL, freePort, "127.0.0.1" };
if (virtTestRun("Socket TCP/IPv4+IPv6 Accept", 1, testSocketTCPAccept, &tcpData) < 0)
if (virtTestRun("Socket TCP/IPv4+IPv6 Accept", testSocketTCPAccept, &tcpData) < 0)
ret = -1;
tcpData.cnode = "::1";
if (virtTestRun("Socket TCP/IPv4+IPv6 Accept", 1, testSocketTCPAccept, &tcpData) < 0)
if (virtTestRun("Socket TCP/IPv4+IPv6 Accept", testSocketTCPAccept, &tcpData) < 0)
ret = -1;
}
#endif
#ifndef WIN32
if (virtTestRun("Socket UNIX Accept", 1, testSocketUNIXAccept, NULL) < 0)
if (virtTestRun("Socket UNIX Accept", testSocketUNIXAccept, NULL) < 0)
ret = -1;
if (virtTestRun("Socket UNIX Addrs", 1, testSocketUNIXAddrs, NULL) < 0)
if (virtTestRun("Socket UNIX Addrs", testSocketUNIXAddrs, NULL) < 0)
ret = -1;
if (virtTestRun("Socket External Command /dev/zero", 1, testSocketCommandNormal, NULL) < 0)
if (virtTestRun("Socket External Command /dev/zero", testSocketCommandNormal, NULL) < 0)
ret = -1;
if (virtTestRun("Socket External Command /dev/does-not-exist", 1, testSocketCommandFail, NULL) < 0)
if (virtTestRun("Socket External Command /dev/does-not-exist", testSocketCommandFail, NULL) < 0)
ret = -1;
struct testSSHData sshData1 = {
@ -512,7 +512,7 @@ mymain(void)
"fi;"
"'nc' $ARG -U /tmp/socket'\n",
};
if (virtTestRun("SSH test 1", 1, testSocketSSH, &sshData1) < 0)
if (virtTestRun("SSH test 1", testSocketSSH, &sshData1) < 0)
ret = -1;
struct testSSHData sshData2 = {
@ -531,7 +531,7 @@ mymain(void)
"fi;"
"'netcat' $ARG -U /tmp/socket'\n",
};
if (virtTestRun("SSH test 2", 1, testSocketSSH, &sshData2) < 0)
if (virtTestRun("SSH test 2", testSocketSSH, &sshData2) < 0)
ret = -1;
struct testSSHData sshData3 = {
@ -550,7 +550,7 @@ mymain(void)
"fi;"
"'netcat' $ARG -U /tmp/socket'\n",
};
if (virtTestRun("SSH test 3", 1, testSocketSSH, &sshData3) < 0)
if (virtTestRun("SSH test 3", testSocketSSH, &sshData3) < 0)
ret = -1;
struct testSSHData sshData4 = {
@ -558,7 +558,7 @@ mymain(void)
.path = "/tmp/socket",
.failConnect = true,
};
if (virtTestRun("SSH test 4", 1, testSocketSSH, &sshData4) < 0)
if (virtTestRun("SSH test 4", testSocketSSH, &sshData4) < 0)
ret = -1;
struct testSSHData sshData5 = {
@ -573,7 +573,7 @@ mymain(void)
"'nc' $ARG -U /tmp/socket'\n",
.dieEarly = true,
};
if (virtTestRun("SSH test 5", 1, testSocketSSH, &sshData5) < 0)
if (virtTestRun("SSH test 5", testSocketSSH, &sshData5) < 0)
ret = -1;
struct testSSHData sshData6 = {
@ -589,7 +589,7 @@ mymain(void)
"fi;"
"'nc' $ARG -U /tmp/socket'\n",
};
if (virtTestRun("SSH test 6", 1, testSocketSSH, &sshData6) < 0)
if (virtTestRun("SSH test 6", testSocketSSH, &sshData6) < 0)
ret = -1;
struct testSSHData sshData7 = {
@ -603,7 +603,7 @@ mymain(void)
"fi;"
"''nc -4'' $ARG -U /tmp/socket'\n",
};
if (virtTestRun("SSH test 7", 1, testSocketSSH, &sshData7) < 0)
if (virtTestRun("SSH test 7", testSocketSSH, &sshData7) < 0)
ret = -1;
#endif

View File

@ -120,7 +120,7 @@ mymain(void)
data.cacrt = _caCrt; \
data.crt = _crt; \
data.expectFail = _expectFail; \
if (virtTestRun("TLS Context " #_caCrt " + " #_crt, 1, \
if (virtTestRun("TLS Context " #_caCrt " + " #_crt, \
testTLSContextInit, &data) < 0) \
ret = -1; \
} while (0)

View File

@ -253,7 +253,7 @@ mymain(void)
data.hostname = _hostname; \
data.wildcards = _wildcards; \
if (virtTestRun("TLS Session " #_serverCrt " + " #_clientCrt, \
1, testTLSSessionInit, &data) < 0) \
testTLSSessionInit, &data) < 0) \
ret = -1; \
} while (0)
@ -271,7 +271,7 @@ mymain(void)
data.hostname = _hostname; \
data.wildcards = _wildcards; \
if (virtTestRun("TLS Session " #_serverCrt " + " #_clientCrt, \
1, testTLSSessionInit, &data) < 0) \
testTLSSessionInit, &data) < 0) \
ret = -1; \
} while (0)

View File

@ -191,10 +191,10 @@ mymain(void)
{
int ret = 0;
if (virtTestRun("Test alloc all", 1, testAllocAll, NULL) < 0)
if (virtTestRun("Test alloc all", testAllocAll, NULL) < 0)
ret = -1;
if (virtTestRun("Test alloc reuse", 1, testAllocReuse, NULL) < 0)
if (virtTestRun("Test alloc reuse", testAllocReuse, NULL) < 0)
ret = -1;
return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;

View File

@ -241,77 +241,77 @@ mymain(void)
return EXIT_FAILURE;
if (virtTestRun("virsh list (default)",
1, testCompareListDefault, NULL) != 0)
testCompareListDefault, NULL) != 0)
ret = -1;
if (virtTestRun("virsh list (custom)",
1, testCompareListCustom, NULL) != 0)
testCompareListCustom, NULL) != 0)
ret = -1;
if (virtTestRun("virsh nodeinfo (default)",
1, testCompareNodeinfoDefault, NULL) != 0)
testCompareNodeinfoDefault, NULL) != 0)
ret = -1;
if (virtTestRun("virsh nodeinfo (custom)",
1, testCompareNodeinfoCustom, NULL) != 0)
testCompareNodeinfoCustom, NULL) != 0)
ret = -1;
if (virtTestRun("virsh dominfo (by id)",
1, testCompareDominfoByID, NULL) != 0)
testCompareDominfoByID, NULL) != 0)
ret = -1;
if (virtTestRun("virsh dominfo (by uuid)",
1, testCompareDominfoByUUID, NULL) != 0)
testCompareDominfoByUUID, NULL) != 0)
ret = -1;
if (virtTestRun("virsh dominfo (by name)",
1, testCompareDominfoByName, NULL) != 0)
testCompareDominfoByName, NULL) != 0)
ret = -1;
if (virtTestRun("virsh domid (by name)",
1, testCompareDomidByName, NULL) != 0)
testCompareDomidByName, NULL) != 0)
ret = -1;
if (virtTestRun("virsh domid (by uuid)",
1, testCompareDomidByUUID, NULL) != 0)
testCompareDomidByUUID, NULL) != 0)
ret = -1;
if (virtTestRun("virsh domuuid (by id)",
1, testCompareDomuuidByID, NULL) != 0)
testCompareDomuuidByID, NULL) != 0)
ret = -1;
if (virtTestRun("virsh domuuid (by name)",
1, testCompareDomuuidByName, NULL) != 0)
testCompareDomuuidByName, NULL) != 0)
ret = -1;
if (virtTestRun("virsh domname (by id)",
1, testCompareDomnameByID, NULL) != 0)
testCompareDomnameByID, NULL) != 0)
ret = -1;
if (virtTestRun("virsh domname (by uuid)",
1, testCompareDomnameByUUID, NULL) != 0)
testCompareDomnameByUUID, NULL) != 0)
ret = -1;
if (virtTestRun("virsh domstate (by id)",
1, testCompareDomstateByID, NULL) != 0)
testCompareDomstateByID, NULL) != 0)
ret = -1;
if (virtTestRun("virsh domstate (by uuid)",
1, testCompareDomstateByUUID, NULL) != 0)
testCompareDomstateByUUID, NULL) != 0)
ret = -1;
if (virtTestRun("virsh domstate (by name)",
1, testCompareDomstateByName, NULL) != 0)
testCompareDomstateByName, NULL) != 0)
ret = -1;
/* It's a bit awkward listing result before argument, but that's a
* limitation of C99 vararg macros. */
# define DO_TEST(i, result, ...) \
# define DO_TEST(i, result, ...) \
do { \
const char *myargv[] = { VIRSH_DEFAULT, __VA_ARGS__, NULL }; \
const struct testInfo info = { myargv, result }; \
if (virtTestRun("virsh echo " #i, \
1, testCompareEcho, &info) < 0) \
testCompareEcho, &info) < 0) \
ret = -1; \
} while (0)

View File

@ -311,7 +311,7 @@ mymain(void)
struct testChainData data = { \
start, format, chain, ARRAY_CARDINALITY(chain), flags, \
}; \
if (virtTestRun("Storage backing chain " id, 1, \
if (virtTestRun("Storage backing chain " id, \
testStorageChain, &data) < 0) \
ret = -1; \
} while (0)

View File

@ -249,9 +249,9 @@ mymain(void)
.delim = del, \
.tokens = toks, \
}; \
if (virtTestRun("Split " #str, 1, testSplit, &splitData) < 0) \
if (virtTestRun("Split " #str, testSplit, &splitData) < 0) \
ret = -1; \
if (virtTestRun("Join " #str, 1, testJoin, &joinData) < 0) \
if (virtTestRun("Join " #str, testJoin, &joinData) < 0) \
ret = -1; \
} while (0)
@ -276,10 +276,10 @@ mymain(void)
const char *tokens7[] = { "The", "quick", "brown", "fox", "", NULL };
TEST_SPLIT("The quick brown fox ", " ", 0, tokens7);
if (virtTestRun("strdup", 1, testStrdup, NULL) < 0)
if (virtTestRun("strdup", testStrdup, NULL) < 0)
ret = -1;
if (virtTestRun("strdup", 1, testStrndupNegative, NULL) < 0)
if (virtTestRun("strdup", testStrndupNegative, NULL) < 0)
ret = -1;
return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;

View File

@ -206,17 +206,17 @@ mymain(void)
{
int ret = 0;
if (virtTestRun("Test create container ", 1, testCreateContainer, NULL) < 0)
if (virtTestRun("Test create container ", testCreateContainer, NULL) < 0)
ret = -1;
if (virtTestRun("Test terminate container ", 1, testTerminateContainer, NULL) < 0)
if (virtTestRun("Test terminate container ", testTerminateContainer, NULL) < 0)
ret = -1;
if (virtTestRun("Test create machine ", 1, testCreateMachine, NULL) < 0)
if (virtTestRun("Test create machine ", testCreateMachine, NULL) < 0)
ret = -1;
if (virtTestRun("Test terminate machine ", 1, testTerminateMachine, NULL) < 0)
if (virtTestRun("Test terminate machine ", testTerminateMachine, NULL) < 0)
ret = -1;
if (virtTestRun("Test create no systemd ", 1, testCreateNoSystemd, NULL) < 0)
if (virtTestRun("Test create no systemd ", testCreateNoSystemd, NULL) < 0)
ret = -1;
if (virtTestRun("Test create bad systemd ", 1, testCreateBadSystemd, NULL) < 0)
if (virtTestRun("Test create bad systemd ", testCreateBadSystemd, NULL) < 0)
ret = -1;
# define TEST_SCOPE(name, partition, unitname) \
@ -224,7 +224,7 @@ mymain(void)
struct testScopeData data = { \
name, partition, unitname \
}; \
if (virtTestRun("Test scopename", 1, testScopeName, &data) < 0) \
if (virtTestRun("Test scopename", testScopeName, &data) < 0) \
ret = -1; \
} while (0)

View File

@ -93,7 +93,7 @@ mymain(void)
.tm_isdst = 0, \
}, \
}; \
if (virtTestRun("Test fields " #ts " " #year " ", 1, testTimeFields, &data) < 0) \
if (virtTestRun("Test fields " #ts " " #year " ", testTimeFields, &data) < 0) \
ret = -1; \
} while (0)

View File

@ -149,7 +149,7 @@ mymain(void)
uri, (uri_out) ? (uri_out) : (uri), scheme, server, port, \
path, query, fragment, user, params \
}; \
if (virtTestRun("Test URI " # uri, 1, testURIParse, &data) < 0) \
if (virtTestRun("Test URI " # uri, testURIParse, &data) < 0) \
ret = -1; \
} while (0)
#define TEST_PARSE(uri, scheme, server, port, path, query, fragment, user, params) \

View File

@ -83,7 +83,7 @@ mymain(void)
vmware_type, name, version \
}; \
if (virtTestRun("VMware Version String Parsing " name, \
1, testVerStrParse, &info) < 0) \
testVerStrParse, &info) < 0) \
ret = -1; \
} while (0)

View File

@ -188,7 +188,7 @@ mymain(void)
do { \
struct testInfo info = { _in, _out }; \
virResetLastError(); \
if (virtTestRun("VMware VMX-2-XML "_in" -> "_out, 1, \
if (virtTestRun("VMware VMX-2-XML "_in" -> "_out, \
testCompareHelper, &info) < 0) { \
ret = -1; \
} \

View File

@ -167,50 +167,50 @@ mymain(void)
return EXIT_FAILURE;
if (virtTestRun("Capabilities for i686, no PAE, no HVM",
1, testXeni686, NULL) != 0)
testXeni686, NULL) != 0)
ret = -1;
if (virtTestRun("Capabilities for i686, PAE, no HVM",
1, testXeni686PAE, NULL) != 0)
testXeni686PAE, NULL) != 0)
ret = -1;
/* No PAE + HVM is non-sensical - all VMX capable
CPUs have PAE */
/*if (virtTestRun("Capabilities for i686, no PAE, HVM",
1, testXeni686HVM, NULL) != 0)
testXeni686HVM, NULL) != 0)
ret = -1;
*/
if (virtTestRun("Capabilities for i686, PAE, HVM",
1, testXeni686PAEHVM, NULL) != 0)
testXeni686PAEHVM, NULL) != 0)
ret = -1;
if (virtTestRun("Capabilities for x86_64, no HVM",
1, testXenx86_64, NULL) != 0)
testXenx86_64, NULL) != 0)
ret = -1;
if (virtTestRun("Capabilities for x86_64, HVM",
1, testXenx86_64HVM, NULL) != 0)
testXenx86_64HVM, NULL) != 0)
ret = -1;
if (virtTestRun("Capabilities for ia64, no HVM, LE",
1, testXenia64, NULL) != 0)
testXenia64, NULL) != 0)
ret = -1;
if (virtTestRun("Capabilities for ia64, HVM, LE",
1, testXenia64HVM, NULL) != 0)
testXenia64HVM, NULL) != 0)
ret = -1;
if (virtTestRun("Capabilities for ia64, no HVM, BE",
1, testXenia64BE, NULL) != 0)
testXenia64BE, NULL) != 0)
ret = -1;
if (virtTestRun("Capabilities for ia64, HVM, BE",
1, testXenia64BEHVM, NULL) != 0)
testXenia64BEHVM, NULL) != 0)
ret = -1;
if (virtTestRun("Capabilities for ppc64",
1, testXenppc64, NULL) != 0)
testXenppc64, NULL) != 0)
ret = -1;

View File

@ -207,10 +207,10 @@ mymain(void)
struct testInfo info0 = { name, version, 0 }; \
struct testInfo info1 = { name, version, 1 }; \
if (virtTestRun("Xen XM-2-XML Parse " name, \
1, testCompareHelper, &info0) < 0) \
testCompareHelper, &info0) < 0) \
ret = -1; \
if (virtTestRun("Xen XM-2-XML Format " name, \
1, testCompareHelper, &info1) < 0) \
testCompareHelper, &info1) < 0) \
ret = -1; \
} while (0)

View File

@ -101,7 +101,7 @@ mymain(void)
struct testInfo info = { in, out, name, version }; \
virResetLastError(); \
if (virtTestRun("Xen XML-2-SEXPR " in " -> " out, \
1, testCompareHelper, &info) < 0) \
testCompareHelper, &info) < 0) \
ret = -1; \
} while (0)

View File

@ -220,7 +220,7 @@ mymain(void)
do { \
struct testInfo info = { _in, _out, _version }; \
virResetLastError(); \
if (virtTestRun("VMware XML-2-VMX "_in" -> "_out, 1, \
if (virtTestRun("VMware XML-2-VMX "_in" -> "_out, \
testCompareHelper, &info) < 0) { \
result = -1; \
} \