diff --git a/ChangeLog b/ChangeLog index 638711bf07..2584bb0185 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Thu Dec 18 12:07:58 GMT 2008 Daniel P. Berrange + + * src/test.c: Fix error return value + * tests/nodeinfotest.c: Disable code compile completely on + non-linux (John Levon) + Thu Dec 18 11:59:58 GMT 2008 Daniel P. Berrange * qemud/remote.c: Fix unused variable compile warning when polkit diff --git a/src/test.c b/src/test.c index ed033420fe..5d23dc108a 100644 --- a/src/test.c +++ b/src/test.c @@ -1299,7 +1299,7 @@ static char *testGetOSType(virDomainPtr dom) { static unsigned long testGetMaxMemory(virDomainPtr domain) { testConnPtr privconn = domain->conn->privateData; virDomainObjPtr privdom; - unsigned long ret = -1; + unsigned long ret = 0; testDriverLock(privconn); privdom = virDomainFindByName(&privconn->domains, diff --git a/tests/nodeinfotest.c b/tests/nodeinfotest.c index ea7819a935..ba3622f241 100644 --- a/tests/nodeinfotest.c +++ b/tests/nodeinfotest.c @@ -10,6 +10,16 @@ #include "nodeinfo.h" #include "util.h" +#ifndef __linux__ + +static int +mymain(int argc, char **argv) +{ + exit (77); /* means 'test skipped' for automake */ +} + +#else + static char *progname; static char *abs_srcdir; @@ -78,9 +88,6 @@ mymain(int argc, char **argv) "nodeinfo-6", }; char cwd[PATH_MAX]; -#ifndef __linux__ - exit (77); /* means 'test skipped' for automake */ -#endif abs_srcdir = getenv("abs_srcdir"); if (!abs_srcdir) @@ -102,4 +109,7 @@ mymain(int argc, char **argv) return(ret==0 ? EXIT_SUCCESS : EXIT_FAILURE); } +#endif /* __linux__ */ + VIRT_TEST_MAIN(mymain) +