On Thu, Jun 27, 2019 at 02:50:46PM +0200, Ilias Stamatis wrote:
Signed-off-by: Ilias Stamatis <stamatis.iliass(a)gmail.com>
---
src/test/test_driver.c | 48 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 4b1f2724a0..d0d4d9e270 100755
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -2405,6 +2405,53 @@ testDomainCoreDump(virDomainPtr domain,
}
+static int
+testDomainGetNumaParameters(virDomainPtr dom,
+ virTypedParameterPtr params,
+ int *nparams,
+ unsigned int flags)
+{
+ virDomainObjPtr vm = NULL;
+ virDomainNumatuneMemMode mode = VIR_DOMAIN_NUMATUNE_MEM_STRICT;
+ VIR_AUTOFREE(char *) nodeset = NULL;
+ int ret = -1;
+
+ virCheckFlags(VIR_DOMAIN_AFFECT_CURRENT |
+ VIR_DOMAIN_AFFECT_LIVE |
+ VIR_DOMAIN_AFFECT_CONFIG |
+ VIR_TYPED_PARAM_STRING_OKAY, -1);
+
+ if ((*nparams) == 0) {
+ *nparams = 2;
+ return 0;
+ }
+
+ if (!(vm = testDomObjFromDomain(dom)))
+ goto cleanup;
+
+ ignore_value(virDomainNumatuneGetMode(vm->def->numa, -1, &mode));
+ if (0 < *nparams && virTypedParameterAssign(¶ms[0],
VIR_DOMAIN_NUMA_MODE,
+ VIR_TYPED_PARAM_INT, mode) < 0)
^the condition should be split on 2 lines, also we don't use Yoda
conditions ;).
+ goto cleanup;
+
+ nodeset = virDomainNumatuneFormatNodeset(vm->def->numa, NULL, -1);
+ if (1 < *nparams && (!nodeset || virTypedParameterAssign(¶ms[1],
+ VIR_DOMAIN_NUMA_NODESET,
+ VIR_TYPED_PARAM_STRING,
+ nodeset) < 0))
Same here...
As per our private conversation about the CONFIG domain state, looking
forward for a v2.
Erik