1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 03:27:58 +03:00
Commit Graph

643 Commits

Author SHA1 Message Date
Zdenek Kabelac
313a71048e snaps of mirrors are enabled 2012-05-16 15:01:06 +00:00
Petr Rockai
12a15f939c Add a (currently failing) test for RHBZ 816672. 2012-05-16 10:44:36 +00:00
Petr Rockai
03885b6863 Add provisions to flag tests that we know will fail, without flagging the build
(i.e. an expected failure).
2012-05-16 10:43:41 +00:00
Peter Rajnoha
ec808a033b Remove VG/PV used in the test. 2012-05-09 14:44:59 +00:00
Peter Rajnoha
9c17acdfe8 Fix division by zero if PV with zero PE count is used during vgcfgrestore. 2012-05-09 12:30:56 +00:00
Jonathan Earl Brassow
eb2d70293d Fix up-convert when mirror activation is controled by volume_list and tags.
When mirrors are up-converted, a transient mirror layer is put in so that
only the new devices are sync'ed.  That transient layer must carry the tags
of the original mirror LV, otherwise it will fail to activate when activation
is regulated by lvm.conf:activation/volume_list.  The conversion would then
fail.

The fix is to do exactly the same thing that is being done for linear ->
mirror converting (lib/metadata/mirror.c:_init_mirror_log()).  We copy the
tags temporarily for the new LV and remove them after the activation.
2012-05-05 02:08:46 +00:00
Jonathan Earl Brassow
1e4e9548b1 Disallow snapshots of mirror segment types.
Snapshots of RAID logical volumes are allowed (including "raid1").  However,
snapshots of "mirror" logical volumes has been disallowed due to unsolvable
issues inherent to the design.  The fact that mirroring (dm-raid1.c) must
stop all I/O as the result of a failure and wait for userspace intervention
can lead to a circular dependency if userspace is simultaneously waiting for
snapshots (on mirrors) to make an I/O update before proceeding.

Various snapshot on mirror tests have been removed as a result.
2012-05-01 19:21:24 +00:00
Zdenek Kabelac
dd11efb673 Expect failure if the reduction doesn't really happen 2012-04-24 12:17:49 +00:00
Zdenek Kabelac
83eeeb59ed Update test 2012-04-11 12:53:46 +00:00
Zdenek Kabelac
a59c3731c3 Improve test suite
Add make help target.
Add LVM_TEST_PARALLEL to support parallel runs of tests
Work around the problem the dmsetup table/info may return error
by using dmtable and dminfo function that will use 'should'.
(Error happens when some concurently running process removes table
entry while dmsetup command resolves table entries inside the loop.)
2012-03-28 11:10:08 +00:00
Peter Rajnoha
9e072e7072 Fix tests to work with vgscan --cache fixing inconsistent metadata. 2012-03-28 07:46:35 +00:00
Zdenek Kabelac
86bdfb3722 Improve teardown_devs
Try to avoid start of dmeventd during vgremove if the code has any bug
inside.
2012-03-23 09:41:20 +00:00
Zdenek Kabelac
8100989dbb Sleep longer in the test so it really dies properly
and check for right exit code from pgrep
2012-03-20 13:35:46 +00:00
Zdenek Kabelac
ef199faeda Update testing scripts
Make the teardown really usable - it will try down to remove all the left
devices even from previous test runs
(the only missing piece is probably proper mdadm teardown)
Add few more local vars
Try to setup PATH and LD_LIBRARY_PATH just once.
Try shorter sleeps.
2012-03-20 10:51:57 +00:00
Zdenek Kabelac
758f674240 Update test for dmevent restart
Actually restart was failing for different reason - so pass in proper
location of dmeventd for restart from lvm command and avoid using
the one from /sbin location.

Update pv create test with "" around path.
2012-03-20 10:48:59 +00:00
Zdenek Kabelac
fad6a65f3c Add comment about slow startup of dmeventd
Separat lvm dumpconfig on extra line, so the shell trace output
is not mixed with dump.
2012-03-16 19:13:09 +00:00
Zdenek Kabelac
171d7d5793 Skip dmeventd restart test
If dmevendt is not in /sbin, do not try to run restarting test.
FIXME: add some workaround for testing.
2012-03-16 19:11:29 +00:00
Zdenek Kabelac
e79d64b52b Regression fix kernel version check
got changed improperly with large update patch.
2012-03-16 19:09:49 +00:00
Zdenek Kabelac
358b3ce26b Longer sleep after clvmd start 2012-03-16 19:08:09 +00:00
Zdenek Kabelac
6bf324c4fd Switch condition for dmeventd check 2012-03-16 13:44:51 +00:00
Zdenek Kabelac
351be15dc4 Update tests
Indent

Shell improvements - use internal function for checks

Use PVs in ""   (LV and VG cannot have spaces)

Several test very starting 'dmeventd' without annoucing
it via prepade_dmeventd.

Fix some of test actually.
2012-03-16 13:00:05 +00:00
Zdenek Kabelac
cce2475889 Update test.sh check.sh utils.sh get.sh
Indent
Better shell usage
Function simplification
More usage of 'get' functions
Don't use valgrind tracing for check and get function (faster)
Update shell debugging (PS4, better stacktrace)
Support paths with spaces
Export SCRIPTNAME for external usage
Watch for dmeventd unexpectedly started during test
2012-03-16 12:59:43 +00:00
Zdenek Kabelac
fd818eb3aa Update aux.sh lvmwrapper
Indent

Add valgrind support:
 env LVM_TEST_VALGRIND={0123} (the higher level, more commands tested)
 env LVM_TEST_CLVMD=1   runs clvmd within valgrind.
 env VALGRIND  script name executed for each lvm command (def. is valg).

Smarted teardown - should minimize occurence of left dev entries
 (using dmsetup remove -f only as last resort)
 sort removed devices by open count before actual removal

Use "" around string that may contain spaces.

Set log/verbose and activation/retry_deactivation to defined value.

Remove  debug.log after successful lvm command (easier to check output).
2012-03-16 12:59:02 +00:00
Zdenek Kabelac
7755376d7c Test suite skip md_detection
Not normally needed - lets' enable it only for test that
really needs it.
2012-03-16 12:57:28 +00:00
Zdenek Kabelac
803b1056ca Allow to use also special prefixed names for test
Currently we could not test special prefixes in our test suite.
As teardown will not find such device and basicaly busyloops here,
as at cannot remove such names.

This patch adds possibity to use:

vgcreate  V_$vg1 $dev

Note: you still need to use $PREFIX somewhere in the name.
(And of course, it's really bad idea to use $PREFIX (=LVMTEST)
 for normally used LVs)

The only purpose of this patch is to allow testing cluster with
special vg names that begins with V_ , P_....
2012-03-16 12:56:29 +00:00
Petr Rockai
5ee11ece1a Relax the active-minor test a bit. 2012-03-16 11:36:51 +00:00
Petr Rockai
7720ed7037 Fix a regression in handling --major/--minor arguments to lvcreate & lvchange,
by allowing arg_int_value to be used with groupable options.
2012-03-16 10:43:52 +00:00
Jonathan Earl Brassow
dc7b1640ed Fix name conflicts that prevent down-converting RAID1 when specifying a device
When down-converting a RAID1 device, it is the last device that is extracted
and removed when the user does not specify a particular device.  However,
when a device is specified (and it is not the last), the device is removed and
the remaining sub-LVs are "shifted down" to fill the hole.  This cause problems
when resuming the LV because if the shifted devices were resumed (and thus
renamed) before the sub-LV being extracted, there would be a name conflict.
The solution is to resume the extracted sub-LVs first so that they can be
properly renamed preventing a possible conflict.

This addresses bug 801967.
2012-03-15 20:00:54 +00:00
Zdenek Kabelac
813a1868c6 Use proper "" for absolute paths 2012-03-14 17:14:33 +00:00
Zdenek Kabelac
32e7600cbd Improve harness code
Support timestamping with harness -  using VERBOSE=2
Fix also logging in several situation
(i.e. continue logging multiple test in VERBOSE mode,
do not coredump with empty output).
2012-03-12 14:24:15 +00:00
Alasdair Kergon
6185506b85 update reworded string 2012-03-06 03:16:05 +00:00
Alasdair Kergon
d36313a418 Change pvscan --cache syntax 2012-03-06 02:54:31 +00:00
Peter Rajnoha
1518c7aac2 Add test for name mangling functionality. 2012-03-05 12:49:06 +00:00
Zdenek Kabelac
1e6a29dbee Update thin test for thin_check
Test if thin_check is present in system and disable its use, when its missing.

Add testing for poolmetadatasize.

FIXME: Allocation policy for metadata pool might need some relaxing.
(For now it needs to put all block on one PV.)
2012-03-04 16:04:52 +00:00
Zdenek Kabelac
487c65373b Speedup test run by a few minutes
Reduce disc excercise for some test and focus on LVM testing by
using smaller extent size.

Reduce number of teardown_devs calls and use vg/lvremove instead.

Don't sleep for seconds on pvmove.

FIXME: shell/lvconvert-mirror-basic.sh seems to need more checking.
Test fails for smalled extent size then 512k.
2012-03-04 16:02:19 +00:00
Alasdair Kergon
d742cdf327 Change pvscan --lvmetad to pvscan --cache. 2012-03-02 18:09:46 +00:00
Zdenek Kabelac
e70d12be9e Wait for mirror in sync
1s could be too short
2012-03-02 00:08:48 +00:00
Petr Rockai
8cf54e6e13 Add a regression test for the PSize bug in pvs/lvmetad. 2012-03-01 20:03:45 +00:00
Petr Rockai
726cf41b80 Make the calls to pvscan --lvmetad in the testsuite slightly more civilised. 2012-02-23 23:58:42 +00:00
Zdenek Kabelac
d0a3aa04c8 Unit testing for some string libdm functions
TODO: more functions need to be unit tested.
2012-02-23 22:47:17 +00:00
Petr Rockai
d4836062ff Add a vgscan to lvcreate-repair.sh. The old test applied device filter hacks to
make devices invisible to lvm, but the behaviour of those is slightly different
than of actual missing devices. Running vgscan after re-enabling the device
triggers a metadata repair which is not done by vgremove -ff. This is not a
regression, merely an odd behaviour that has been around even before lvmetad.
2012-02-23 14:55:29 +00:00
Petr Rockai
edfff8a26a Kick out a debugging call to valgrind in lvmcache-exercise.sh. 2012-02-23 14:21:18 +00:00
Petr Rockai
dae0822698 The lvmetad client-side integration. Only active when use_lvmetad = 1 is set in
lvm.conf *and* lvmetad is running.
2012-02-23 13:11:07 +00:00
Petr Rockai
1ea2c6a2f6 Run tests with lvmetad if we have it. 2012-02-15 14:24:31 +00:00
Zdenek Kabelac
5b29e2ac60 Deal with slower test processing
If the merge was faster then query - deal with it and pass the test.
2012-02-15 13:51:17 +00:00
Petr Rockai
a635143d62 In the test harness, do the back-substitution (@TESTDIR@, @PREFIX@) also on the
live VERBOSE output, not just the post-mortem dumps.
2012-02-15 01:31:10 +00:00
Zdenek Kabelac
511a5f3ad8 Add test for memory allocation failures
Replace asserts with test for failing memory allocation.
Add at least stack traces.
Index counter starts from 1 (0 reserved for error), so replacing fingerprint.
2012-02-10 13:49:29 +00:00
Zdenek Kabelac
400dede7a6 TARGETS macro has to be defined before inclusion of make.tmpl
Use @TESTING@ check in this case.
2012-01-27 10:55:02 +00:00
Zdenek Kabelac
599771c9b0 Build test run target only for $(TESTING)
Add libraries properly in LDLIBS.
2012-01-26 21:40:36 +00:00
Zdenek Kabelac
6255e1b5f0 If clvmd is not started, die test instead of skipping it 2012-01-26 18:25:46 +00:00