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

2337 Commits

Author SHA1 Message Date
Zdenek Kabelac
a90de76fd8 tests: checking scanning correctness 2018-05-24 11:22:32 +02:00
Zdenek Kabelac
f865e1bf87 tests: passthrough args with extend_filter_LVMTEST
Don't rebuild config twice.
2018-05-24 11:22:59 +02:00
Zdenek Kabelac
89f34eaf0c tests: correcting symlink manipulation
Fix symlink and add 'verbose' pvs for a while for checking
scanning correctness.
2018-05-24 11:22:32 +02:00
Zdenek Kabelac
76a45424a7 tests: aux improve for mdadm support
Correcting some symlink handling.
2018-05-24 11:03:47 +02:00
David Teigland
3c9ed33f83 scan: move warnings about duplicate devices
We have been warning about duplicate devices (and disabling lvmetad)
immediately when the dup was detected (during label_scan).  Move the
warnings (and the disabling) to happen later, after label_scan is
finished.

This lets us avoid an unwanted warning message about duplicates
in the special case were md components are eliminated during the
duplicate device resolution.
2018-05-21 16:48:02 -05:00
Zdenek Kabelac
6029d6d8d8 tests: disable symlink test
It's quite unclear what the test is meant to do - disable it just like
within python test.
2018-05-21 11:59:39 +02:00
Zdenek Kabelac
25a66737e3 tests: use 4K extent size
To work with for 4k backend devices.
2018-05-21 11:58:10 +02:00
Zdenek Kabelac
b2574c2f3a python: use // for integer division 2018-05-18 16:25:44 +02:00
Zdenek Kabelac
3bbdde808a tests: pick either python2 or python3 .so
Use matching PYTHON library implementation.
2018-05-18 16:25:44 +02:00
Zdenek Kabelac
fbf64fe730 tests; make sure python_lvm_unit.py is executable 2018-05-18 16:25:44 +02:00
Zdenek Kabelac
43fb32e761 python: use python3 paths directly
Do not use /usr/bin/env for path of python3 as this is seen
as 'unwanted' and should be avoided.
2018-05-18 16:25:44 +02:00
Zdenek Kabelac
5b86b0e3dc build: set clean vars earlier
For better cleaning of test dirs.
2018-05-18 16:25:44 +02:00
Heinz Mauelshagen
a39eaea27d tests: fix kernal_at_least argument in aux.sh 2018-05-17 14:41:47 +02:00
Rick Elrod
8c453e2e5e cleanup: fix grammar in output - less then -> less than
This minor patch fixes grammar in a few messages which get
printed to users. It also fixes the same grammar mistake in
several comments.

Signed-off-by: Rick Elrod <relrod@redhat.com>
--
2018-05-17 10:37:45 +02:00
Joe Thornber
7c852c75c3 unit-tests: remove a couple of debug printfs 2018-05-16 10:25:30 +01:00
Joe Thornber
e296f784c9 Merge branch 'master' of git://sourceware.org/git/lvm2 2018-05-16 10:11:58 +01:00
Joe Thornber
df2acbbb97 bcache: nr_ios_pending wasn't being incremented
... but it was being decremented on completion.  Which meant
it wrapped, and no prefetches were ever issued after the
first completion.
2018-05-16 10:09:17 +01:00
Zdenek Kabelac
99cd7108d3 tests: better check for python libpath
Find also python3 lvm.so name.

And ATM just run a single test, otherwise we get too many cores.
2018-05-15 22:02:41 +02:00
Zdenek Kabelac
550380c1a4 tests: aux fixes
Properly check for kernel version.
Also detect sysfs throttling support.
2018-05-15 22:02:41 +02:00
Zdenek Kabelac
3b3ee66b1f tests: time limit waiting on lvmetad kill 2018-05-15 22:02:41 +02:00
Zdenek Kabelac
b5da4fdfce tests: drop junk 2018-05-15 22:02:41 +02:00
Zdenek Kabelac
be154e30e8 tests: move into generated file
Since python path is evaluated and we cannot use anymore /usr/bin/env
switch to generated file.
2018-05-15 22:02:41 +02:00
Zdenek Kabelac
d25c135806 tests: fix size of COW
Needs to be changed to match 4K extent_size.
2018-05-15 16:49:53 +02:00
Zdenek Kabelac
0217c53b24 tests: dont try to use DAX based brd device
Unfortunatelly on kernels <4.16 lvm2 can't user brd ramdisks
for backend device as number of test is failing with this kernel
message:

device-mapper: ioctl: can't change device type after initial table load.

caused by DAX request-based handling, and lvm2 tries to replace device
with backend 'error' bio-based device and such table reload is being
rejected.

So ATM keep ramdisk only on most recent kernel to experiment a bit,
for older machines just stay safe and keep old slower loop backend.
2018-05-15 16:07:13 +02:00
Zdenek Kabelac
0e56fa6892 tests: old systems do not have even throttling
When even throttling is not available, skip or use  should
with particular test piece.
2018-05-12 23:37:30 +02:00
Zdenek Kabelac
0a5edc1f12 tests: swith to mkstemp
As mkostemp is only on newer systems, switch to more old version
which effectively does exactly the same thing for given list of
open flags.
2018-05-12 23:23:54 +02:00
Zdenek Kabelac
9640320aea tests: start to use 4k mkfs
While newer system can detect need for 4K mkfs, on older test machines
running test suite over 4k is reporting problems.
Some more generic solution is needed thought.
2018-05-12 23:22:20 +02:00
Zdenek Kabelac
ca87674ea4 tests: fix check sysfs
Commit 810f856c24 missed to move
assign of P after setting maj & min.
2018-05-12 23:01:52 +02:00
Zdenek Kabelac
edede1d20f tests: do not try to create 1K extents 2018-05-12 22:52:41 +02:00
Zdenek Kabelac
093428b067 tests: restore functionality
Forgotten revert of tracing patch. Restoring previous functinality.
2018-05-12 22:51:43 +02:00
Zdenek Kabelac
7b8b13c62b tests: aux detecs supported segments
Replace previous compilation detection of present supported segtypes
with runtime check.
2018-05-12 22:50:36 +02:00
Zdenek Kabelac
67c02877a1 build: install unit-test 2018-05-12 18:18:23 +02:00
Zdenek Kabelac
4c7565b65d tests: add unit-test
Allow unit-test to be run as part of standard 'make check'.
2018-05-12 18:18:23 +02:00
Zdenek Kabelac
fa8d0b5766 tests: detect running bcache test on tmpfs
When test happens to run in tmpfs, it cannot use O_DIRECT (unsupported
with tmpfs).

CHECKME: unsure if detection of tmpfs is 'valid' but kind of works and
is very simple.
2018-05-12 18:18:23 +02:00
Zdenek Kabelac
79b2961399 build: rename device-mapper to device_mapper
As Makefiles already do use target with name 'device-mapper'
rename this new device-mapper dir to non-conflicting name.
We also seem to already use '_' in other dir names.

Also rename device_mapper/Makefile to source for generating Makefile.in
so we can use it for build in other source dirs properly.
2018-05-12 18:18:23 +02:00
Zdenek Kabelac
e2c766d37e build: fix build rules for srcdir
It's very hard to use some 'non-recurive' Makefiles with
rest of system running 'recursively'.

So ATM drop inclusion of subdir makefile and add support
for 2 new top-level targets:

unit-test  (builds test/unit dir)
run-unit-test (build & run test/unit/unit-test run)
2018-05-12 18:18:23 +02:00
Zdenek Kabelac
0b465d1543 tests: drop cache checking
Just like 52656c89fd
when now cache is compiled in 'unditionally'.

This patch is actually enforce by changes in
commit: 2bc896f2a3
where CACHE value is not set anymore.
2018-05-12 18:18:23 +02:00
Zdenek Kabelac
d38a2d64f0 tests: add support to run unit test 2018-05-12 18:18:23 +02:00
Zdenek Kabelac
cbe81a0b05 tests: inittest may run without root
If the test does not need root, it can use 'SKIP_ROOT_DM_CHECK'.

For such test no actions needed root to initilize DM devices and
nodes will be take and test can check i.e. functional unit tests.
2018-05-12 18:05:50 +02:00
Zdenek Kabelac
0221ebfd64 tests: inittest compare string
Avoid logging warning when compared string is empty with -eq.
2018-05-12 18:05:50 +02:00
Zdenek Kabelac
a7a23e7dd2 tests: aux extra protection for rm -rf 2018-05-12 18:05:50 +02:00
Zdenek Kabelac
38b4354494 tests: again disable this raid test
Still kills testing machines even with 4.17-rc4 kernels
on reshaping.
2018-05-12 18:05:50 +02:00
Zdenek Kabelac
ec0f5c2bf6 tests: drop delaying
Here seem delaying dev has no use.
2018-05-12 18:05:50 +02:00
Zdenek Kabelac
86c8f0f01f tests: using throttling 2018-05-12 17:48:31 +02:00
Zdenek Kabelac
7362ed68be tests: move device discard 2018-05-12 17:48:31 +02:00
Zdenek Kabelac
f5da325d70 tests: use throttle_dm_mirror
In this case it's better to use throttling of mirror sync,
that delay everything with dm_delay.
2018-05-12 17:48:31 +02:00
Zdenek Kabelac
172d8fb355 tests: aux support throttling of dm mirror
Usage of dm_delay looks to be slowing not just 'delayed' portion
of device, but due to the fact it's also slows down ANY flush
operation on such device it's overal speed impact is huge.

In some case we can however user other methods to slowdown disk writes,
in case of old dm 'mirror'  target we can throttle  I/O of mirror
synchronisation giving the next commands enough time to test couple
race conditions.

Usage:

throttle_dm_mirror [percentage]

Thtrottle down sync speed (lowest is '1' which is also default when
unspecified)

restore_dm_mirror

Restores the value of throttling before call of  'throttle_dm_mirror'
Usually it should '100'
2018-05-12 17:48:31 +02:00
Zdenek Kabelac
0cadfdd69d tests: try running tests over ramdisk
Currently usage of loop device over backend file in ramdisk (tmpfs)
is actually causing unnecassary memory consution, since just
reading such loop device is causing RAM provisioning.

This patch add another possible way how to use ramdisk directly
through 'brd' device when possible (and allowed).

This however has it's limitation as well -  brd does not support
TRIM, so the only way how to erase is to remove brd module ??

Alse there is 4K sector size limitation imposed by ramdisk.

Anyway - for some mirror test that were using large amount of
disk space (tens of MB) this brings noticable speed boost.
(But could be worth to solve the slowness of loop in kernel?)

To prevent using 'brd' for testing set LVM_TEST_PREFER_BRD=0
like this:

make check_local LVM_TEST_PREFER_BRD=0
2018-05-12 17:48:31 +02:00
Zdenek Kabelac
842b3074b7 tests: crypt test cannot run on ramdisk
This test can't use brd (ramdisk) as backend since for some
weird reason  lsblk is not listing these device.

TODO: test could be probably rewritten to avoid using lsblk somehow??
2018-05-12 17:48:31 +02:00
Zdenek Kabelac
6f48741062 tests: happy using of 4K backend devices
When the backend device supports only 4K blocks (like ramdisk)
we cannot use for testing any smaller blocksize.

So recalc test for 4K extent size.

We may possibly introduce one list extra test that
can be executed on devices with 512b sectors to
check lvm2 support those min extent sizes...
2018-05-12 17:48:31 +02:00