1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
Commit Graph

822 Commits

Author SHA1 Message Date
Petr Rockai
8b3664dc8d test: Set the timeout to 3 minutes (was 5s accidentally). 2013-08-28 14:53:23 +02:00
Petr Rockai
64fe17dc94 test: Add a new "check_full" target, which also tests with real /dev.
The original "check" target stays confined to a local device directory, while
check_full does 6 flavours, 3 with a local device directory and 3 with the
global /dev directory (the latter are prefixed with "s" for
"system"). I.e.: normal, cluster, lvmetad, snormal, scluster, slvmetad.
2013-08-28 14:53:23 +02:00
Petr Rockai
b516a72b11 test: Check for flavoured variables earlier.
This is necessary to make LVM_TEST_DEVDIR flavourable, and in turn have flavours
that use the global /dev (which can in turn be managed by udev).
2013-08-28 14:53:23 +02:00
Petr Rockai
d07cf851e5 test: Remove a redundant drain() from the timeout path. 2013-08-28 14:53:23 +02:00
Petr Rockai
c1217e6881 test: Make timeouts a little more robust & verbose. 2013-08-28 14:53:23 +02:00
Petr Rockai
9a1da7b262 TEST: Add a timeout to the harness, killing tests after 2 minutes. 2013-08-28 14:53:23 +02:00
Jonathan Brassow
e72b2d047d TEST: Add tests for lvchange actions of RAID under thin
Patch includes RAID1,4,5,6,10 tests for:
- setting writemostly/writebehind
* syncaction changes (i.e. scrubbing operations)
- refresh (i.e. reviving devices after transient failures)
- setting recovery rate (sync I/O throttling)
while the RAID LVs are under a thin-pool (both data and metadata)

* not fully tested because I haven't found a way to force bad
  blocks to be noticed in the testsuite yet.  Works just fine
  when dealing with "real" devices.
2013-08-27 16:46:40 -05:00
Jonathan Brassow
0799e81ee0 test: pvmove tests for all the different segment types.
Test moving linear, mirror, snapshot, RAID1,5,10, thinpool, thin
and thin on RAID.  Perform the moves along with a dummy LV and
also without the dummy LV by specifying a logical volume name as
an argument to pvmove.
2013-08-26 16:38:54 -05:00
David Teigland
7d6a125e97 test: add process-each-vg and process-each-lv
These test the toollib functions that select
vgs/lvs to process based on command line args:
empty, vg name(s), lv names(s), vg tag(s),
lv tags(s), and combinations of all.
2013-08-23 14:38:48 -05:00
David Teigland
506bc045b5 test: add process-each-duplicate-vgnames
Test that vgs shows both vgs when two vgs
exist with the same name but different uuids.
2013-08-23 14:19:59 -05:00
David Teigland
8c511122f4 test: add vg-name-from-env
vg name should come from env var LVM_VG_NAME
for commands that take vg name and lv name,
but vg name is not specified on command line.
2013-08-23 14:10:29 -05:00
Marian Csontos
732e609fe2 test: Fix false positives due to open devices
Something is rather randomly keeping devices open. As it is a known udev
feature, waiting for transaction may (or may not) help.
2013-08-14 16:04:01 +02:00
Petr Rockai
0da72743ca vgck: Fix #894136, notice on-disk corruption in spite of lvmetad. 2013-08-13 23:25:49 +02:00
Jonathan Brassow
8615234c0f RAID: Fix bug making lvchange unable to change recovery rate for RAID
1) Since the min|maxrecoveryrate args are size_kb_ARGs and they
   are recorded (and sent to the kernel) in terms of kB/sec/disk,
   we must back out the factor multiple done by size_kb_arg.  This
   is already performed by 'lvcreate' for these arguments.
2) Allow all RAID types, not just RAID1, to change these values.
3) Add min|maxrecoveryrate_ARG to the list of 'update_partial_unsafe'
   commands so that lvchange will not complain about needing at
   least one of a certain set of arguments and failing.
4) Add tests that check that these values can be set via lvchange
   and lvcreate and that 'lvs' reports back the proper results.
2013-08-09 17:09:47 -05:00
Zdenek Kabelac
a1dc585fa6 test: can convert pool to external origin
Test for http://bugzilla.redhat.com/show_bug.cgi?id=983743
2013-08-09 23:17:15 +02:00
Jonathan Brassow
ea4c0ea34f TEST: Be explicit about which mirror segment type to use.
In those places where mirrors were being created while assuming
a default segment type of "mirror", we include the '--type mirror'
argument to explicitly set the segment type.  This will preserve
the mirror testing that is performed even though the default
mirroring segment type is now "raid1".
2013-08-07 15:48:31 -05:00
Peter Rajnoha
f50e8fb9b9 tests: add profiles.sh test 2013-08-07 12:17:36 +02:00
Zdenek Kabelac
ea605d1ec7 thin: metadata resize needs 1.9 version
Version 1.8 is not yet fully usable for metadata resize.
2013-07-31 15:29:27 +02:00
Zdenek Kabelac
5d9628475e libdm: add DM_ABORT_ON_INTERNAL_ERRORS
Support tests with abort when libdm encounters internal
error - i.e. for dmsetup tool.

Code execution will be aborted when
env var DM_ABORT_ON_INTERNAL_ERRORS is set to 1
2013-07-31 15:27:34 +02:00
Peter Rajnoha
ba1a8878d0 tests: add profileconf fn to generate profiles
profileconf <profile_name> <config> ...
2013-07-30 15:44:15 +02:00
Tony Asleson
9b28255aac python unit test: Limit PVs to use
When running in the context of the test framework
we need to limit our PVs to use to those created
in the framework.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
2013-07-26 16:43:49 -05:00
Tony Asleson
df6f0f71b1 python unit test: White space/pep8 cleanup
pep8 compliant, except for using tabs instead of
spaces.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
2013-07-26 10:24:08 -05:00
Tony Asleson
929d5f3563 python-lvm: Change exception back to LibLVMerror
This is an API exposed name and shouldn't be changed
to _LibLVMError.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
2013-07-24 17:55:12 -05:00
Zdenek Kabelac
da5284a500 thin: lvconvert cannot convert pool to mirror
Suggest to use _tdata and _tmeta devices for that.
This fixes regression from too relaxed change in
f1d5f6ae81

Without this patch there are some empty LVs created before
mirror code recognizes it cannot continue.

(in release fix)
2013-07-24 17:17:19 +02:00
Zdenek Kabelac
5597dc3652 thin: not zeroing for non-zeroed thin pool snaps
Do not zero initial 4KB of thin snapshot volume for thin pool with
disabled zeroing.
2013-07-24 01:15:31 +02:00
Zdenek Kabelac
f6ded62291 snapshot: fix merging
When the merging of snapshot is finished, we need to clean dm table
intries for snapshot and -cow device. So for merging snapshot
we have to activate_lv plain 'cow' LV and let the table
resolver to its work - shortly deactivation_lv() request
will follow - in cluster this needs LV lock to be held by clvmd.

Also update a test - add small wait - if lvremove is not 'fast enough'
and merging process has not been stopped and $lv1 removed in background.
Ortherwise the following lvcreate occasionally finds name $lv1 still in use.

(in release fix)
2013-07-22 16:26:00 +02:00
Peter Rajnoha
6ca81a091c tests: comment about pvscan --cache return value 2013-07-22 15:57:18 +02:00
Jonathan Brassow
081308af30 TEST: Support testing new RAID features in RHEL6 kernels
We check the version number of dm-raid before testing certain
features to make sure they are present.  However, this has
become somewhat complicated by the fact that the version #'s
in the upstream kernel and the REHL6 kernel have been diverging.
This has been a necessity because the upstream kernel has
undergone ABI changes that have necessitated a bump in the
'Y' component of the version #, while the RHEL6 kernel has not.
Thus, we need to know that the ABI has not changed but the
features have been added.  So, the current version #'ing stands
as follows:

RHEL6   Upstream   Comment
======|==========|========
** Same until version 1.3.1 **
------|----------|--------
 N/A  |   1.4.0  | Non-functional change.
      |          | Removes arg from mapping function.
------|----------|--------
1.3.2 |   1.4.1  | RAID10 fix redundancy validation checks.
------|----------|--------
1.3.5 |   1.4.2  | Add RAID10 "far" and "offset" algorithm support.
      |          | Note this feature came later in RHEL6 as part of
      |          | a separate update/feature.
------|----------|--------
1.3.3 |   1.5.0  | Add message interface to allow manipulation of
      |          | the sync_action.
      |          | New status (STATUSTYPE_INFO) fields: sync_action
      |          | and mismatch_cnt.
------|----------|--------
1.3.4 |   1.5.1  | Add ability to restore transiently failed devices
      |          | on resume.
------|----------|--------
1.3.5 |   1.5.2  | 'mismatch_cnt' is zero unless [last_]sync_action
      |          | is "check".
------|----------|--------

To simplify, writemostly/writebehind, scrubbing, and transient device
failure restoration are all tested based on the same version
requirements: (1.3.5 < V < 1.4.0) || (V > 1.5.2).  Since kernel
support for writemostly/writebehind has been around for some time,
this could mean a reduction in the scope of kernels tested for this
feature.  I don't view this as much of a problem, since support for
this feature was only recently added to LVM.  Thus, the user would
have to be using a very recent LVM version with an older kernel.
2013-07-22 08:50:27 -05:00
Petr Rockai
3fdb45d040 pvscan: Respect lvmetad (global) filter in --cache w/ a device. 2013-07-22 15:05:39 +02:00
Petr Rockai
bd60232d74 TEST: Add a regression test for the ondisk/orphan bug. 2013-07-22 11:57:23 +02:00
Jonathan Brassow
6aeb54c77c TEST: Update syncaction test to match latest kernel updates
The mismatch count reported by a dm-raid kernel target used
to be effectively random, unless it was checked after a
"check" scrubbing action had been performed.  Updates to the
kernel now mean that the mismatch count will be 0 unless a
check has been performed and discrepancies had been found.
This has been the intended behaviour all along.

This patch updates the test suite to handle the change.
2013-07-19 15:24:34 -05:00
Alasdair G Kergon
da79fe4c1d reporting: tidy recent new fields
Add underscores and prefixes to recently-added fields.
(Might add more alias functionality in future.)
2013-07-19 01:30:02 +01:00
Zdenek Kabelac
4e724f5f52 thin: for thin volumes properly list modules
thin volume needs   thin-pool and  thin kernel modules so print them
both for   lvs -o+modules
2013-07-18 18:22:43 +02:00
Zdenek Kabelac
63d09b75f8 tests: one missed automatic name
Avoid depending on auto-names lvol%d.
2013-07-15 16:38:55 +02:00
Zdenek Kabelac
255db4c4e4 tests: thin lvol0 updates 2013-07-15 16:01:29 +02:00
Zdenek Kabelac
3498575b20 tests: more thin external origin tests 2013-07-15 16:01:28 +02:00
Peter Rajnoha
eaa1f0eb15 api test: remove unused variable 2013-07-15 09:26:31 +02:00
Peter Rajnoha
4e680ff3ab tests: use lvcreate -s -K for thin snapshots
Thin snapshots are not activated now by default so this needs
to be explicitly overridden with -K now.
2013-07-12 20:54:17 +02:00
Peter Rajnoha
55d418fb20 tests: fix tests to cope with latest changes
- lvs -o lv_attr has now 10 indicator bits
- use '--ignoremonitoring' instead of the shortcut '--ig' used before (since
it would be ambiguous with new '--ignoreactivationskip')
2013-07-12 20:54:17 +02:00
Petr Rockai
8e4a3dd9cb lvm2api: Make the vg_list_* functions work with lvmetad (+ test). 2013-07-11 09:38:46 +02:00
Zdenek Kabelac
9e79cca9e7 python: update coding style
Update code to match lvm coding standards
Disable/skip test - since it's accessing VGs available in the system.
Before reenable - validate it's not touching any PV outside those
created during test.
2013-07-05 17:20:57 +02:00
Tony Asleson
04efe869a4 python-lvm: Improve unit test case(s)
Create/remove PV
Create/remove snapshots (old type & thin)
PV lookups based on name and UUID
PV resize

Signed-off-by: Tony Asleson <tasleson@redhat.com>
2013-07-02 14:24:34 -05:00
Tony Asleson
40feaa7bbe python-lvm: Bug fixes from unit tests.
After the last rebase, existing unit test case was
run which uncovered a number of errors that required
attention.

Uninitialized variables and changes to type of numeric
return type were addressed.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
2013-07-02 14:24:34 -05:00
Jonathan Brassow
bdcfe8c6de TEST: Test RAID syncaction, writemostly, & refresh under snapshots
Test the different RAID lvchange scenarios under snapshot as well.

This patch also updates calculations for where to write to an
underlying PV when testing various syncactions.
2013-06-20 11:48:15 -05:00
Jonathan Brassow
a6d13308ec RAID/MIRROR: Honor mirror_segtype_default when upconverting linear LVs
If the user would upconvert a linear LV to a mirror without specifying
the segment type ("--type mirror" vs "--type raid1"), the "mirror"
segment type would be chosen without consulting the 'default_mirror_segtype'
setting in lvm.conf.  This is now used as the basis for determining
which should be used if left unspecified.
2013-06-19 17:50:10 -05:00
Zdenek Kabelac
2562968864 vgcfgrestore: fix crash on restore of wrong vgname
When vgname has not existed in metadata, it has crashed on double free
in format_instance destroy() -  since VG was created, used FID and was
released - which also released FID, so further use was accessing bad
memory.

Fix it for this code path before release_vg() so FID will exists
when _vg_read_file_name() returns NULL.
2013-06-18 22:11:21 +02:00
Jonathan Brassow
7a4fdc1902 TEST: Fix 'dd' overrunning device size and causing test failure
Assumed size of 4M was too large and the test was failing because
'dd' was failing to perform its write.

Calculate the size we need to write with 'dd' instead, so we
don't overrun the device.
2013-06-17 12:38:09 -05:00
Zdenek Kabelac
d4308a558d snapshot: fix max size limit check for COW device
Use proper max size as a multiple of extent size.
And use 64bit arithmentic for validation of minsize.
(in release fix).
2013-06-17 09:37:50 +02:00
Zdenek Kabelac
362d8ead64 tests: more test run in cluster mode
aux updates:

prepare_vg now created clustered VG for cluster tests.

since dm-raid doesn't work in cluster, skip the cluster
test when someone checks for dm-raid target until fixed.
2013-06-16 00:07:33 +02:00
Zdenek Kabelac
fa5d4bc780 tests: harness updates 2013-06-13 14:51:02 +02:00