mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
Fix test driver return value & disable nodeinfotest on non-linux (John Levon)
This commit is contained in:
parent
ca05a72db6
commit
6313259ada
@ -1,3 +1,9 @@
|
||||
Thu Dec 18 12:07:58 GMT 2008 Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
* 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 <berrange@redhat.com>
|
||||
|
||||
* qemud/remote.c: Fix unused variable compile warning when polkit
|
||||
|
@ -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,
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user