On Mon, Jun 27, 2016 at 16:41:08 +0200, Andrea Bolognani wrote:
On Mon, 2016-06-27 at 15:50 +0200, Jiri Denemark wrote:
> virQEMUCapsFillDomainCaps would use virHostCPUGetKVMMaxVCPUs for KVM
> domains.
>
> diff --git a/tests/domaincapsmock.c b/tests/domaincapsmock.c
> new file mode 100644
> index 0000000..5266b73
> --- /dev/null
> +++ b/tests/domaincapsmock.c
> @@ -0,0 +1,26 @@
> +/*
Missing copyright statement.
That's deliberate.
...
We should return a positive number instead, either something
like 160 (so we can check that limiting vCPUs based on
MAX_VCPUS works) or INT_MAX (so we know it'll never be
smaller than the QEMU limit).
INT_MAX is better. In the future we can expand this to be configurable
per test case so that we can check more combinations.
Jirka