From 0ff84542a5ff51d1bec89595dc2b01da3235ffe2 Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Tue, 14 May 2019 17:09:19 +0200 Subject: [PATCH] test_driver: Don't report VIR_DOMAIN_DISK_ERROR_NONE In my review of 89320788ac4 I've simplified assigning disk errors too much as the code I've changed it to will set VIR_DOMAIN_DISK_ERROR_NONE. This is in contradiction with our documentation which specifies that disks with no errors are not reported. Signed-off-by: Michal Privoznik Reviewed-by: Andrea Bolognani --- src/test/test_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index e3545e7085..84de8059ea 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -3277,7 +3277,7 @@ static int testDomainGetDiskErrors(virDomainPtr dom, for (i = 0; i < MIN(vm->def->ndisks, maxerrors); i++) { if (VIR_STRDUP(errors[i].disk, vm->def->disks[i]->dst) < 0) goto cleanup; - errors[i].error = i % VIR_DOMAIN_DISK_ERROR_LAST; + errors[i].error = (i % (VIR_DOMAIN_DISK_ERROR_LAST - 1)) + 1; } ret = i; } else {