Dave Wysochanski
36d336618e
Fix build failure when enabling dmeventd and applib.
...
This patch fixes a build with options similar to the following:
./configure --enable-debug --enable-applib --enable-dmeventd --enable-cmdlib
2009-09-14 22:56:27 +00:00
Milan Broz
720eb0e91c
Do not run mdadm tests if MD module is not loaded.
2009-09-13 19:28:00 +00:00
Dave Wysochanski
ed2465fd30
Update lvm2app unit test vgtest - fix remove bug.
...
We now must commit to disk after lvm_vg_remove().
2009-09-04 19:17:46 +00:00
Dave Wysochanski
6d21e61889
Fix path to test/api/vgtest in nightly testsuite.
2009-09-04 14:26:16 +00:00
Dave Wysochanski
2e1271fe36
Add lvm2app.sh to nightly testsuite.
...
More tests to come but for now just call into vgtest.
Fix warning in vgtest.c
2009-09-04 12:54:23 +00:00
Dave Wysochanski
a31948f3b7
Fix path to test/api/vgtest in nightly testsuite.
2009-09-04 14:26:16 +00:00
Dave Wysochanski
a12106eb52
Remove 'test' interative api unit tests from 'TARGET' line.
...
The test/api directory TARGET line will be reserved for non-interactive
unit tests. Building the interactive test can still be done with "make test"
from the test/api dir.
2009-09-04 13:49:02 +00:00
Dave Wysochanski
dd9f42172f
Add lvm2app.sh to nightly testsuite.
...
More tests to come but for now just call into vgtest.
Fix warning in vgtest.c
2009-09-04 12:54:23 +00:00
Dave Wysochanski
1efaf2cde0
Update lvm2app vgtest to take vgname and devices as parameters.
2009-09-03 17:13:46 +00:00
Dave Wysochanski
8d6fbe1a89
Fix vgsplit test to require -M on ordering of vgnames.
2009-09-02 19:38:53 +00:00
Dave Wysochanski
887b48bd1d
Add alphabetical vgname ordering tests for vgsplit, vgmerge, vgrename.
2009-09-02 18:31:11 +00:00
Dave Wysochanski
eb283dcbc6
Make lvm2app lv_t handle definition consistent with lvm_t.
...
This patch update lv_t handle to be consistent with lvm_t - define as a pointer
to internal struct logical_volume.
Author: Dave Wysochanski <dwysocha@redhat.com>
2009-08-13 12:17:32 +00:00
Dave Wysochanski
fec2b39df3
Make lvm2app vg_t handle definition consistent with lvm_t.
...
This patch update vg_t handle to be consistent with lvm_t - define as a pointer
to internal struct volume_group.
Author: Dave Wysochanski <dwysocha@redhat.com>
2009-08-13 12:16:45 +00:00
Dave Wysochanski
0ad0f9e094
Update test/api/test.c to call lvm_vg_create and lvm_vg_remove.
...
Also fix a couple bugs.
2009-08-07 21:22:37 +00:00
snitzer
0d15d01b45
Added basic pvcreate --dataalignmentoffset testing to t-pvcreate-usage.sh
...
Added topology testing via new test/t-pvcreate-operation-md.sh
- requires mdadm and rawhide kernel for full test coverage
2009-08-04 16:02:39 +00:00
Petr Rockai
d77b03d6c9
Make lvconvert honour log mirror options combined with downconversion.
...
(RHBZ 463272)
2009-08-02 21:59:21 +00:00
Petr Rockai
0b9b1ccd0b
Add test for RHBZ 481793 (passing, thanks to vg_read changes checked in
...
previously).
2009-08-02 21:45:45 +00:00
Alasdair Kergon
db9a15e2fa
renamed include files
2009-07-29 14:06:31 +00:00
Dave Wysochanski
48f66c5cb4
Update interactive unit test - fix silly vg_close error.
2009-07-28 14:12:29 +00:00
Dave Wysochanski
f54cd61ba6
Update interactive unit test for liblvm - add vg_write, general cleanup.
2009-07-28 13:49:28 +00:00
Dave Wysochanski
011ec46dae
Add lvm_vg_get_seqno, updating lvm.h and unit test.
...
Adding the ability to get the seqno is important for an application to
determine if something has changed in a VG. Otherwise, the only way to
know is to open the VG with write permission and hold the handle.
2009-07-28 13:17:04 +00:00
Dave Wysochanski
c82ecd6656
Add lvm_library_get_version() and update unit tests to display version.
2009-07-28 11:03:28 +00:00
Dave Wysochanski
6e4baa664d
Rename lvm_create to lvm_init and lvm_destroy to lvm_quit.
2009-07-28 09:16:18 +00:00
Dave Wysochanski
2965b52563
Add config_reload and config_override to test.c, change prompt.
...
PV PV UUID VG
/dev/loop1 A95EvV-iqmb-ZFuJ-u8MV-Npwn-wlc2-Ul1Mnn vg1
/dev/loop0 R16FDG-OmoS-HNGt-LSZY-OAlC-7qeU-t2gztp vg1
lvm> config_override loop0
Success overriding LVM configuration
lvm> config_reload
Success reloading LVM configuration
lvm> vg_open vg1
Couldn't find device with uuid 'A95EvV-iqmb-ZFuJ-u8MV-Npwn-wlc2-Ul1Mnn'.
Success opening vg vg1
lvm> vg_close vg1
lvm> quit
Maybe a bug in lvm_vg_open for missing pvs but the filter seems to work.
Change prompt from "lvm>" to "liblvm>".
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2009-07-27 21:02:51 +00:00
Dave Wysochanski
a92bdc094d
Update test/api/test.c to include lvm_vg_reduce and lvm_vg_extend.
...
Author: Dave Wysochanski <dwysocha@redhat.com>
2009-07-27 17:45:21 +00:00
Dave Wysochanski
9b367aa0a1
Update test/api/vgtest.c to include lvm_vg_reduce.
...
Signed-off-by: Thomas Woerner <twoerner@redhat.com>
Acked-by: Dave Wysochanski <dwysocha@redhat.com>
Author: Dave Wysochanski <dwysocha@redhat.com>
2009-07-27 17:44:58 +00:00
Dave Wysochanski
dbdce70a8e
Update test/api/test.c to display lvm_lv_is_active and lvm_lv_is_suspended.
...
Author: Dave Wysochanski <dwysocha@redhat.com>
2009-07-26 20:59:02 +00:00
Dave Wysochanski
b41f609fe4
Update test/api/test.c to call lv_deactivate and lv_activate.
...
Author: Dave Wysochanski <dwysocha@redhat.com>
2009-07-26 20:58:38 +00:00
Dave Wysochanski
fed21338fc
Update test/api/*.c to use consistent liblvm error returns.
...
For now, liblvm will return -1 (fail) / 0 (success) or
NULL (fail) / non-NULL (success). Upon failure, lvm_errno and
lvm_errmsg should be used to determine the precise error.
Author: Dave Wysochanski <dwysocha@redhat.com>
2009-07-26 20:29:56 +00:00
Dave Wysochanski
b1442a1a97
Rename lvm_scan_vgs to lvm_scan.
...
Author: Dave Wysochanski <dwysocha@redhat.com>
2009-07-26 16:44:05 +00:00
Dave Wysochanski
095026b459
Rename lvm_vg_get_free to lvm_vg_get_free_size.
...
Author: Dave Wysochanski <dwysocha@redhat.com>
2009-07-26 16:06:46 +00:00
Dave Wysochanski
496c8d01fa
Rename lvm_list_vg_ids to lvm_list_vg_uuids.
...
Author: Dave Wysochanski <dwysocha@redhat.com>
2009-07-26 16:06:21 +00:00
Dave Wysochanski
8c1a5f033e
Update test/api/test.c to call lvm_lv_remove.
...
Author: Dave Wysochanski <dwysocha@redhat.com>
2009-07-26 14:37:15 +00:00
Dave Wysochanski
c4510327d4
Update test/api/test.c - correct list_vg_names and list_vg_ids.
...
Author: Dave Wysochanski <dwysocha@redhat.com>
2009-07-26 13:08:00 +00:00
Dave Wysochanski
88fc2bb3e1
Update test/api/test.c for liblvm 'get' functions.
...
Author: Dave Wysochanski <dwysocha@redhat.com>
2009-07-26 13:07:41 +00:00
Dave Wysochanski
429139be78
Update test/api/test.c to call lvm_vg_create_lv_linear.
...
Author: Dave Wysochanski <dwysocha@redhat.com>
2009-07-26 02:35:47 +00:00
Dave Wysochanski
0307c0366a
Update test/api/test.c to handle read/write open modes.
...
Author: Dave Wysochanski <dwysocha@redhat.com>
2009-07-26 02:35:19 +00:00
Dave Wysochanski
3aca463e7e
Add tests for lvm_vg_name_list, lvm_vg_id_list and lvm_scan_vgs.
...
Author: Dave Wysochanski <dwysocha@redhat.com>
2009-07-24 12:51:32 +00:00
Dave Wysochanski
80520d4ed7
Update test/api/test.c to not segfault if null lists of pvs/lvs returned.
...
Author: Dave Wysochanski <dwysocha@redhat.com>
2009-07-24 04:15:30 +00:00
Dave Wysochanski
216b6b3efd
Update test/api/test.c for simple tests involving pv/vg/lv name/uuid attributes.
...
Tests the following APIs:
- lvm_{pv|vg|lv}_get_{name|uuid}()
- lvm_{lvs|pvs}_in_vg()
Example:
lvm> vg_open VolGroup00
Success opening vg VolGroup00
lvm> vg_list_lvs VolGroup00
LVs in VG VolGroup00:
VolGroup00/LogVol00 (bFO4EU-UaDu-iuMm-N6BA-xcZc-nm3u-J5K5lu)
VolGroup00/LogVol01 (BHGsPK-PwzY-kye0-MEWa-a67z-BiYE-03ZjwM)
lvm> vg_list_pvs VolGroup00
PVs in VG VolGroup00:
/dev/sda2 (Be91pt-CqT0-4YJE-nGI6-Oisz-hy0N-l9CHgn)
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Acked-by: Thomas Woerner <twoerner@redhat.com>
2009-07-23 23:40:50 +00:00
Dave Wysochanski
c0d270947f
Add a couple lvm_vg_open() calls to vgtest.c.
2009-07-22 22:25:30 +00:00
Dave Wysochanski
bbd12ca7aa
Update api/test/vgtest.c error handling.
...
Reverts some of my 'cleanup' from last night. For now we will use pass/fail
on API calls (either 'int' return or NULL/non-NULL handle), then use
lvm_errno() to get more specific errors.
Author: Dave Wysochanski <dwysocha@redhat.com>
2009-07-22 16:49:54 +00:00
Dave Wysochanski
02f858e5c9
Update test/api/vgtest.c to use lvm_errno and lvm_errmsg.
...
Author: Dave Wysochanski <dwysocha@redhat.com>
2009-07-22 03:13:57 +00:00
Dave Wysochanski
1b611e7cd8
Fix build environment of test/api: Make it usable for more than one test case.
...
Author: Thomas Woerner <twoerner@redhat.com>
Committer: Dave Wysochanski <dwysocha@redhat.com>
2009-07-21 13:51:05 +00:00
Dave Wysochanski
d2d528d214
Rename test/api/vgcreate.c to vgtest.c to reduce filename conflicts in tree.
...
Signed-off-by: Thomas Woerner <twoerner@redhat.com>
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2009-07-21 10:46:45 +00:00
Dave Wysochanski
a00d4b7845
Fix compile warnings in vgcreate liblvm api unit test case.
...
Use const and PRIu64.
Signed-off-by: Thomas Woerner <twoerner@redhat.com>
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Author: Thomas Woerner <twoerner@redhat.com>
Committer: Dave Wysochanski <dwysocha@redhat.com>
2009-07-21 10:41:47 +00:00
Petr Rockai
fa059a59a8
Refuse to open VG with MISSING_PVs for update unless handles_missing_pvs is set.
2009-07-15 05:47:55 +00:00
Dave Wysochanski
ae94917e76
Fix pvremove test breakage.
...
Author: Dave Wysochanski <dwysocha@redhat.com>
2009-07-14 19:59:41 +00:00
Dave Wysochanski
ea18f8e19b
Add a few negative tests which should fail cleanly if pv, vg, lvs don't exist.
...
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2009-07-14 19:35:35 +00:00
Dave Wysochanski
1f9b9c6235
Add liblvm test case for creating of a vg.
...
liblvm unit test case uses the following APIs:
- lvm_create, lvm_destroy
- lvm_vg_create, lvm_vg_extend, lvm_vg_set_extent_size, lvm_vg_write,
lvm_vg_remove, lvm_vg_close
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Acked-by: Alasdair G Kergon <agk@redhat.com>
2009-07-14 03:08:56 +00:00