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

2927 Commits

Author SHA1 Message Date
Zdenek Kabelac
1a17a5ab80 tests: sleep tunning
Check different sleep properties for lvmpolld.
Use aux remove_dm_devs.
2021-03-28 14:22:11 +02:00
Zdenek Kabelac
d9b9751032 tests: add aux remove_dm_devs
Add function to remove DM devices and dies
if some device can't be removed.
2021-03-28 14:22:11 +02:00
Zdenek Kabelac
0ddbc4c5cd tests: bash quotes 2021-03-28 11:39:58 +02:00
Zdenek Kabelac
8a550fa3e8 tests: test_pv_symlinks works only with /dev dir
Skip test with LVM_TEST_DEVDIR != /dev
2021-03-28 00:21:38 +01:00
Zdenek Kabelac
afbaab20c7 tests: fix unfinished check for 4.18 kernel 2021-03-28 00:21:38 +01:00
Zdenek Kabelac
f584f0cd9e tests: ensure raid is synchronized 2021-03-27 23:19:08 +01:00
Zdenek Kabelac
5ec7992e29 tests: reoder killing order
We need to stop pvmove while still in progress,
so restart lvmpolld after pvmoving devices are gone
2021-03-27 23:19:08 +01:00
Zdenek Kabelac
feb7fef6c8 tests: fight with losetup creation error
Try losetup few times in loop if we can succeed.
2021-03-27 23:19:08 +01:00
Zdenek Kabelac
1f7bd719d0 tests: restore removed prefix
During debugging this prefix was unintentionally lost, restore.
2021-03-27 23:19:08 +01:00
Zdenek Kabelac
12222add1a tests: use known path for test in find
Actually make sure which 'test' binary is executed.
Since we used to have 'test' binary in tests.
2021-03-27 23:18:38 +01:00
Zdenek Kabelac
37d603268f tests: for 4.18 use already 1.20 logic
Looks like there was some missed versioning increase during devel.
So with kernel >= 4.18 version 1.19 is enough to look like 1.20

However backported 1.19 targets seems to not provide all
the capabilities.
2021-03-27 23:16:52 +01:00
Zdenek Kabelac
f07a793813 tests: correct thin-pool version
Use thin-pool target version 1.20 for changed behavior.
2021-03-27 00:34:00 +01:00
Zdenek Kabelac
53338cf566 tests: increase mirror throttling 2021-03-27 00:29:28 +01:00
Zdenek Kabelac
8e9bc52b15 tests: more skipped tests for lvmpolld 2021-03-26 22:13:37 +01:00
Zdenek Kabelac
a55f4a8fe2 tests: use shell comment 2021-03-26 22:12:42 +01:00
Zdenek Kabelac
93336685f6 tests: update dbus test_nesting
Test has to use PV with suffix  pv[0..9]  otherwise
it's ignored by test suite filter.

Better fix for VG names to use prefix LVMTEST.

Skip the test for runs without LVM_TEST_DEVDIR != /dev
2021-03-26 20:39:41 +01:00
Zdenek Kabelac
1d6e1d08a8 tests: update for newer thin-pool
Newer thin-pool handle metadata read-only recovery better.
2021-03-26 20:39:41 +01:00
Zdenek Kabelac
51ac56a05e tests: use blkid without caching
Always use blkid without caching to avoid poluting
cache stored in /run/blkid or /etc on older distros
2021-03-26 20:39:41 +01:00
Zdenek Kabelac
02e02a5ccc tests: use aux mdadm_assemble wrapper 2021-03-26 20:39:41 +01:00
Zdenek Kabelac
4c59b2aa21 tests: add aux mdadm_assemble
Wrapper for slowed version of mdadm --assemble
2021-03-26 20:39:41 +01:00
Zdenek Kabelac
5ef8d84569 tests: better reporting of problematic services 2021-03-26 20:39:40 +01:00
Zdenek Kabelac
49575a6ce1 tests: skip more tests for lvmpolld pass
These test do not test polling, so skip them for lvmpolld pass.
2021-03-26 20:39:40 +01:00
Zdenek Kabelac
7768650d87 tests: add commented example
How to run individual test.
2021-03-26 13:16:44 +01:00
Zdenek Kabelac
25c665d555 tests: dbus update
Always use  PREFIX for vg header - all tests must use this prefix,
VGs without are not allowed.

Modify pv_symlink test - as the test was checking unsupportable
combination - since lvm2 commands withing testsuite are only
allowed to manipulate with /dev/mapper/LVMTESTXXXX path -
nothing else allowed and fails on being filtered.
2021-03-26 13:13:26 +01:00
Zdenek Kabelac
6db533c439 tests: try to observe some unusual problem
Lets see, why it's very occasionaly able to active LV.
2021-03-26 11:36:22 +01:00
Zdenek Kabelac
3ed79d8dfe tests: move setting of dmeventd pid
Added comment the  'lvs' already initiates dmeventd

Note: we don't have any query mechanism to check if dmeventd
is already running except access of socket which basically
starts dmeventd if it's not running.
2021-03-26 11:16:32 +01:00
Zdenek Kabelac
85fae836c0 tests: add basic validation of running services
For determinist test results lvm2/dm service shall not be present
and running in the system as it may randomize test results.

In case they are found present, this test ends with warning (not failure).
2021-03-26 11:13:56 +01:00
Zdenek Kabelac
9bcc76b63c tests: add should for racy test
Depending on kernel, the race may or may not happen.
2021-03-26 00:43:44 +01:00
Zdenek Kabelac
5feb99dda6 tests: add workaround for older mdadm
Some older instancies of 'mdadm' opened legs in RW and
closed and opened again and expected exlusive access.
But here udev rule can be fired - so on these versions
slow down whole mdadm runtime by using strace, to
give system a bit more time to finish udev rule.
2021-03-26 00:35:28 +01:00
Zdenek Kabelac
0558b223b8 tests: aux fix check_lvmpolld_init_rq_count
Make check_lvmpolld_init_rq_count() more compatible with older gawk,
where some functionality was not working properly.
Also change 'not not' condition.
2021-03-26 00:33:21 +01:00
Zdenek Kabelac
c1f5ca6751 tests: improve check raid_leg_status
Enhance function to wait until raid status gets consisten
(shifts from 0/xxxxx to something else)

If it would took too long fail the check.
2021-03-24 16:38:12 +01:00
Zdenek Kabelac
0783c661b9 tests: handle case of missing /dev/disk
In case there is no symlink - udev can optimize /dev/disk away,
thus find would fail in teardown.
2021-03-24 16:38:12 +01:00
Zdenek Kabelac
2151b71819 tests: check fsadm with missing filesystem 2021-03-24 16:38:12 +01:00
Zdenek Kabelac
9684e82cc4 tests: ignore incosistent raid status
Just like lvm command ignores  0/xxxx report from judging the status.
Avoid using infinite loop and limit report checking to 100 checks.
If it would need more - something is not right.
2021-03-24 12:40:17 +01:00
Zdenek Kabelac
afd43a75f2 tests: skip stray testing on real dev dir
Do not modify /dev dir maintained by udev.
2021-03-24 12:23:07 +01:00
Zdenek Kabelac
a126dde069 tests: remove more file in teardonw
Our tests may result in producation of huge set of
invalid links in /dev/disk directory depeding on version
of udev and various kinds of failures.

Also we happen to invoke some on-system pvscans generating
local /etc/lvm/archive & backups - remove them when
test is finished.
2021-03-24 12:23:07 +01:00
Zdenek Kabelac
18f2475fa1 tests: query info instead of table
No need to access table when we just check presence,
so generate smaller error message about missing device.
2021-03-24 12:22:27 +01:00
Zdenek Kabelac
8df0a32abb tests: this test has race in it depending on kernel
Some kernel seems to keep 'lvextend' busy so long,
that actual resize already happens.

So ATM use 'should'  until something better is invented.
2021-03-23 21:32:51 +01:00
Zdenek Kabelac
dd1f5f9a24 tests: aux clean DM on top of MD
Before cleaning MD, try to remove any DM on top such MD.
Check is made through DM table check.
Maybe parse /proc/mdstat for this???
2021-03-23 21:28:28 +01:00
Zdenek Kabelac
93f2d194ac tests: wipefs with udev_wait
Try to synchronize with colliding udev.
Also retry once if there is some failure with some
sleep between next retry.

Use oflag=direct for wipping without wipefs.
2021-03-23 14:57:10 +01:00
Zdenek Kabelac
14a3c34983 tests: increase required version
Seems like version 1.13.2 remains crashing kernel - so increase
the required version for this reshaping test.
2021-03-23 14:39:13 +01:00
Zdenek Kabelac
d0644fb2c3 tests: use prefix for VG name 2021-03-23 14:38:54 +01:00
Zdenek Kabelac
712f7dfb4c tests: ignore failure of zeroing
Older mdadm fails the command, when the signature is already gone.
2021-03-23 12:05:55 +01:00
Zdenek Kabelac
26d76d31c5 tests: use mirror throttling
Combination of throttling and slowed device is a bit faster.

Also add FIXME about the mutliple spawn polling processing
when activating invidual LV for a pvmove.
2021-03-23 11:34:34 +01:00
Zdenek Kabelac
a5fc6a0fe7 tests: set default basic flavour 2021-03-23 11:33:30 +01:00
Zdenek Kabelac
0b2a037c80 tests: try to move more date
Throttling was not helping with race - try to use more data.
2021-03-23 10:53:02 +01:00
Zdenek Kabelac
acac3cb524 tests: test needs to have playable locking dir 2021-03-23 09:48:47 +01:00
Zdenek Kabelac
b19e036918 tests: aux updates
Select unused md from /proc/mdstat
Check for wipefs once.
2021-03-23 09:48:03 +01:00
Zdenek Kabelac
370749a4b8 tests: enhance mdadm_create
For older mdadm its hard to support new names - to simplify things
keep using  /dev/mdXXX name which is automatically selected.
2021-03-23 01:16:21 +01:00
Zdenek Kabelac
7575c7ae5c tests: set known locking dir
Tests running in the system may use locking dir of the system.
2021-03-23 01:15:29 +01:00