| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Try to remove brd twice if there is some collision with udevd.
Instanciate only 1 ramdisk.
Use just 'eval' for '--nameprefixes' results.
|
|
|
|
|
|
|
| |
Enhance function to take list of device so set of devices
can be wiped with a single call:
aux wipefs_a "$dev1" "$dev2"
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Add info about space usage on devices after the test.
Add some more skipped dirs.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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...
|
|
|
|
|
|
|
|
|
| |
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...
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
To avoid logging unsupported WRITE_ZEROES with loop,
disable usage for this backend device.
|
|
|
|
| |
Hide unneeded dev nodes.
|
|
|
|
|
| |
Actually oseek comes only with rawhide's version,
just use the standard option name.
|
|
|
|
| |
Share function across tests.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Function that will use 'blkdiscard -z' and fallbacks
to 'dd' when such option is not available.
|
|
|
|
| |
Skip lvmdbus testing with too old python.
|
|
|
|
|
| |
To shorten down logging output of lvmdbus - use for now lvmdbus
with --debug option only when LVM_DEBUG_LVMDBUS=1 is set.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reduce shellcheck warnings about missing {} for possible array
dereference.
Make sure we are not loosing error code when assigning local vars
and explicitely ignore 'errors' from standalone lines when needed.
Add some missing quotes.
Use $() instead of ancient ``
Avoid writing some temporary data into /tmp - test need to store
files within its own 'testdir' - so it can be properly discarded.
|
|
|
|
| |
Use ${# for length instead.
|
|
|
|
| |
Use correct variable name for assign.
|
|
|
|
|
| |
Signed-off-by: lilinjie <lilinjie@uniontech.com>
(cherry picked from commit 81b1f5bc3bac0e2e9099b67162da7d1a4995c5f4)
|
|
|
|
|
|
|
|
|
|
|
| |
If we plan to use dm throttling for mirror targets - we actually
have to check whether kernel runs with CONFIG_HZ_1000 - if it does
not the whole idea of throttling is actually not working in the
testsuite as within a single 'tick' with HZ 100 way too much date
is being moved on any modern hardware - and since there is no plan
to change this in kernel - we simply avoid using throttling on such
kernel and test needs to work differently - either ignore results
or use much larger mirror sizes...
|
| |
|
|
|
|
|
| |
Avoid inserting 'vdo' binary into path - and use
alias and VDO_BINARY shell vars for emulation.
|
|
|
|
|
| |
Testing needs 'root' privileges.
Only 'make run-unit-test' can work without them.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce a replacement vdo manager wrapper for testing.
When using test suite on a system without vdo manager (which has got
deprecated) - we still need its functionality to prepare 'vdo volume'
for testing lvm_import_vdo.
Wrapper currently need 2 binaries from older 'vdo 6.2' package -
to be named:
oldvdoformat - format VDO metadata with older format
oldvdoprepareforlvm - shift vdo metadata by 1MiB
|
| |
|
| |
|
|
|
|
| |
Older g++ is not smart enough to figure this out, so add a bit more push.
|
|
|
|
| |
Mask false-positive leak report.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Ensure C++ initializes all struct members.
Also some deterministic buffer initialization.
|
|
|
|
|
| |
Since die is called from a shell script, there is no need
to report any recent lvm2 command debug traces.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch is to add VG testing on multi hosts. There have two scripts,
the script multi_hosts_vg_hosta.sh is used to create VGs on one host,
and the second script multi_hosts_vg_hostb.sh afterwards will acquire
global lock and VG lock, and remove VGs. The testing flow verifies the
locking operations between two hosts with lvmlockd and the backend
locking manager.
On the host A:
make check_lvmlockd_idm \
LVM_TEST_BACKING_DEVICE=/dev/sdj3,/dev/sdk3,/dev/sdl3 \
LVM_TEST_MULTI_HOST=1 T=multi_hosts_vg_hosta.sh
On the host B:
make check_lvmlockd_idm \
LVM_TEST_BACKING_DEVICE=/dev/sdj3,/dev/sdk3,/dev/sdl3 \
LVM_TEST_MULTI_HOST=1 T=multi_hosts_vg_hostb.sh
Signed-off-by: Leo Yan <leo.yan@linaro.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After the lvmlockd abnormally exits and relaunch the daemon, if LVM
commands continue to run, lvmlockd and the backend lock manager (e.g.
sanlock lock manager or IDM lock manager) should can continue to serve
the requests from LVM commands.
This patch adds a test to emulate lvmlockd failure, and verify the LVM
commands after lvmlockd recovers back. Below is an example for testing
the case:
# make check_lvmlockd_idm \
LVM_TEST_BACKING_DEVICE=/dev/sdo3,/dev/sdp3,/dev/sdp4 \
LVM_TEST_FAILURE=1 T=lvmlockd_failure.sh
Signed-off-by: Leo Yan <leo.yan@linaro.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the drive failure occurs, the IDM lock manager and lvmlockd should
handle this case properly. E.g. when the IDM lock manager detects the
lease renewal failure caused by I/O errors, it should invoke the kill
path which is predefined by lvmlockd, so that the kill path program
(like lvmlockctl) can send requests to lvmlockd to stop and drop lock
for the relevant VG/LVs.
To verify the failure handling flow, this patch introduces an idm
failure injection program, it can input the "percentage" for drive
failures so that can emulate different failure cases.
Signed-off-by: Leo Yan <leo.yan@linaro.org>
|
|
|
|
|
|
|
| |
Add checking for lvmlockd log, this can be used for the test cases which
are interested in the interaction with lvmlockd.
Signed-off-by: Leo Yan <leo.yan@linaro.org>
|
|
|
|
|
|
|
|
| |
For testing idm locking scheme, it's good to cleanup the idm context
before run the test cases. This can give a clean environment for the
testing.
Signed-off-by: Leo Yan <leo.yan@linaro.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In current implementation, the option "LVM_TEST_BACKING_DEVICE" only
supports to specify one backing device; this patch is to extend the
option to support multiple backing devices by using comma as separator,
e.g. below command specifies two backing devices:
make check_lvmlockd_idm LVM_TEST_BACKING_DEVICE=/dev/sdj3,/dev/sdk3
This can allow the testing works on multiple drives and verify the
locking scheme if can work as expected for multiple drives case. For
example, for Seagate IDM locking scheme, if a VG uses two PVs, every PV
is resident on a drive, thus the locking operations will be sent to two
drives respectively; so the extension for "LVM_TEST_BACKING_DEVICE" can
help to verify different drive configurations for locking.
Signed-off-by: Leo Yan <leo.yan@linaro.org>
|
|
|
|
|
|
|
|
|
| |
This patch is to introduce testing option LVM_TEST_LOCK_TYPE_IDM, with
specifying this option, the Seagate IDM lock manager will be launched as
backend for testing. Also add the prepare and remove shell scripts for
IDM.
Signed-off-by: Leo Yan <leo.yan@linaro.org>
|
|
|
|
| |
Ehance some shellcheck reported issues.
|
|
|
|
|
|
|
|
|
|
|
| |
Switch to plain 'kill' we should no longer need SIGKILL
as polling can be interrupted.
Resolve problem in aux wait_pvmove_lv_ready() that was using
lvm command to check for UUID - but this was interferring with
VG lock and it's been delaying confirmation.
So reducing slow-down of test - so it can run faster.
|
|
|
|
|
| |
Add function to remove DM devices and dies
if some device can't be removed.
|
|
|
|
|
| |
Actually make sure which 'test' binary is executed.
Since we used to have 'test' binary in tests.
|
|
|
|
| |
Wrapper for slowed version of mdadm --assemble
|
|
|
|
|
|
| |
Make check_lvmpolld_init_rq_count() more compatible with older gawk,
where some functionality was not working properly.
Also change 'not not' condition.
|
|
|
|
|
|
|
| |
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.
|