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

3245 Commits

Author SHA1 Message Date
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