mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 14:45:24 +00:00
test_driver: Don't report VIR_DOMAIN_DISK_ERROR_NONE
In my review of 89320788ac
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 <mprivozn@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
parent
3b1a5dde79
commit
0ff84542a5
@ -3277,7 +3277,7 @@ static int testDomainGetDiskErrors(virDomainPtr dom,
|
|||||||
for (i = 0; i < MIN(vm->def->ndisks, maxerrors); i++) {
|
for (i = 0; i < MIN(vm->def->ndisks, maxerrors); i++) {
|
||||||
if (VIR_STRDUP(errors[i].disk, vm->def->disks[i]->dst) < 0)
|
if (VIR_STRDUP(errors[i].disk, vm->def->disks[i]->dst) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
errors[i].error = i % VIR_DOMAIN_DISK_ERROR_LAST;
|
errors[i].error = (i % (VIR_DOMAIN_DISK_ERROR_LAST - 1)) + 1;
|
||||||
}
|
}
|
||||||
ret = i;
|
ret = i;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user