[libvirt] [PATCH] Test driver VolCreate cleanups

The attached patch fixes some small issues with VolCreateXML implementation in the test driver. Thanks, Cole

On Mon, May 04, 2009 at 01:49:17PM -0400, Cole Robinson wrote:
The attached patch fixes some small issues with VolCreateXML implementation in the test driver.
ACK
commit b2e9f55f8acdc4b7ad50e3753c258fe19f350fed Author: Cole Robinson <crobinso@redhat.com> Date: Fri May 1 09:56:57 2009 -0400
Small cleanups in test driver VolCreateXML
Remove a duplicate assignment, some stray whitespace, and fix an incorrect return code.
diff --git a/src/test.c b/src/test.c index a518737..1915b57 100644 --- a/src/test.c +++ b/src/test.c @@ -3076,20 +3076,18 @@ testStorageVolumeCreateXML(virStoragePoolPtr pool, goto cleanup; }
- if (!virStoragePoolObjIsActive(privpool)) { testError(pool->conn, VIR_ERR_INTERNAL_ERROR, _("storage pool '%s' is not active"), pool->name); goto cleanup; }
- privvol = virStorageVolDefParse(pool->conn, privpool->def, xmldesc, NULL); if (privvol == NULL) goto cleanup;
if (virStorageVolDefFindByName(privpool, privvol->name)) { - testError(pool->conn, VIR_ERR_INVALID_STORAGE_POOL, + testError(pool->conn, VIR_ERR_INVALID_STORAGE_VOL, "%s", _("storage vol already exists")); goto cleanup; } @@ -3102,8 +3100,6 @@ testStorageVolumeCreateXML(virStoragePoolPtr pool, privvol->name); goto cleanup; } - privpool->def->available = (privpool->def->capacity - - privpool->def->allocation);
if (VIR_REALLOC_N(privpool->volumes.objs, privpool->volumes.count+1) < 0) {
-- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
-- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
participants (2)
-
Cole Robinson
-
Daniel P. Berrange