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

3393 Commits

Author SHA1 Message Date
Zdenek Kabelac
8f61a127b5 tests: fix reader for runner
Since we now push more data into journal, parser reading this file
for --continue mode need to be adapted.
Also properly align batch mode with '.' for max test length name.
2023-10-03 21:32:12 +02:00
Zdenek Kabelac
0e8c631f5e tests: old g++ needs explicit cast 2023-10-03 12:59:38 +02:00
Zdenek Kabelac
c818f3dabc tests: give some more time to die
VMs are not top performers here...
2023-10-03 12:46:32 +02:00
Zdenek Kabelac
48fd6d6d40 tests: restore old fsync method
New code isn't portable across wider range of c++ compilers.
2023-10-03 12:46:32 +02:00
Zdenek Kabelac
6f52091668 tests: give dmeventd some time to restart
We need to wait for a new dmeventd as fork new daemon from bash.
2023-10-03 02:01:29 +02:00
Zdenek Kabelac
d01e9de8b8 tests: add RT_LIBS for older g++ 2023-10-03 02:01:29 +02:00
Zdenek Kabelac
13bf42b8b8 tests: restore fsync for runner
Restore fsync() call For more accurate tracking by buildbot.
Try different rather tricky way of static_cast to use
already opened FD instead of seperate open(),fsync(),close().

It's pretty strange there is no way to enforce fsync() for
C++ iostreams.  Flush() is actully not equal.
2023-10-03 01:58:23 +02:00
Zdenek Kabelac
36bccbc4f3 tests: skip some tests on valgrind run
Skip some tests that takes too much time with valgrind pass.
2023-10-03 00:02:46 +02:00
Zdenek Kabelac
3c70c243c5 tests: aux use dmsetup concise
A bit faster creation of multiple devices with dmsetup --concise.
Also solves the 'cookies' handling.
2023-10-03 00:02:02 +02:00
Zdenek Kabelac
19df4510c2 tests: faster creation of 200 PVs
Use already existing optmized aux version
2023-10-03 00:01:34 +02:00
Zdenek Kabelac
80899f7010 tests: runner compatible with older g++
Avoid using some constructs available with newer C++ only.
Moving timing into to journal instead of list file.
2023-10-03 00:00:01 +02:00
Zdenek Kabelac
ffaff7afa6 tests: better handling of system dir
Use more consistenly location of etc dir in tests.
Read value of etc dir via lvm cmd.
2023-10-02 14:25:52 +02:00
Zdenek Kabelac
e3cee67d77 tests: reiserfs needs fsadm
With plain -r we currenly issue an error message.
2023-10-02 14:25:52 +02:00
Zdenek Kabelac
368ab3051f tests: reduce slowing down of device
Too high value currently may result in occasional race problem with
device deactivation.
2023-10-02 14:25:52 +02:00
Zdenek Kabelac
529fe9ef75 tests: aux reuse already pgrep of dmeventd
Test already checks if there is any dmeventd running in the system
in the inittest.
2023-10-02 14:25:52 +02:00
Zdenek Kabelac
e3dd3424fc tests: enhance runner
Add Timespec class to increase time resolution to miliseconds
(can switch to microseconds if ever needed).
Use more const and const_interators and pass by reference.
Output rusage also to list result file.
Reduce inlining of C++ constructors.
2023-10-02 14:24:04 +02:00
David Teigland
88aa285a79 devices: refresh device ids if the system changes
If the system changes, locate PVs that appear on different devices,
and update the device IDs in the devices file.  A system change is
detected by saving the DMI product_uuid or hostname in the devices
file, and comparing it to the current system value.  If a root PV
is restored or copied to a new system with different devices, then
the product_uuid or hostname should change, and trigger lvm to
locate PVIDs from system.devices on new devices.
2023-09-27 15:22:11 -05:00
Zdenek Kabelac
cb8486a9b2 tests: check exit_on works 2023-09-26 01:24:38 +02:00
Zdenek Kabelac
984c024ef2 typos: misc 2023-09-19 14:54:51 +02:00
Zdenek Kabelac
c7c51329f4 tests: check pvmove with raid legs
Check pvmove correctly handles raid legs on input
(testing previous pvmove fix).
2023-09-19 14:54:51 +02:00
Zdenek Kabelac
970e4d295e tests: add fsck after split 2023-09-14 10:08:26 +02:00
Zdenek Kabelac
9d7061f1a3 tests: skip test when lvmdbusd runs on the system
lvmdbusd changes $RUNDIR results.
2023-09-14 01:45:34 +02:00
Zdenek Kabelac
f9d17f1f6d tests: update for work in fake dev environment
No write outside of $LVM_TEST_DIR  (removed /test access).
Use 'aux prepare_scsi_debug_dev' for automated scsi_debug handling
Properly use "" around shell vars.
Smarter read of PVS values.
Relax requirement to only work with real /dev dir.
2023-09-14 01:45:34 +02:00
Zdenek Kabelac
fac2e07333 tests: enforce full fs check 2023-09-14 01:45:34 +02:00
Zdenek Kabelac
fba81cf3e9 tests: pvmove large disk area
With some faster test hw machine we need to make this test
a bit more resource consuming.
2023-09-14 01:45:34 +02:00
Zdenek Kabelac
738c4b84fb tests: missing to check for writecache support
Ono more case requires writecache presence.
2023-09-14 01:45:34 +02:00
Zdenek Kabelac
de4cb219fb tests: aux using singl lvmconf call
lvmconf can handle multiple options in a single pass.
2023-09-14 01:45:34 +02:00
Zdenek Kabelac
4276c703c5 tests: aux try with extra sleep
Since udev_wait is not really adding any major delay to wait
for any udev worker processing - add extra sleep .1.
2023-09-14 01:45:34 +02:00
Zdenek Kabelac
1885655e9a test: improve aux teardown
Handle the case of device teardown where the first pass
could have only a single, but opened device, for removal.
In such case we want to at least once go through
the udev_wait and retry removal again.

TODO: maybe a sleep .1  might be usable as well with udev_wait
2023-09-13 13:38:15 +02:00
Zdenek Kabelac
5a44135233 tests: disable logging for lvmdbusd
Since lvmdbusd testing tends to do its own logging,
try for now to disable very generic logging mechnanism
of the test suite and see the result.

Some lvmdbusd test seems to rely on some log/file logic
which is modified with the use of these shell vars.
2023-09-04 18:52:02 +02:00
Zdenek Kabelac
2b8b51291f tests: check for writecache
Writecache needs writecache kernel target to be present.
2023-09-04 18:52:02 +02:00
Zdenek Kabelac
cc8178e911 tests: check for binaries
vdo wrapper tool uses some 'locally installed' binaries
for vdoformat and vdoprepareforlvm
Chech for their presence.

Skip this test with lvmlockd.
2023-09-04 17:48:41 +02:00
Zdenek Kabelac
86cf593e87 tests: vdo scsi convert
Somewhat tricky test to check VDO import of a SCSI device.
2023-09-03 22:44:08 +02:00
Zdenek Kabelac
b85f9c183c tests: vdo convert
Require VDO version 6.2.3.

Skip the part of the test that needs vdo wrapper and 2 different
versions of vdoprepareforlvm to prepare shifted VDO header
at the 2MiB offset.
2023-09-03 22:33:11 +02:00
Zdenek Kabelac
39f312108d tests: check passing PV list 2023-09-03 22:33:11 +02:00
Zdenek Kabelac
06464f7cfc tests: vdo wrapper support symlinks
Enhance internal VDO replacement wrapper script to handle symlinks
for i.e. SCSI device like VDO manager.
2023-09-03 22:33:11 +02:00
Zdenek Kabelac
9087ace2af aux: teardown also devices with testing UUID
Hunt also for devices with LVMTEST prefix in UUID.

Call teardown_devs_prefixed - so if they hold RAM or SCSI
they are closed before trying to remove kernel modules.
2023-09-03 22:15:48 +02:00
Peter Rajnoha
1f02c5f2e4
tests: add shell/report-headings.sh 2023-08-28 15:44:58 +02:00
Zdenek Kabelac
941c4a20d6 tests: better slowdown 2023-08-23 13:47:39 +02:00
Zdenek Kabelac
5803d9b689 tests: skip some tests with valgrind
Valgrind tends to be too slow for any kind of slowing down,
thus skip some tests that are time sensitive.
2023-08-17 22:52:08 +02:00
Zdenek Kabelac
5a96ca4a7f tests: update pool uuid handling
Pools now preserve meta LV UUID with swapmetadata operation
to make the usage of lvmlockd easier.

Update test to reflect this change.
2023-08-16 15:14:29 +02:00
David Teigland
847f1dd99c device_id: rewrite validation of devname entries
The old approach was too complicated and didn't work correctly
in some cases.
2023-08-04 11:45:40 -05:00
David Teigland
7cc414135a lvmdevices: add --delnotfound to delete entries for missing devices
Used with update: lvmdevices --update --delnotfound.
Removes all devices file entries for which no matching device is found.
2023-07-24 14:56:32 -05:00
Zdenek Kabelac
b2431d105e tests: catch all output
Previous fix was invalid (after some in-place shuffling)
'dd' copied goes to 'stderr' so we need to catch all output.
Grep needs to check output of tee tool.
Ensure 'C' locales are in use with 'dd'.
2023-07-17 16:34:14 +02:00
Zdenek Kabelac
32b2e416cc tests: new logic for repair
meta name deduced from cachepool name.
2023-07-17 14:30:39 +02:00
Zdenek Kabelac
39cc12e7c2 tests: use zero device
Change the test to use 'zero' backend, so we could use larger size
and get 'larger' buffer of dirty blocks for fast CPUs...
2023-07-17 13:42:58 +02:00
Zdenek Kabelac
06e39625ee tests: check for loaded brd
Skip the test if the brd is already loaded in the system.
2023-07-17 13:21:59 +02:00
Zdenek Kabelac
284fdb1745 tests: mark test as warning
Until more universal solution for thin-pool corruption gets in place.
2023-07-17 12:44:48 +02:00
Zdenek Kabelac
f6104adcb6 tests: updates
Pass more args with some 'aux' commands:
wipefs_a, enable_dev, disable_dev
(so it's a bit more efficient using single udev_wait call).
Use prepare_vg instead of prepare_pvs.
2023-07-15 11:05:35 +02:00
Zdenek Kabelac
55b498b6b5 tests: avoid using /test dir
Keep using test directory for created files.
Trap errors and remove brd in this case.
Use some shell builtins to reduce fork count.
Use "$VAR".
Run 'pvs' with devlist (so not acceing other system devices).
2023-07-15 11:05:35 +02:00
Zdenek Kabelac
9b23ff5d50 tests: add fsck before resize2fs 2023-07-15 11:05:35 +02:00
Zdenek Kabelac
ac25dd9be6 tests: faster check for flushing
Try minimizing delay in detecting 'cleaner' policy precence,
so we can fast interrupt running lvconvert.
2023-07-15 11:05:35 +02:00
Zdenek Kabelac
f71d3cce93 tests: ensure single leg is broken
Make sure only the first raid5 leg, that contains searched string
is being modified, so we do not 'damage'  2legs at once.
2023-07-15 11:05:35 +02:00
Zdenek Kabelac
914d793858 aux: fix version checking
New dmpd tools return version string in different format,
so update code to understand both variant.

Also hide some shell var setting to local functions.
2023-07-15 11:05:35 +02:00
Zdenek Kabelac
1c60c6785c tests: check --test
Check lvconvert --thin is not adding more LVs.
Enable testing with lvmlockd.

TODO: lvmlockd is missing support for --test.
2023-07-14 16:53:34 +02:00
Zdenek Kabelac
482501c21f tests: more checks with active thin lv
Check --usepolicy works primarily when thin-pool -tpool is there.
Also let the test run with lvmlockd.
2023-07-14 16:52:51 +02:00
Zdenek Kabelac
a997714648 tests: skip with lvmpolld
Not needed with lvmpolld pass.
2023-07-14 16:52:51 +02:00
Zdenek Kabelac
f24eb81dbe tests: improve LD_LIBRARY_PATH setting
Some linkers do need libdevmapper-event-lvm2.so.2.03,
so add also this symlink to the tests  /lib dir.
This fixes the need to use previous LD_LIBRARY_PATH complex
setting and now works with much shorter list.
2023-07-13 21:31:18 +02:00
Zdenek Kabelac
4ae2dde5c3 tests: update
Just drop debug log in case of error happenig later,
so we do not print uneeded info...
2023-07-13 21:31:18 +02:00
Zdenek Kabelac
2ecd290c0d tests: use conf=fdatasync
Since we write here in 1k blocksize - we can't use direct.
2023-07-13 21:31:18 +02:00
Zdenek Kabelac
ae512e20f5 tests: skip test if daemon is running
Skip the test, to avoid making all test failed when there is
'left' daemon running.
2023-07-13 21:31:18 +02:00
Zdenek Kabelac
33f022617a tests: some fixes for lvmlockd testing 2023-07-12 15:18:38 +02:00
Zdenek Kabelac
85fb46d8a6 tests: reduce paths added to LD_LIBRARY_PATH
Add only stricly needed paths to compiled .so objects.
2023-07-12 15:18:38 +02:00
Zdenek Kabelac
80bad4a3b4 tests: check for writecache presence
Test is using writecache.
2023-07-12 15:18:38 +02:00
Zdenek Kabelac
a51c68aacb tests: makefile build proper tools list
Add compiled components to the list.
2023-07-12 15:18:38 +02:00
Zdenek Kabelac
00b5d7b037 lv: followup seg_monitor reporting
With 3596558861 it's been introduced
a more fine grained description.
However 'disabled' might be actually more confusing then empty field,
so keep only the info about 'not enabled'aka dmevend is not allowed
to monitor LV which otherwise could be monitored.
2023-07-10 17:13:33 +02:00
Zdenek Kabelac
9abcf5cb48 tests: use aux functionality
Use aux wait_recalc and wait_for_sync  for faster processing.
2023-07-10 17:13:33 +02:00
Zdenek Kabelac
935813457f tests: update thin 2023-07-10 17:13:33 +02:00
Zdenek Kabelac
96123b9059 cleanup: use spelling synchronize
Use single spelling form for synchronize.
2023-07-10 17:13:32 +02:00
Zdenek Kabelac
98a34e43ab tests: caching of single thin volume 2023-07-10 17:13:32 +02:00
Zdenek Kabelac
721bee1b70 tests: cache with error and zero 2023-07-10 17:13:32 +02:00
Zdenek Kabelac
975368ba18 tests: skip on kernels 2023-07-10 17:13:32 +02:00
Zdenek Kabelac
fa434a1837 tests: simplify 2023-06-25 13:02:36 +02:00
Zdenek Kabelac
b8db2c0a4a tests: require raid target 2023-06-25 13:02:36 +02:00
Zdenek Kabelac
04860b6324 tests: correct checked devices
Fix the testing logic.
With raid5 device the layout of files on a filesystem does not define
which leg will actually contain the block we try to damage.
So test will now figure out which device has damaged block.

Use 'check' functionality and also drop unneeded random write as we
now can identify easily in other way.
2023-06-25 13:02:36 +02:00
Zdenek Kabelac
5848f75278 tests: correct generated metadata
Newer thin_check actually rejects such restored data.
2023-06-25 12:00:57 +02:00
Zdenek Kabelac
a1d5fba666 aux: add configuration for thin_restore and check_restore 2023-06-23 18:06:22 +02:00
Zdenek Kabelac
aed91e49ae tests: improve test for machine_id 2023-06-23 18:06:22 +02:00
Zdenek Kabelac
39d6a9601f tests: ensure test defines its own etc dir
Compilation may configure it's own /etc path so ensure the test
has a defined location for access to this dir during testing.

Also prepare machine_id filei (with the use of uuidgen tool)
for the test.
2023-06-23 18:06:22 +02:00
Zdenek Kabelac
2cb43449ee tests: fix path to dev dir
Correct some explicit references to /dev and use $DM_DEV_DIR.
2023-06-23 18:06:22 +02:00
Zdenek Kabelac
8d09124c62 tests: update test for automatic virtual size correction
lvm_import_vdo will adjust the virtual size within conversion
so the volume can be use without any futher tweaking.
2023-06-23 18:06:22 +02:00
David Teigland
ea6b5b694b lvcreate: allow thin snapshot syntax that broke
The command "lvcreate --type thin --snapshot ..." to create a thin
snapshot would fail.

commit d651b340e6 removed the optional
"--type thin" from the command definition "lvcreate --snapshot LV_thin",
and added --type thin as AUTOTYPE.  This was correct and should not have
changed anything if all the command defs were correct, but it broke
the "lvcreate --type thin --snapshot" case.  It reveals a problem in a
different command definintion:  "lvcreate --type thin LV_thin" that was
missing --snapshot in its OO list.
2023-06-20 15:47:01 -05:00
David Teigland
1dbb86f8c7 tests: lvresize fs mounted multiple times 2023-06-20 13:13:06 -05:00
David Teigland
228a8e8c1f device_id: ignore leading and trailing spaces for sys_wwid and sys_serial
Leading and trailing underscores are also ignored to handle device ids
written by previous versions which replaced all spaces with underscores.
2023-06-15 15:17:14 -05:00
Marian Csontos
f0b48a23d9 tests: Skip integrity tests if target not present 2023-06-14 13:48:51 +02:00
Marian Csontos
4cf005d395 tests: tmp is used for TMPDIR
Fixes tests failing due to previous commit 734d9791f8.
2023-06-14 13:23:41 +02:00
Zdenek Kabelac
9105890d43 tests: updates
Add some more complicated conversion tests.
2023-06-09 18:01:16 +02:00
Zdenek Kabelac
7f661a24c4 tests: vdo manager wrapper tool updates
Support size specification in KiB units.
Add some theoretical support for some new options from vdoprepareforlvm.
2023-06-09 18:01:16 +02:00
Zdenek Kabelac
734d9791f8 tests: tmp dir inside test dir
Keep even temporary files within testing dir so generated files are
not left behind in system's /tmp directory.
2023-06-09 18:01:16 +02:00
David Teigland
74feebdab7 device_id: fix handling of non-PV with duplicate serial number
Fix in the code that matches devices to system.devices entries when
the devices have the same serial number.  A non-PV device in
system.devices has no pvid value, and the code was segfaulting
when checking the null pvid value.
2023-06-08 12:24:05 -05:00
David Teigland
4cdb178968 device_id: ignore trailing underscores in t10 wwid from devices file
In previous lvm versions, trailing spaces at the end of a t10 wwid would
be replaced with underscores, so the IDNAME string in system.devices
would look something like "t10.123_".  Current versions of lvm ignore
trailing spaces in a t10 wwid, so the IDNAME string used would be
"t10.123".  The different values would cause lvm to not recognize a
device in system.devices with the trailing _.  Fix this by ignoring
trailing underscores in the IDNAME string from system.devices.
2023-05-19 14:05:10 -05:00
David Teigland
24e4b6df11 tests: integrity-caching: ensure raid redundancy
The recent fix 05c2b10c5d ensures that raid LV images are not
using the same devices.  This was happening in the lvextend commands
used by this test, so fix the test to use more devices to ensue
redundancy.
2023-05-17 14:15:25 -05:00
David Teigland
3a75704756 tests: integrity: snapshots now work on raid+integrity 2023-05-17 11:10:45 -05:00
David Teigland
fd6e113bba raidintegrity: allow snapshots 2023-05-11 11:02:52 -05:00
Zdenek Kabelac
bf794b66f4 tests: more updates for 300M xfs
Fix some sizing for larger xfs testing.
Also fix resize of reiserfs which requires resize_fsadm.
2023-05-10 16:19:46 +02:00
Zdenek Kabelac
bc28082b99 tests: skip this testing without newer blkid
Testing xfs --fs functionality needs new blkid.
2023-05-10 16:19:46 +02:00
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
Tony Asleson
3e616230f2 lvmdbustest: Add more info on asserts 2023-03-02 11:44:16 -06:00
Tony Asleson
95afd315b1 lvmdbustest: Don't hard code to /tmp
During lvm testing they use an alternative tmp directory.
2023-03-01 15:59:18 -06:00
Tony Asleson
50e6efafb9 lvmdbustest: Add more output for test_log_file_option 2023-03-01 15:52:23 -06:00
Tony Asleson
80f6655956 lvmdbustest.py: Increase udev timeout 2023-03-01 15:26:37 -06:00