1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00
Commit Graph

640 Commits

Author SHA1 Message Date
Peter Rajnoha
bab3366f5f Remove VG/PV used in the test. 2012-05-09 14:44:59 +00:00
Peter Rajnoha
501a2c04a4 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
679f946dd9 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
8322deefee 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
7ff84d5269 Expect failure if the reduction doesn't really happen 2012-04-24 12:17:49 +00:00
Zdenek Kabelac
0644a64c94 Update test 2012-04-11 12:53:46 +00:00
Zdenek Kabelac
a5cffcdcf9 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
b798ea409d Fix tests to work with vgscan --cache fixing inconsistent metadata. 2012-03-28 07:46:35 +00:00
Zdenek Kabelac
bc013bc21f 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
adbf9a803a 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
7e7c9bb2f3 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
70d7a8ea41 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
d13c952ee4 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
4fd6aae7bf 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
2b6dee707a Regression fix kernel version check
got changed improperly with large update patch.
2012-03-16 19:09:49 +00:00
Zdenek Kabelac
124dec2880 Longer sleep after clvmd start 2012-03-16 19:08:09 +00:00
Zdenek Kabelac
268ec5553e Switch condition for dmeventd check 2012-03-16 13:44:51 +00:00
Zdenek Kabelac
1238935a2d 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
6ef0f403c7 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
523910032b 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
6960f5402a 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
b71339435d 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
3f5b1f651a Relax the active-minor test a bit. 2012-03-16 11:36:51 +00:00
Petr Rockai
c3b58ec989 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
f19be6776b 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
552f340ff5 Use proper "" for absolute paths 2012-03-14 17:14:33 +00:00
Zdenek Kabelac
80a1c93421 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
35d8953142 update reworded string 2012-03-06 03:16:05 +00:00
Alasdair Kergon
bb0234a63a Change pvscan --cache syntax 2012-03-06 02:54:31 +00:00
Peter Rajnoha
9a988ab420 Add test for name mangling functionality. 2012-03-05 12:49:06 +00:00
Zdenek Kabelac
bebbb5aff9 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
e04c6e4972 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
fdfa12d956 Change pvscan --lvmetad to pvscan --cache. 2012-03-02 18:09:46 +00:00
Zdenek Kabelac
6aff7af424 Wait for mirror in sync
1s could be too short
2012-03-02 00:08:48 +00:00
Petr Rockai
10dab1c621 Add a regression test for the PSize bug in pvs/lvmetad. 2012-03-01 20:03:45 +00:00
Petr Rockai
e8681b8d42 Make the calls to pvscan --lvmetad in the testsuite slightly more civilised. 2012-02-23 23:58:42 +00:00
Zdenek Kabelac
e3a47a9370 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
30cc37b645 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
af8b3ace37 Kick out a debugging call to valgrind in lvmcache-exercise.sh. 2012-02-23 14:21:18 +00:00
Petr Rockai
002f7a0ce2 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
580b0e871d Run tests with lvmetad if we have it. 2012-02-15 14:24:31 +00:00
Zdenek Kabelac
aaf717039e 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
d05bfd3265 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
f6aab411f8 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
0117473049 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
317325ed54 Build test run target only for $(TESTING)
Add libraries properly in LDLIBS.
2012-01-26 21:40:36 +00:00
Zdenek Kabelac
21fc2af47e If clvmd is not started, die test instead of skipping it 2012-01-26 18:25:46 +00:00
Jonathan Earl Brassow
cb09dc1274 Use suspend|resume_origin_only when up-converting RAID LVs, as mirrors do.
Failure to do so results in "Performing unsafe table load while X device(s) are
known to be suspended" errors.  While fixing the problem in this way works and
is consistent with the way the mirror segment type does it, it would be nice
to find a solution that uses the generic suspend/resume calls.

Also included in this check-in are additions to the test suite that perform
conversions on RAID LVs under a snapshot.  These tests are disabled for the
time being due to a kernel bug that is yet to be tracked down.
2012-01-24 14:33:38 +00:00
Zdenek Kabelac
8a3960d217 Minor oldstyle warning update 2012-01-09 12:29:15 +00:00
Zdenek Kabelac
d3e0fc4374 Thin update test case
Use thin-pool instead of thin_pool type.
2011-12-21 13:45:42 +00:00