diff options
author | Dave Wysochanski <dwysocha@redhat.com> | 2009-07-22 22:25:30 +0000 |
---|---|---|
committer | Dave Wysochanski <dwysocha@redhat.com> | 2009-07-22 22:25:30 +0000 |
commit | eefacdfa0412ed31b5d60916166c483cad27929f (patch) | |
tree | 152d391a652cda6023d266a2cdd2c60ad43cdfa5 /test/api/vgtest.c | |
parent | 729f472c04ad06f3bfd1d01c2be0872ac0bb64f0 (diff) | |
download | lvm2-eefacdfa0412ed31b5d60916166c483cad27929f.tar.gz |
Add a couple lvm_vg_open() calls to vgtest.c.
Diffstat (limited to 'test/api/vgtest.c')
-rw-r--r-- | test/api/vgtest.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/api/vgtest.c b/test/api/vgtest.c index 305914dce..f6ede32fb 100644 --- a/test/api/vgtest.c +++ b/test/api/vgtest.c @@ -74,6 +74,20 @@ int main(int argc, char *argv[]) goto bad; } + printf("Closing VG %s\n", vg_name); + if (!lvm_vg_close(vg)) + goto bad; + printf("Re-opening VG %s for reading\n", vg_name); + vg = lvm_vg_open(handle, vg_name, "r", 0); + if (!vg) + goto bad; + printf("Closing VG %s\n", vg_name); + if (!lvm_vg_close(vg)) + goto bad; + printf("Re-opening VG %s for writing\n", vg_name); + vg = lvm_vg_open(handle, vg_name, "w", 0); + if (!vg) + goto bad; printf("Removing VG %s from system\n", vg_name); status = lvm_vg_remove(vg); if (lvm_errno(handle)) { |