The function is supposed to return the number of items filled into the array and not zero. Also change the initialization of the "randomness" to be based on the startCell so that the values are different for each cell even for separate calls. Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx> --- src/test/test_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index c962aa74786e..998d102ddc5a 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -4503,7 +4503,7 @@ testNodeGetFreePages(virConnectPtr conn G_GNUC_UNUSED, unsigned int flags) { size_t i = 0, j = 0; - int x = 6; + int x = startCell * 6; virCheckFlags(0, -1); @@ -4514,7 +4514,7 @@ testNodeGetFreePages(virConnectPtr conn G_GNUC_UNUSED, } } - return 0; + return cellCount * npages; } static int testDomainCreateWithFlags(virDomainPtr domain, unsigned int flags) -- 2.42.0