1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
Commit Graph

2204 Commits

Author SHA1 Message Date
Zdenek Kabelac
0bf1cc2320 tests: sleep first
Sleep a bit before checking /sys/block dir so the kernel has a moment to
actually put scsi debug device in it...

Some quite old kernels are in troubles with this plain searching grep
without sleep (namely 2.6.32)

modprobe scsi_debug
 <sleep .1>
grep -H scsi_debug /sys/block/*/device/model
modprobe -r scsi_debug
2017-12-19 15:28:07 +01:00
Heinz Mauelshagen
584ff361df test: fix trap adding proper teardown to previous, new raid tests
Also remove superfluous variable.
2017-12-13 14:41:23 +01:00
Heinz Mauelshagen
86fa0333ff test: new raid tests
Add three new raid tests with io load and table
reloads during reshape for target 1.13.2.

Add a raid0 to raid10 conversion test.

Also add more signals to trap in lvconvert-raid-reshape-load.sh.
2017-12-13 13:30:53 +01:00
Marian Csontos
15ccea7111 test: Fix condition when detecting lvmdbusd 2017-12-12 14:19:22 +01:00
Marian Csontos
2f4c2a43d4 test: lvmdbusd is used for process name
lvmdbusd was started, but the process was not recognized by pgrep.

- configure does not make the script executable - set the flag
  explicitly when running make check,
- process name changed to lvmdbusd. The previous python3 value
  originated from the use of /usr/bin/env.
2017-12-12 13:17:07 +01:00
Heinz Mauelshagen
b74e7f6a78 test: allow to succeed in the cluster
Avoiding "$(get first_extent_sector "$d")" in the loop
allows the test to succeed in the cluster.  Further cluster
analysis needed to get to the core reason.
2017-12-01 18:59:55 +01:00
Heinz Mauelshagen
053314f295 test: add large tests skip option
The lvm2 test suite aims at small test resource footprints
(few PVs, small PV sizes) to run on tmpfs backed loop device.

OTOH, lvconvert-reshape-raid.sh aims to test the maxima of
supported total stripes of 64.  This patch adds a prerequisite
conditional to skip tests using more than 14 stripes.

It requires the target version 1.13.1 to avoid deadlocks.
2017-12-01 18:50:55 +01:00
Heinz Mauelshagen
7aef59c6c3 test: reduce pv sizes, fix comment and stripe size 2017-12-01 18:42:37 +01:00
Heinz Mauelshagen
16fa9d9ed5 test: cleanup command 2017-12-01 18:39:38 +01:00
Heinz Mauelshagen
3688eeeea0 test: disable new reshape test until target version 1.13.1 2017-12-01 18:33:11 +01:00
Heinz Mauelshagen
9681d98cc4 test: new reshape test under io load 2017-12-01 18:31:12 +01:00
Marian Csontos
b8caca4652 tests: Fix common_dev_ argument handling
from[:[len]] arguments with missing colon assigned from to len, instead
of till_the_end_of_device.
2017-11-28 12:03:35 +01:00
Zdenek Kabelac
ce83162d7c tests: more places where missing should not appear 2017-11-24 16:09:59 +01:00
Zdenek Kabelac
7eae2647c0 tests: typo 2017-11-24 16:09:59 +01:00
Zdenek Kabelac
5e88d3a89b cache: use conditional in warning message
In some cases the message could be slightly misleading so use
here rather conditional.

TODO:

In future we may possibly further tune the message in case we are
certain the level of redundancy protection has not been reduced.
2017-11-24 16:09:59 +01:00
Zdenek Kabelac
b0618f9011 tests: pvmove supports more cases
pvmove handles cached LVs as well as snapshots now.
2017-11-15 21:00:29 +01:00
Heinz Mauelshagen
7a5728fb4c test: additional avoid have_raid overhead 2017-11-14 14:41:44 +00:00
Heinz Mauelshagen
97750cd12f test: avoid have_raid overhead 2017-11-14 14:41:15 +00:00
Zdenek Kabelac
fe69a8d215 tests: use nonflusing status
Avoid being blocked when reporting status with flushing on some stacked
device tree.
2017-11-11 01:00:35 +01:00
Ondrej Kozina
f0d1c8429b test: check dmsetup hides integrity encryption keys 2017-11-10 15:23:07 +01:00
Marian Csontos
512b2adc77 test: D-Bus test_nesting requires filter 2017-11-09 11:57:59 +01:00
Marian Csontos
cd3b5e60a8 test: Rename test nothing methods
These two methods might be useful for debugging, but are not testing
anything.
2017-11-09 11:31:54 +01:00
Zdenek Kabelac
b78add3df5 tests: allow to proceed futher with test
So raid doesn't want to create raid arrays with bigger regionsize ATM,
so just use smaller regionsize.
2017-11-08 00:02:54 +01:00
Zdenek Kabelac
d6473b2018 tests: detect racy systemd version
Systemd 222 has a bug - where it's sometimes umount unpredictibly just
mounted device - skip testing when this happens.
2017-11-08 00:02:54 +01:00
Zdenek Kabelac
2172115379 tests: have some space for 2nd mda
pvcreate with 2MDAs needs some extra space.
2017-11-08 00:02:54 +01:00
Zdenek Kabelac
e822a9f38d tests: snasphot merging 2017-11-07 21:34:35 +01:00
Jonathan Brassow
4129cf5090 testsuite: Forgot to pull 'should's after fixing RAID4/5/6 mismatch test
Test will now fail rather than warn if conditions are not met.
2017-11-02 10:25:46 -05:00
Jonathan Brassow
9e8dec2f38 testsuite: Fix problem when checking RAID4/5/6 for mismatches.
The lvchange-raid[456].sh test checks that mismatches can be detected
properly.  It does this by writing garbage to the back half of one of
the legs directly.  When performing a "check" or "repair" of mismatches,
MD does a good job going directly to disk and bypassing any buffers that
may prevent it from seeing mismatches.  However, in the case of RAID4/5/6
we have the stripe cache to contend with and this is not bypassed.  Thus,
mismatches which have /just/ happened to an area that now populates the
stripe cache may be overlooked.  This isn't a serious issue, however,
because the stripe cache is short-lived and reasonably small.  So, while
there may be a small window of time between the disk changing underneath
the RAID array and when you run a "check"/"repair" - causing a mismatch
to be missed - that would be no worse than if a user had simply run a
"check" a few seconds before the disk changed.  IOW, it simply isn't worth
making a fuss over dropping the stripe cache before beginning a "check" or
"repair" (which we actually did attempt to do a while back).

So, to get the test running smoothly, we simply deactivate and reactivate
the LV to force the stripe cache to be dropped and then proceed.  We could
just as easily wait a few seconds for the stripe cache to empty also.
2017-11-02 09:49:35 -05:00
Jonathan Brassow
5013032845 testsuite: Add and document a 'should' for "idle" -> "recover" RAID test
When a "recover" is just starting for a RAID LV, it is possible to get
"idle" for the sync action if the status is issued quickly enough.  This
is fine, the MD thread just hasn't gotten things going yet.  However,
the /need/ for a "recover" should be marked in md->recovery and it would
be simple enough to fix the kernel so this doesn't happen.  May eventually
want a separate bug for this, but for now it fits with RHBZ 1507719.
2017-11-02 08:53:48 -05:00
Jonathan Brassow
bc29785d09 test: clean-up failing test case and document 'should' cases
There are two known bugs in the lvconvert-raid-status-validation.sh
test.  The first one I consider to be more of an annoyance (1507719).
The second one I consider to be more serious (1507729).

RHBZ 1507719 simply documents the fact that the three RAID status
fields may not always be coherent due to the way they are set and
unset when the MD thread is shutting down and starting up.  For
example, the sync ratio may be 100% but the sync action may not
yet have switched to "idle" and the health characters may not yet
all be 'A's (i.e. the devices set to InSync).

RHBZ 1507729 is more serious.  The sync ratio can be 100% for a
short period of time after upconverting linear -> RAID1.  It is
reset to 0 once the MD sync thread gets to work on it.  It does
this because, technically, the array /is/ in-sync if the new
devices are excluded - i.e. the data is 100% available and
consistent.  I'm not sure what to do about this problem, but we'd
much rather not have this state that looks exactly like the
end of the process when the sync ratio is 100% because the
"recover" process finished, but the sync action and health
characters haven't been updated yet.  Put simply, the problem
is that we can't tell if a sync is starting or finished based
on the status output.
2017-10-30 21:58:38 -05:00
Zdenek Kabelac
7e3be7d1ba tests: revert commit change
Commit 0424410773 by mistake took also
this unwanted local modification of test - revert it.
2017-10-30 17:27:29 +01:00
Zdenek Kabelac
3efd1f9c6e tests: load reiserfs
Preload reiserfs module for the case, fs is present/compiled for a
kernel but it's not present in memory.

Size reducition needs --yes confirmation to preceed for reiserfs.
2017-10-30 14:39:16 +01:00
Zdenek Kabelac
0424410773 validation: capture store of LV without segment 2017-10-30 14:39:16 +01:00
Zdenek Kabelac
af21263cb3 thin: fix merging messages
Correct reported message when thin snapshot has been already merged.
So lvm2 is no longer reporting "Mergins of snapshot X will occur..."
(even with swapped names).
2017-10-30 11:53:39 +01:00
Zdenek Kabelac
eb710cced1 tests: update checked messages 2017-10-27 17:07:42 +02:00
Zdenek Kabelac
b765288bf2 tests: better clustering support
Use exclusive activation for snapshot conversion since we can only
convert exclusively active volumes.
2017-10-26 14:04:58 +02:00
Zdenek Kabelac
1e80ec8926 tests: allow override of LVM_LOG_FILE_MAX_LINES
Just like with other vars support this:

make check_local T=xyz LVM_LOG_FILE_MAX_LINES=10000000

Allows easily to override existing line limit.
Also increase limiting size of logs per command since some of
our commands are becoming very verbose....
2017-10-26 14:04:58 +02:00
Zdenek Kabelac
04186616be Makefile: help shows hint about LVM_LOG_FILE_MAX_LINES 2017-10-26 14:04:58 +02:00
Zdenek Kabelac
f32ef63b6c tests: snapshot conversions
Add missing tests for snapshost conversions.
2017-10-25 22:02:24 +02:00
Jonathan Brassow
38f7fbac64 clean-up: Correct the comment to match the particular test case 2017-10-24 14:06:44 -05:00
Zdenek Kabelac
10c76ce35a tests:check lvconvert with /dev in vglvname 2017-10-24 16:16:08 +02:00
Ondrej Kozina
213cea3aaa test: add regression test for fsadm bug
the bug in LUKS grow/shrink decision in fsadm was
masked due to fact that default LVM2 extent size
was larger than LUKS1 default data offset for dm-crypt
mapping. The new test address this bug.
2017-10-24 13:41:00 +02:00
Zdenek Kabelac
888dd33148 tests: check stacked cache dataLV of thin-pool 2017-10-23 12:01:16 +02:00
Heinz Mauelshagen
d6f4563103 test: remove 'should's from test to test target status race fix 2017-10-19 17:41:44 +02:00
Zdenek Kabelac
1f359f7558 tests: check external origin is monitored 2017-10-16 15:47:46 +02:00
Marian Csontos
ae55b1b20a test: "Disable" lvconvert-raid-reshape
...when running from ramdisk. This causes test failure, so it is kept on
eyes.
2017-10-12 10:55:02 +02:00
Ondrej Kozina
71261ae374 test: update fsadm-crypt to pass with legacy cryptsetup 2017-10-11 14:39:33 +02:00
Ondrej Kozina
e61313843f test: fsadm-crypt.sh fixes
use conservative 'luksOpen' command instead
fix reiserfs tests on plain crypt devices
2017-10-10 15:47:04 +02:00
Ondrej Kozina
27ef503b35 test: add fsadm crypt test 2017-10-10 14:19:07 +02:00
Zdenek Kabelac
d9f9ce1268 tests: use portable df output
For awk parsing more 'predictable' format of output line is needed.
2017-09-20 15:34:02 +02:00