On Fri, Jun 28, 2019 at 09:54:13PM +0200, Ilias Stamatis wrote:
Signed-off-by: Ilias Stamatis <stamatis.iliass(a)gmail.com>
---
src/test/test_driver.c | 52 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 4b1f2724a0..dc6d3b078c 100755
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -2405,6 +2405,57 @@ testDomainCoreDump(virDomainPtr domain,
}
+static int
+testDomainGetNumaParameters(virDomainPtr dom,
+ virTypedParameterPtr params,
+ int *nparams,
+ unsigned int flags)
+{
+ virDomainObjPtr vm = NULL;
+ virDomainDefPtr def = NULL;
+ virDomainNumatuneMemMode mode = VIR_DOMAIN_NUMATUNE_MEM_STRICT;
+ VIR_AUTOFREE(char *) nodeset = NULL;
+ int ret = -1;
+
+ virCheckFlags(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;
+
+ if (!(def = virDomainObjGetOneDef(vm, flags)))
+ goto cleanup;
+
+ ignore_value(virDomainNumatuneGetMode(def->numa, -1, &mode));
+ if (*nparams > 0 &&
+ virTypedParameterAssign(¶ms[0], VIR_DOMAIN_NUMA_MODE,
VIR_TYPED_PARAM_INT, mode) < 0)
I'll split the arguments to ^this function before merging. It would be cool if
you introduced the corresponding setter counterpart soon.
Reviewed-by: Erik Skultety <eskultet(a)redhat.com>