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

2271 Commits

Author SHA1 Message Date
Joe Thornber
9fe0be871c unit-test/matcher_t: Fixup Kabi's test
The matcher matches the regexes in reverse order.
2018-05-02 13:53:43 +01:00
Joe Thornber
506ab29bfd unit-test/matcher_t: add another (failing!) test for Kabi 2018-05-02 13:31:57 +01:00
David Teigland
11436b00e0 tests: add gfs-pool test
Put back a test like the old one that was removed
in d709d8445f.

It verifies that lvm will ignore and not use a
gfs-pool device.
2018-05-01 15:24:42 -05:00
David Teigland
39f05855c0 tests: remove use of lvm1 metadatatype 2018-05-01 13:29:57 -05:00
David Teigland
d709d8445f tests: remove gfs pool test 2018-05-01 13:25:40 -05:00
David Teigland
9687ee2a74 tests: update lvmetad-disabled to not use lvm1 2018-05-01 11:33:39 -05:00
Joe Thornber
3ea862bdfc unit-test/bcache_t: test was using too large a block size 2018-05-01 14:17:12 +01:00
Joe Thornber
de042fa13d unit-test/bcache_t: Use a stripped down fixture for some tests 2018-05-01 12:54:57 +01:00
Joe Thornber
f564e78d98 bcache: rewrite bcache_{write,zero}_bytes
These are utility functions so should only use the public interface.

Also write_bytes was flushing, which will kill performance.
2018-05-01 12:07:33 +01:00
Joe Thornber
c863c9581d Merge branch 'master' of git+ssh://sourceware.org/git/lvm2 2018-05-01 10:48:42 +01:00
Joe Thornber
7aba7fe68b unit-test/io_engine_t: add a little test for bcache_{read,write}_bytes 2018-05-01 10:47:40 +01:00
Joe Thornber
f6459757af unit-test/bcache_t: fixup a test.
Problem found with valgrind.
2018-05-01 09:17:55 +01:00
David Teigland
c1cd18f21e Remove lvm1 and pool disk formats
There are likely more bits of code that can be removed,
e.g. lvm1/pool-specific bits of code that were identified
using FMT flags.

The vgconvert command can likely be reduced further.

The lvm1-specific config settings should probably have
some other fields set for proper deprecation.
2018-04-30 16:55:02 -05:00
David Teigland
c365d7de4f tests: fix THIN built-in check 2018-04-30 13:12:17 -05:00
Joe Thornber
39f24a169c unit-test/io_engine_t: Improve the read test.
Now verifies what it reads.
2018-04-30 17:09:24 +01:00
Joe Thornber
ef79d639fe unit-test/io_engine_t: use posix_memalign() rather than aligned_alloc()
Not present on older systems.
2018-04-30 16:55:19 +01:00
Joe Thornber
2bc896f2a3 build: remove --with-{snapshots,mirrors,raid,thin,cache} options from ./configure
It now behaves as if the were all set as 'internal'
2018-04-30 10:11:23 +01:00
Zdenek Kabelac
b904d6653d tests: add also snapshot monitoring 2018-04-30 10:41:51 +02:00
Zdenek Kabelac
dd7ac793a0 aux: enhance teardown to better handle weird names
When 'dmsetup' reports result with --nameprefixes it currently
incorrectly 'escapes' problematic characters.

Letting pass such string though shell 'eval' function is hard task.
So instead cut away substring.

Once dmsetup will start to properly escape backslash and apostrophe
this function may need further tuning.
2018-04-30 10:41:51 +02:00
David Teigland
138225a3a8 test: remove pv-duplicate
This wasn't testing duplicate PVs, which are tested by
process-each-duplicate-pvs.sh.
2018-04-27 16:25:41 -05:00
Joe Thornber
ab63923d19 unit-tests: Move to test/unit 2018-04-27 16:55:07 +01:00
Joe Thornber
ea34dad66f [unit-test] Push the new unit test framwork.
See doc/unit-test.txt for details.

Some bcache tests failing.  Probably due to dct changing semantics, will
fix in follow up patch.
2018-04-26 11:59:39 +01:00
Zdenek Kabelac
dcb5434a7f tests: more zero usage
Another case where usage of zero backend for mirror legs is more
effective then using delayed_dev.
2018-04-23 22:42:18 +02:00
Zdenek Kabelac
fc3ed8856f tests: update testing to not use delay dev
Instead of using delayer device user 'zero' device and let mirror
do some real work which takes some time.

In case the test machine is too fast - mirror might need to be made bigger
to meet needed criteria.

Also move all test needed this 'zero' PV trick to the end of test
so  $dev2  and $dev4 are covered with 'zero' and can take any amount of
write without consuming any real space.
2018-04-23 22:42:18 +02:00
David Teigland
aee27dc7ba scan: skip device rescan in vg_read
For reporting commands (pvs,vgs,lvs,pvdisplay,vgdisplay,lvdisplay)
we do not need to repeat the label scan of devices in vg_read if
they all had matching metadata in the initial label scan.  The
data read by label scan can just be reused for the vg_read.
This cuts the amount of device i/o in half, from two reads of
each device to one.  We have to be careful to avoid repairing
the VG if we've skipped rescanning.  (The VG repair code is very
poor, and will be redone soon.)
2018-04-20 11:23:14 -05:00
David Teigland
a01a8d7172 tests: vgck now exits with error for bad vg 2018-04-20 11:22:48 -05:00
David Teigland
ae093df3f1 test: vgsplit-usage if LVM1 tests 2018-04-20 11:22:46 -05:00
David Teigland
d75aa55784 disable LVM1 tests 2018-04-20 11:22:46 -05:00
Joe Thornber
dc8034f5eb [device/bcache] more work on bcache 2018-04-20 11:12:50 -05:00
Joe Thornber
1cde30eba0 [device/bcache] More fiddling with tests 2018-04-20 11:12:50 -05:00
Joe Thornber
467adfa082 [device/bcache] More tests and some bug fixes 2018-04-20 11:12:50 -05:00
Joe Thornber
8ae3b244fc [build] include test/unit/Makefile rather than recursive build
FIXME: unit tests are not currently run as part of make check.
2018-04-20 11:12:50 -05:00
Joe Thornber
b03e55a513 [device/bcache] rename a unit test 2018-04-20 11:12:50 -05:00
Joe Thornber
0d0fab3d2d [device/bcache] another unit test 2018-04-20 11:12:50 -05:00
Joe Thornber
0f0eb04edb [device/bcache] some more work on bcache 2018-04-20 11:12:50 -05:00
Joe Thornber
46867a45d2 [device/bcache] stub a unit test 2018-04-20 11:12:50 -05:00
Zdenek Kabelac
d51429254f tests: improve mirror_images_redundant
Use only passed VG for lvs and avoid 1 extra uneeded use of lvs.
2018-04-20 12:17:01 +02:00
Zdenek Kabelac
ac18005de9 tests: update mirror test
Since lvconvert again is able to wait on mirror synchronization,
drop 'should'.

Also add FIXME about  'lvreduce' and too big region size.
2018-04-20 12:17:01 +02:00
Heinz Mauelshagen
bc286910ec test: add lvcreate-raid-volume_list
Test that no (Sub)LV remnants persist if the volume group is
not listed in configuration variable activation/volume_list,
hence not activatable thus causing initialization of rmeta
SubLVs to fail.

Related: rhbz1161347
2018-04-06 15:26:38 +02:00
Zdenek Kabelac
3a48fb47b7 tests: shellcheck misc
Few more minor complains from ShellCheck.
2018-03-23 17:25:00 +01:00
Zdenek Kabelac
1507956383 tests: shellcheck split assing
Keep possibly error unmasked by assign
2018-03-23 17:25:00 +01:00
Zdenek Kabelac
397b7891ff tests: shellcheck liter 2018-03-23 17:25:00 +01:00
Zdenek Kabelac
410c992744 tests: shellcheck use grep -E
Replace egrep with grep -E
2018-03-23 17:25:00 +01:00
Zdenek Kabelac
14abe1e87b tests: shellcheck prevention check
Always make sure variable is set to something else the /dev/*
2018-03-23 17:25:00 +01:00
Zdenek Kabelac
fe69731d31 tests: handle setting better
When using 'make check...  LVM_TEST_AUX_TRACE=0'  make it behaving
like other supported VARS in use so it's like disabled.
2018-03-23 17:25:00 +01:00
Zdenek Kabelac
8c02cc9e8f tests: update no tool test
Correct testing with format 1 and mq policy.

Add testing of 'smq'

Fix testing with clvmd - where logged message is part of clvmd log
and we can only check command status.
2018-03-19 12:08:04 +01:00
Zdenek Kabelac
08487a3098 tests: use 4k extents
Use 4K chunks since some older kernels are not capable
to create striped volumes with smaller size.

TODO: lvm2 should detect this ahead and avoid kernel
reporting "Invalid chunk".
2018-03-18 00:30:43 +01:00
Zdenek Kabelac
e5b40e0488 tests: check activation of cache without cache_check 2018-03-17 23:33:58 +01:00
Zdenek Kabelac
9e7b00a3b9 tests: test striped COW LV 2018-03-17 23:33:58 +01:00
Zdenek Kabelac
f6f8f0c7fd tests: skip test when not enough space
Make the test skipped instead of failing when there was not
enough space.
2018-03-15 11:01:04 +01:00