提交 324d2cdd 编写于 作者: J Jiri Denemark

domaincapstest: Don't read data from host

virQEMUCapsFillDomainCaps would use virHostCPUGetKVMMaxVCPUs for KVM
domains.
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
上级 6ec4e28e
...@@ -404,6 +404,7 @@ test_libraries = libshunload.la \ ...@@ -404,6 +404,7 @@ test_libraries = libshunload.la \
virrandommock.la \ virrandommock.la \
virhostcpumock.la \ virhostcpumock.la \
nssmock.la \ nssmock.la \
domaincapsmock.la \
$(NULL) $(NULL)
if WITH_QEMU if WITH_QEMU
test_libraries += libqemumonitortestutils.la \ test_libraries += libqemumonitortestutils.la \
...@@ -919,6 +920,12 @@ vircaps2xmltest_SOURCES = \ ...@@ -919,6 +920,12 @@ vircaps2xmltest_SOURCES = \
vircaps2xmltest.c testutils.h testutils.c vircaps2xmltest.c testutils.h testutils.c
vircaps2xmltest_LDADD = $(LDADDS) vircaps2xmltest_LDADD = $(LDADDS)
domaincapsmock_la_SOURCES = domaincapsmock.c
domaincapsmock_la_CFLAGS = $(AM_CFLAGS)
domaincapsmock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
domaincapsmock_la_LIBADD = $(MOCKLIBS_LIBS)
domaincapstest_SOURCES = \ domaincapstest_SOURCES = \
domaincapstest.c testutils.h testutils.c domaincapstest.c testutils.h testutils.c
domaincapstest_LDADD = $(LDADDS) domaincapstest_LDADD = $(LDADDS)
......
/*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see
* <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <limits.h>
#include "virhostcpu.h"
int
virHostCPUGetKVMMaxVCPUs(void)
{
return INT_MAX;
}
...@@ -386,4 +386,4 @@ mymain(void) ...@@ -386,4 +386,4 @@ mymain(void)
return ret; return ret;
} }
VIRT_TEST_MAIN(mymain) VIRT_TEST_MAIN_PRELOAD(mymain, abs_builddir "/.libs/domaincapsmock.so")
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册