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

3253 Commits

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