Petr Rockai
bf180e98f4
A C implementation of "not" that handles fatal signals rather more
...
intelligently than the shell implementation. C code by Jaroslav Stava.
I have done a rudimentary review and checked that tests still pass.
2009-01-12 18:45:44 +00:00
Petr Rockai
cde6f0b767
Fix some checks in lvm-utils.sh. Note that "$(test ...)" is always empty, since
...
"test" never prints anything. Therefore, "return $(test ...)" is equivalent to
just "return;" which means success in sh (same as return 0). We can however,
thanks to set -e, use "test foo = bar" as an assertion.
PS: test a == b is invalid syntax. It is either = or -eq: = is textual and -eq
is numeric comparison.
2009-01-10 12:19:41 +00:00
Petr Rockai
0ce31ccc15
Document current state of inconsistent metadata behaviour of a few commands in
...
a test. Should make changes to the !consistent bits of code easier. To be
expanded.
2009-01-09 10:16:57 +00:00
Milan Broz
c030183316
Remove status=noxfer from test, not all dd versions support this (RHEL4 for example).
2008-12-16 20:02:52 +00:00
Zdenek Kabelac
f80091eea3
operate on test subdirectory instead on main /dev
2008-12-10 16:16:53 +00:00
Zdenek Kabelac
66a706be6a
add simple test for dev node usability (detect devices mounted with nodev)
2008-12-10 16:15:41 +00:00
Dave Wysochanski
c7e363f98a
Add liblvm interactive test infrastructure to build.
2008-12-07 19:37:07 +00:00
Dave Wysochanski
8d2f8d7b6b
Fix test-utils.h for rhel4 backward compatability.
...
for losetup, break out of the loop when successful setup of loop device,
and only look at 7 loop devices (default loop module setting)
for blockdev, use old option if new one is not available
2008-12-05 05:03:23 +00:00
Petr Rockai
cc44e17c5e
Add a bunch of sub-tests aimed at testing various bugzillas, by jstava.
2008-11-11 15:46:15 +00:00
Petr Rockai
8cd284edab
Import a bunch of new tests by jstava. Mostly everything pass, they however
...
tend to expose the lvremove -ff vg ordering bug.
2008-11-11 15:29:24 +00:00
Petr Rockai
5e57517055
Fix t-pool-labels to pass again after the vgdisplay error return fix from
...
last Friday.
2008-11-10 13:44:01 +00:00
Petr Rockai
b6f3ef938a
Minor code and documentation cleanups and changes by jstava.
2008-11-10 12:43:35 +00:00
Petr Rockai
024acb0335
add bz264241 check
...
remove lvconvert progress notifications (-i100)
(by jstava)
2008-11-10 12:41:52 +00:00
Petr Rockai
7ceca1a286
bz429342 lvcreate --nosync
...
bz192865 lvconvert logtype of an inactive mirror lv
(both by jstava)
2008-11-10 12:37:53 +00:00
Petr Rockai
136e519985
Add bz186013 check -- lvcreate rejects an invalid regionsize (jstava).
2008-11-10 12:37:03 +00:00
Petr Rockai
fe2b20db56
Use separate locking directory for each of the tests, as they never share a
...
volume group, or physical devices for that matter. Hopefully fixes occasional
test errors due to locking failures. Patch by jstava.
2008-11-10 12:36:23 +00:00
Petr Rockai
1066b93ade
Explicitly check after lvremove -ff vg that it did its job. By jstava.
2008-11-10 12:32:00 +00:00
Petr Rockai
b39e32266a
Set LD_LIBRARY_PATH in init.sh, as it is required to run dmsetup now as well,
...
which otherwise picks up the system version of libdevmapper, which is a pretty
bad idea.
2008-11-07 01:30:03 +00:00
Petr Rockai
4c2389c80a
Fix typo.
2008-11-04 14:38:53 +00:00
Petr Rockai
0016dd21e6
Also report the tests that have been skipped, at the end of harness.sh.
2008-11-04 14:37:51 +00:00
Petr Rockai
503612687e
Use $(abs_top_builddir) instead of @DMDIR@ and update paths appropriately.
2008-11-04 14:37:10 +00:00
Petr Rockai
4249331805
Re-indent test-utils.sh consistently, using tabs.
2008-10-14 19:48:01 +00:00
Petr Rockai
f6d7cec859
Conversion of last 2 tests to use test-utils.sh, by jstava.
2008-10-14 19:41:12 +00:00
Petr Rockai
14ddc57fc3
Add a workaround for missing losetup -s
by jstava, and a print a stacktrace
...
on errors (also by jstava). Currently requires bash, a fix for that may come
later -- explicitly using bash to run tests in the meantime.
2008-10-06 16:55:30 +00:00
Petr Rockai
3740ffa6e0
More test conversions by jstava. Make check still passes.
2008-10-06 16:47:07 +00:00
Petr Rockai
dc60e9156a
Make harness.sh exit with non-zero status when tests fail.
2008-09-30 21:45:42 +00:00
Petr Rockai
44d1f953e0
Cosmetic: get rid of trailing garbage on comments in t-vgslpit-usage.sh.
2008-09-30 21:43:55 +00:00
Petr Rockai
0246f5078f
Improve harness.sh output: also mention failing test's name near the end of its
...
output. Avoids the need to scroll back just to see which failing test you are
looking at.
2008-09-30 21:43:16 +00:00
Petr Rockai
e9815c4ea6
Fix [ a = b ] usage in t-vgsplit-operation: string comparison is '=', not '=='.
2008-09-30 18:29:10 +00:00
Petr Rockai
167ff7f677
Conversion of t-vgsplit-operation.sh by jstava.
2008-09-30 17:56:54 +00:00
Petr Rockai
bf9d3f1012
Fix a syntax error in one of the scripts, introduced by last commit.
2008-09-30 17:50:56 +00:00
Petr Rockai
f934b7ec0c
More test conversions, all of these are by jstava.
2008-09-30 17:47:34 +00:00
Petr Rockai
93127c20e8
Port over t-vgreduce-usage. Should fix testsuite hangs where pvremove -ff would
...
have waited for input on certain test failures.
2008-09-30 17:17:04 +00:00
Petr Rockai
e011f1770c
Convert t-vgsplit-usage.sh to use the new test-utils.sh. Original conversion by
...
jstava. Lvm1 testing restored by mornfall.
2008-09-30 15:20:09 +00:00
Petr Rockai
45911e4588
Convert t-pvremove-usage to use the new test-utils.sh.
2008-09-30 13:19:56 +00:00
Petr Rockai
a85552b73b
Update test/Makefile.in to use the new harness for calling tests.
2008-09-29 16:07:02 +00:00
Petr Rockai
4ca35186c4
Add a test for reappearing lost PVs causing endless metadata correction
...
updates. (A problem Milan fixed recently.)
2008-09-29 16:06:10 +00:00
Petr Rockai
ba925bddf1
Add a simple test for partial activation.
2008-09-29 16:04:57 +00:00
Petr Rockai
a32ff29cd8
Update a bunch of tests to use functionality from test-utils.sh.
2008-09-29 16:02:50 +00:00
Petr Rockai
b68d755f77
Export testlib_cleanup_ from test-lib.sh, which is needed for test-utils.sh to
...
be able to call proper EXIT traps.
2008-09-29 16:00:53 +00:00
Petr Rockai
bae6646b68
Import new test utilities and a test harness.
2008-09-29 15:59:19 +00:00
Milan Broz
1ce760cb73
Add more vgreduce tests. (Jaroslav Stava)
2008-09-19 16:12:25 +00:00
Milan Broz
a240207505
Fix vgreduce test, now requires --force flag. (Jaroslav Stava)
2008-09-19 16:10:46 +00:00
Milan Broz
8695f2cecb
fix vgreduce tests to detect partial command failure (Jaroslav Stava)
2008-08-28 11:20:49 +00:00
Milan Broz
cfeb1d3442
add vgcreate rejects repeated invocation test
...
add vgcreate fails when the only pv has --metadatacopies 0 test
(by Jaroslav Stava)
2008-08-28 11:09:58 +00:00
Milan Broz
e2313de3fd
add vgrename by uuid test (Jaroslav Stava)
...
fix vgsplit rejects last mda copy test (Jaroslav Stava)
2008-08-28 10:59:10 +00:00
Milan Broz
fa69afe329
Add pvremove usage test (Jaroslav Stava)
2008-08-28 10:24:55 +00:00
Milan Broz
70d4d231fa
- fix environment variable prefix to LVM (this is not GIT:-)
...
- add lvcreate rejects repeated invocation test
- fix pvs metadata test for partial failure test
- add pvchange reject --addtag to lvm1 pv test
(All fixes by Jaroslav Stava)
2008-08-28 10:07:34 +00:00
Dave Wysochanski
747b3cfefa
Fix symbolic link creation in test infrastructure.
...
Original code would create "*.so" symbolic links if there were no actual
files ending in "so". The second iteration would then cause an error
in the test logs.
2008-08-21 14:33:48 +00:00
Zdenek Kabelac
6b7d2770f7
fail testcase for failed commands inside the for loop
2008-08-20 13:34:33 +00:00
Zdenek Kabelac
f88fd44680
valid parameter for lvchange -p is 'rw'
2008-08-13 14:28:17 +00:00
Zdenek Kabelac
f84d52765c
added test for coverage improvement
...
added test for metadata type 1
2008-08-13 13:49:07 +00:00
Milan Broz
a3925393ba
add tests for pvchange and vgreduce usage (Jaroslav Stava)
2008-08-12 10:04:31 +00:00
Milan Broz
47535347c0
test vgsplit: reject to give away pv with the last mda copy (Jaroslav Stava)
2008-08-12 10:01:56 +00:00
Zdenek Kabelac
d774b86ce2
add test for pool labels gfs
...
add test for metadatacopies0 and snapshot manipulation
2008-08-05 12:33:41 +00:00
Zdenek Kabelac
3cbf52c97d
put dmeventd into the LD_LIBRARY_PATH for lvm-wrapper
2008-08-05 12:32:08 +00:00
Zdenek Kabelac
3b36a5f1c5
avoid endless option parsing loop
...
add support for lvm verbose operation -vvvv
add dlsym path to the test config file
2008-08-05 11:39:54 +00:00
Zdenek Kabelac
e2ebc2a08d
* parse error output for 'auto' keyword
2008-08-04 09:15:15 +00:00
Zdenek Kabelac
56738d9383
disable mdadm test-case until a better solution is found
2008-08-01 15:44:53 +00:00
Dave Wysochanski
6ce652e3ec
Add pvcreate tests to verify failure on md array detection.
2008-07-29 21:05:20 +00:00
Dave Wysochanski
65a431fe1f
Refactor pvcreate - simplify return codes.
2008-07-25 14:59:51 +00:00
Dave Wysochanski
3cf01067cf
Refactor pvcreate - --force parameter.
2008-07-25 14:36:55 +00:00
Dave Wysochanski
1a02e2e43b
Refactor pvcreate - move uuid and restorefile options.
2008-07-25 00:30:57 +00:00
Dave Wysochanski
495a551e06
Add pvcreate tests for uuid and restorefile.
2008-07-24 17:33:40 +00:00
Dave Wysochanski
3ea8df93b1
Add more pvcreate tests to validate writing lvm2 label using --labelsector.
2008-07-21 18:50:10 +00:00
Dave Wysochanski
fa53d359d5
Only use lvm2 metadata for now.
2008-07-17 04:03:04 +00:00
Dave Wysochanski
4833ac3d3d
Update pvcreate and vgsplit tests.
...
Add more pvcreate tests.
Start handling lvm1 and lvm2 metadata and metadatacopies=0,1.
2008-07-17 03:17:01 +00:00
Dave Wysochanski
d2edd6ac07
Add pvcreate sanity tests, check for label_write() failure in _text_pv_write().
...
Failure to check for label_write() return code caused the following test
to indicate it passed when it really failed:
pvcreate rejects labelsector > 1000000000000
2008-07-16 21:32:38 +00:00
Alasdair Kergon
5556819ac8
tweak lcov configuration/makefiles
2008-06-27 19:24:17 +00:00
Dave Wysochanski
937a25249f
Test script cleanup.
2008-06-25 16:51:26 +00:00
Zdenek Kabelac
5f2c195933
Improve/Fix read ahead 'auto' calculation for stripe_size
...
Fix lvchange output for -r auto setting if auto is already set
Add testcase for read ahead
2008-06-18 11:32:14 +00:00
Dave Wysochanski
3a152aea38
Add simple test case to repro pvs segfault with duplicate vgnames.
2008-06-09 15:31:58 +00:00
Jim Meyering
644d83fb04
* lvm-utils.sh (init_root_dir_): Correct a diagnostic.
...
Author: Jim Meyering <meyering@redhat.com>
2008-06-06 13:48:57 +00:00
Dave Wysochanski
505e6bc117
Add test for rhbz440405 - lvconvert -m0 fails incorrectly if all PEs allocated.
2008-04-23 18:27:59 +00:00
Dave Wysochanski
029d4de4be
Update test function _check_{vg|lv|pv}_field to aid in test debug.
...
Author: Dave Wysochanski <dwysocha@redhat.com>
2008-04-23 13:02:03 +00:00
Dave Wysochanski
657d4df010
Fix vgsplit and vgmerge tests for updated lv counting.
2008-04-11 14:06:16 +00:00
Dave Wysochanski
6920681cab
Update vgsplit test to verify loosening of active LV restriction.
...
This and prior 2 commits resolve Red Hat bz 252041:
Ability to vgsplit an active Volume Group where the split involves only inactive LVs
2008-04-10 21:38:52 +00:00
Alasdair Kergon
3a370b7350
more pre-release cleanup
2008-04-10 19:59:43 +00:00
Dave Wysochanski
55ea8590ae
Update vgsplit tests that count LVs for adjusted LV counting.
2008-04-10 18:55:40 +00:00
Dave Wysochanski
ec49b413c6
Fix lvm tool exit code display in some tests.
2008-04-10 01:06:48 +00:00
Dave Wysochanski
d37beb92db
Add vgsplit tests to verify mirror is not moved unnecessarily.
2008-04-09 21:10:13 +00:00
Dave Wysochanski
eec663aa3b
Fix vgsplit to only move hidden 'snapshotN' LVs when necessary.
...
This bug has been around for a long time as far as I can tell.
Without this fix, a vgsplit would unconditionally move the
'hidden/internal' snapshot LVs, and result in corrupted metadata
in the following case:
vg1: contains lv1, lv1snap, both on pvset1
vg1: contains lv2, on pvset2
"vgsplit vg1 vg2 pvset2"
would result in "snapshot0" hidden LV being moved to vg2, and
the origin and cow being left in vg1. The tools detect the
corruption in vg2, but not in vg1.
2008-04-09 20:56:06 +00:00
Dave Wysochanski
f2696211dc
Update vgsplit tests for lvnames on the cmdline.
2008-04-09 14:47:34 +00:00
Milan Broz
d2901a62a4
Add validation of LV name to pvmove -n.
2008-04-04 11:59:31 +00:00
Dave Wysochanski
d0bf2f3fa0
Fix lvresize to dump stack if vg_lock_and_read() fails.
...
Necessary because vg_lock_and_read() may fail silently if the vg_check_status() call fails.
Also add lvresize tests.
2008-04-02 12:17:30 +00:00
Dave Wysochanski
a16d7d46dd
Enhance test debugging by updating verbose mode of check_*_field_ functions.
...
Author: Dave Wysochanski <dwysocha@redhat.com>
2008-03-28 18:02:22 +00:00
Dave Wysochanski
4f618eba00
Add vgmerge tests.
2008-03-26 18:03:35 +00:00
Dave Wysochanski
c206c19c19
Add vgsplit tests to verfy attributes of new VG match source VG.
...
Author: Dave Wysochanski <dwysocha@redhat.com>
2008-03-23 15:40:35 +00:00
Dave Wysochanski
8a4c2b13bd
Fixup vgsplit tests in preparation for vgsplit changes.
2008-03-21 22:00:29 +00:00
Dave Wysochanski
dff4e43269
Update vgsplit tests to execute twice (existing and new VG as destination).
2008-03-21 21:14:38 +00:00
Milan Broz
94d271ff7b
Add metadata test for escaping double quotes in device names (bz431474).
2008-03-12 17:34:58 +00:00
Dave Wysochanski
3fa875dd79
Update vgsplit tests.
...
- Add validation on pv_count, lv_count, and snap_count after split
NOTE: Some of these counts are misleading. If you compare "lvs" output
with these counts you will be left scratching your head what a "logical volume"
really is. ;-)
2008-03-04 22:49:00 +00:00
Dave Wysochanski
da73d34264
Update vgsplit tests.
...
- Divide into 'usage' and 'operation' tests.
- Add operation tests for specific LV types.
2008-03-04 19:48:32 +00:00
Dave Wysochanski
8f613692fd
Add vgsplit test to check failure when PV not in source volume group.
2008-02-29 00:09:21 +00:00
Dave Wysochanski
c383a8717b
Fix t-vgsplit-operation.sh lv2-3 definitions to include test signature.
2008-02-28 17:39:47 +00:00
Dave Wysochanski
81625d8f65
Fix t-vgsplit-operation.sh lv1 definition to include test signature.
2008-02-28 16:48:09 +00:00
Alasdair Kergon
4e9083db10
Fix mirror log name construction during lvconvert. (2.02.30)
...
Make monitor_dev_for_events recurse through the stack of LVs.
Clean up some more compiler warnings.
Add mirror names test script.
2008-01-31 12:19:36 +00:00
Alasdair Kergon
eb63c265db
.
2008-01-26 00:25:45 +00:00
Dave Wysochanski
c1df0103c2
Fix vgsplit tests 12-13
2008-01-22 03:30:14 +00:00
Dave Wysochanski
c1f2ce3938
Fix vgsplit - print different message on successful split of existing / new vg
...
Fix vgsplit - fix a couple error paths that forgot to call unlock_vg
Update vgsplit test cases
2008-01-22 03:25:45 +00:00