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

3197 Commits

Author SHA1 Message Date
Zdenek Kabelac
0cc5c2203b tests: needs to be exported for tracing 2023-05-06 22:43:22 +02:00
Zdenek Kabelac
7267322fc1 tests: adapt for xfs 300M min size
Some test still were missed to be converted for XFS 300M min size.
2023-05-06 22:43:22 +02:00
Zdenek Kabelac
4af8063c96 tests: different check for mounted volume
It appears newer mount allows repeated mounting ??
Anyway - do the check with grep.
2023-05-06 22:43:22 +02:00
Zdenek Kabelac
2fde4b6baa tests: check for lvmdbusd running in the system
Check for running (possibly leftover) lvmdbusd running in the
system - as this daemon may interfere with this test as in this
case both be operating on same  'live' data in /run/lvm.
2023-05-06 22:43:22 +02:00
Zdenek Kabelac
aa19f2aa3d tests: update lvextend tests
Make test faster by agregating sets of operation to work on a single
created filesystem yet checking all the variants of extension and reduction.

Split 'xfs' part into separate test and convert it for use of the
minimal size 300M nowdays required by mkfs.xfs.
2023-05-06 22:43:22 +02:00
Zdenek Kabelac
6e8ede833b aux: retry brd removal
Try to remove brd twice if there is some collision with udevd.
Instanciate only 1 ramdisk.
Use just 'eval' for '--nameprefixes' results.
2023-05-06 22:41:23 +02:00
Zdenek Kabelac
87eae82195 aux: wipefs_a takes list of devices
Enhance function to take list of device so set of devices
can be wiped with a single call:

aux wipefs_a  "$dev1" "$dev2"
2023-05-06 22:40:23 +02:00
Zdenek Kabelac
ffead4f333 tests: adapt waiting for pvmove start
Previous commit cause the pvmove could actually be started in unexpected
order - so make sure, we are not starting new pvmove in same VG until
the previous one is started.
2023-04-25 19:51:52 +02:00
Zdenek Kabelac
7f2939d328 tests: utils now print also df_h
Add info about space usage on devices after the test.

Add some more skipped dirs.
2023-04-25 19:02:39 +02:00
Zdenek Kabelac
7b88c9f619 tests: some aux corrections
Keep backups within test_dir instead of dev_dir (so it doesn't
leak large files there if the tests are run over real /dev dir).

Move restoring of dm_mirror throttling before test_dir is removed.
2023-04-25 18:59:04 +02:00
Zdenek Kabelac
4a003ba671 tests: fix pattern for raid4
Since the strip in raid4 might be XOR - we might eventually end
with 2 blocks of 'B' on 2 disks - so will rest of stripe with 'b'.
2023-04-25 00:12:31 +02:00
Zdenek Kabelac
7c8901dabd tests: use 300M lv size for xfs 2023-04-25 00:12:31 +02:00
Zdenek Kabelac
e42b56c31b tests: try to retry remove of scsi_debug
Not quite sure if this helps anything, some of testing
machines can't reliably remove scsi_debug, reporting
they are in use - but it's not easily reproducible...
2023-04-25 00:12:31 +02:00
Zdenek Kabelac
b8aea8ae7d tests: handle multiple devs with wait_pvmove_lv_ready
aux wait_pvmove_lv_ready() now handles multiple pvmove LVs
at one go - which allows a bit fast checking - although
at some point we may need to switch to use delayed devs
since mirror throttling seems to be no longer working well,
as CPU are getting so fast, that most of data are already
pvmoved before throttling has any chance to do something...
2023-04-25 00:12:31 +02:00
Zdenek Kabelac
8476a09ee5 tests: skip some unneeded test
Skip irelevant tests for polld & lockd pass.
2023-04-25 00:12:31 +02:00
Zdenek Kabelac
a51b6d5e42 aux: use unused brd device for testing
When 'brd' device can be removed (is unused AKA not opened),
remove such device and use again for testing.

Let's assume user has no unused brd device left in the system.

When the 'tests' sometimes fail to cleanup devices, with this
change futher cleanup from some next test may evenually release
brd device and make it available for testing.
2023-04-25 00:12:31 +02:00
Zdenek Kabelac
5e4c0701d9 aux: more efficient lvmlock shutdown 2023-04-25 00:12:31 +02:00
Zdenek Kabelac
ce8835d4c4 tests: enforce 4K block for integrity fs
With raid tests it's important we don't get spread of 4K file
across 1K block on a multiple disk stripe - so use 4K block size
for ext4 fs.
2023-04-23 00:03:43 +02:00
Zdenek Kabelac
7cf5feb7d2 aux: loop doesn't support zeroing discard
To avoid logging unsupported WRITE_ZEROES with loop,
disable usage for this backend device.
2023-04-23 00:02:33 +02:00
Zdenek Kabelac
bbc67abeed tests: hide some more file in error trace
Hide unneeded dev nodes.
2023-04-22 11:25:39 +02:00
Zdenek Kabelac
f239ce2353 makefiles: forgotten to install some test config
rpm testing missed config files.
2023-04-22 11:25:39 +02:00
Zdenek Kabelac
1f4e3832e0 test: use aux wait_recalc
Use aux function.
2023-04-22 11:25:39 +02:00
Zdenek Kabelac
2043bb0e38 test: convert to use ext4
Modify test to check same properties with less demanding ext4.
2023-04-22 11:25:39 +02:00
Zdenek Kabelac
b0f26a135b aux: don't use to new dd options
Actually  oseek comes only with rawhide's version,
just use the standard option name.
2023-04-21 22:01:40 +02:00
Zdenek Kabelac
8bcf46a0ac tests: add data sync 2023-04-21 14:52:43 +02:00
Zdenek Kabelac
80ebec099d aux: add wait_recalc
Share function across tests.
2023-04-21 14:52:43 +02:00
Zdenek Kabelac
4e0aab7428 tests: convert to use ext4
Convert test to use only ext4 instead of 300M demanding XFS.
Shorten  'B' files to 4K and use 4K strip size with >raid1 arrays
so we do not risk spreading of the file across stripe.

Also use easier 'aux corrupt_dev()' method to introduce a bit
corruption into a block device with integrity.

TODO: shorten _wait_recalc (should't be needed).
2023-04-21 14:52:43 +02:00
Zdenek Kabelac
b2360437e0 tests: use aux clear_dev
Use wrapper over 'blkdiscard -z'
2023-04-21 14:52:43 +02:00
Zdenek Kabelac
c331a3b1da aux: add corrupt_dev
Add function to corrupt some bytes in give file path presenting
a device.  1st. patern in just once replaced with 2nd. pattern.

Usable to simulate some bit corruption for integrity devices.
2023-04-21 14:52:43 +02:00
Zdenek Kabelac
11562bcc6b aux: add clear_dev
Function that will use 'blkdiscard -z' and fallbacks
to 'dd' when such option is not available.
2023-04-21 14:52:43 +02:00
Vojtech Trefny
7807672975 lvmdbusd: Add a flag to activate LVs in shared mode to Lv.Activate 2023-04-20 12:09:11 -05:00
David Teigland
317071ec53 cache: fix snapshot of cache with cachevol
Creating a snapshot of a cache LV with a cachevol would fail
because cache_check was not being skipped.
2023-04-10 12:44:22 -05:00
Zdenek Kabelac
e59e7aa0ab tests: use less demanding ext4 2023-04-06 13:41:30 +02:00
Zdenek Kabelac
7b5291a8ed tests: lower demand for disk resources
Convert test to use a single skeleton and only different pieces
keep in separate tests.

Lower raid disk usage to smaller size and switch to ext4
as way less demanding fileystem.
2023-04-06 13:34:26 +02:00
David Teigland
390ff5be2f raidintegrity: allow writecache and cache
Allow writecache|cache over raid+integrity LV.
2023-04-05 14:24:07 -05:00
David Teigland
ebbc3f7ab3 tests: integrity fixes
wait_recalc was mistakenly being called on raid without integrity
wait_recalc loop was exiting without error
2023-04-05 14:24:07 -05:00
David Teigland
49dbeb9b45 tests: nomda-restoremissing
This test was broken by commit 69ea2e3f9
"vg_read: keep MISSING_PV when device with no mda reappears"
Change the test to match the new behavior.
2023-03-20 12:42:50 -05:00
Tony Asleson
0c73d3545b lvmdbustest: Correct env. logic
Signed-off-by: Tony Asleson <tasleson@redhat.com>
2023-03-14 09:36:38 -05:00
Tony Asleson
baf99ff974 lvmdbustest: Add notes on error injection testing
Not doing this by default for automated build testing as it generates a
lot of output and slows things down by another ~10%.
2023-03-10 12:51:53 -06:00
Tony Asleson
1c550d7124 lvmdbustest: Add env. variable to skip signal testing
This is currently need if we are collecting code coverage data as we don't
handle this unit test correctly.
2023-03-10 12:51:53 -06:00
Tony Asleson
f8876290bf lvmdbustest: Check for needed env. variables 2023-03-10 12:51:53 -06:00
Tony Asleson
568e8c71d7 lvmdbustest: Don't use hard coded /tmp for error inject log 2023-03-10 12:51:53 -06:00
Tony Asleson
9c3b91a513 lvmdbustest: Shutdown cleanly with "exit"
Make the error injection wrapper handle the exit case, so that we can
clean up gracefully when instructed to do so.
2023-03-10 12:51:53 -06:00
Tony Asleson
9714f3ec4f lvmdbustest: Only inject 1 missing key error
Previously we were injecting a missing key in the lv, vg, and pv.
Given the order of processing in lvmdbusd, this prevented us from
exercising all the error paths.  Change to returning just 1 instead.
2023-03-10 12:51:53 -06:00
Tony Asleson
2359023009 lvmdbustest: Correctly set up env. for error injection 2023-03-10 12:51:53 -06:00
Tony Asleson
70a5ebc052 lvmdbustest: open log file with "a"
So we retain the log across fork & exec and lvm shell testing.
2023-03-10 12:51:53 -06:00
David Teigland
e79c6feb08 tests: update missing-pv
add more checks and expand comments explaining behavior
2023-03-08 16:31:28 -06:00
David Teigland
937f1d3209 tests: vg-raid-takeover
Different sequences of steps that could be used to handle raid LVs
after VG takeover (what would happen in cluster failover) combined
with the loss of a disk.
2023-03-08 16:31:28 -06:00
David Teigland
aa85ed1784 vgchange: allow changing system ID with majority of PVs
when used with --majoritypvs.  This allows the fail-over
of a VG between systems by changing the VG system ID when
a PV is missing.
2023-03-08 16:30:54 -06:00
Tony Asleson
8e27dfd405 lvmdbustest: Test duplicate VG rename 2023-03-03 11:17:30 -06:00