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

1884 Commits

Author SHA1 Message Date
Zdenek Kabelac
2d48317d3a tests: umount when above 95
Add code to check if resulting data or metadata remained over 95%
and in such case invoke umount.
2017-01-21 22:53:57 +01:00
Zdenek Kabelac
e2fa90bf38 tests: properly quote heredoc
Prepend \$ for vars which should remain in script.
Also drop --lazy umount.
Move inittest call up, so mntdir and mntusedir have proper full path.
2017-01-21 19:28:06 +01:00
Zdenek Kabelac
1a2b88516b tests: implement umount in script
Since dmeventd no longer umounts thin devices, such logic
needs to be implemented by external script.
Add some very simple one for the start.
2017-01-21 17:42:19 +01:00
Zdenek Kabelac
47c11c7b1c tests: enusure units in TiB 2017-01-21 17:42:19 +01:00
Zdenek Kabelac
15e657f110 tests: ignore racy test failure
When test fails here, make it just warning instead of failing whole
test.
2017-01-06 23:39:53 +01:00
Zdenek Kabelac
d757b2431a tests: make test more race immune
Add more delay and increase raid size.
Speedup volume during wait for sync.
Drop --yes from lvcreate.
2017-01-06 23:39:53 +01:00
Zdenek Kabelac
0d2a9ebec6 vgchange: also -l is uint32 2017-01-06 21:51:36 +01:00
Zdenek Kabelac
b92a9c3e1a tests: slow down devs for raid more
Since we still experience occasiaonal test failure - slow
things down even more to avoid race.

Add support for 'quick' table changes between normal & delayed tables.
2017-01-05 15:54:14 +01:00
Zdenek Kabelac
c64f4447d9 tests: drop FIXME
Since we fixed core trouble with sequence of
suspend/resume/suspend without udev wait
we can drop 'should' and expect volume is still mounted.
2017-01-05 15:54:14 +01:00
Zdenek Kabelac
4fd41cf67f vgchange: max_pv limited to uint32
Solves: https://bugzilla.redhat.com/1280496

The only reasonable behaviour here is to error on
any number out of accepted range (i.e. now numbers
wrapping around with some hidden logic).

As this is plain bug there is no support for
backward compatibility since noone should
set numbers >UINT32_MAX and expect 0 or error
depending on how big number was used....

TODO: more fields might need to be converted.
2017-01-03 14:55:16 +01:00
Zdenek Kabelac
96a1943fb8 tests: update test
lvm2 now correctly reports thin_id  after action of merged thin,
but before physical metadata update as we know the merge has happened.
2016-12-23 13:16:35 +01:00
Heinz Mauelshagen
95d68f1d0e lvchange: allow a transiently failed RaidLV to be refreshed
Add to commits 87117c2b25 and 0b8bf73a63 to avoid refreshing two
times altogether, thus avoiding issues related to clustered, remotely
activated RaidLV.  Avoid need to repeat "lvchange --refresh RaidLV"
two times as a workaround to refresh a RaidLV.  Fix handles removal
of temporary *-missing-* devices created for any missing segments
in RAID SubLVs during activation.

Because the kernel dm-raid target isn't able to handle transiently
failing devices properly we need
"[dm-devel][PATCH] dm raid: fix transient device failure processing"
as well.

test: add lvchange-raid-transient-failures.sh
      and enhance lvconvert-raid.sh

Resolves: rhbz1025322
Related:  rhbz1265191
Related:  rhbz1399844
Related:  rhbz1404425
2016-12-23 03:41:32 +01:00
Zdenek Kabelac
62be9c8de4 tests: use hold_device_open 2016-12-22 23:37:07 +01:00
Zdenek Kabelac
e1943fc07f tests: add device holding function
Hold device open with sleep and wait till sleep really opens
given devices.
2016-12-22 23:37:07 +01:00
Zdenek Kabelac
1053d46aff tests: workaround failure on fc23 2016-12-22 23:37:07 +01:00
Tony Asleson
eacff5c189 lvmdbustest: Print messages if timeout value > 10%
We will dump some informational messages if the time to return when we
specify a timeout exceeds 10% of requested.
2016-12-20 11:06:57 -06:00
Zdenek Kabelac
f47da0ad23 tests: usage of cached volume for snapshot 2016-12-19 14:41:43 +01:00
Zdenek Kabelac
8d6ac1c3ba tests: using cached LV for external origin 2016-12-18 19:38:51 +01:00
Zdenek Kabelac
75ec7c8dee tests: update seg_size_pe
Default prepare_vg uses 512K - so update test accordingly
2016-12-12 11:51:50 +01:00
Zdenek Kabelac
3dd6e2c7e1 tests: use prepare_vg more often 2016-12-12 11:22:41 +01:00
Zdenek Kabelac
8c9c6ab660 tests: no left devices check for skipped test 2016-12-12 11:22:10 +01:00
Zdenek Kabelac
56e4e2ce2b tests: track leaked devices in tests
When test calls teardown, no devices created by test are expected
to be left in table. Trap such orphans and make the test fail.
2016-12-11 23:24:19 +01:00
Zdenek Kabelac
273ccb1170 tests: remove unwanted exit
Exit seemes slipped in from local testing in:
eb6b2a11e3
2016-12-11 23:24:19 +01:00
Zdenek Kabelac
b902fd08f6 tests: remove some leaking device
These tests leaks devices (known bugs).
Remove them via dmsetup.

TODO: fix actual commands
2016-12-11 23:24:19 +01:00
Zdenek Kabelac
bcf59a1b18 tests: test should clean devices it has created
To be able to detect lvm2 command is not leaking some
'unexpected' device - remove all devices before
test exits by its own command so test teardown
now can check what was 'left' unexpectedly.
2016-12-11 23:24:19 +01:00
Zdenek Kabelac
198f335139 tests: slower device
Some of test machines are too fast, slow raid syncing even more.
2016-12-11 23:24:19 +01:00
Bryn M. Reeves
b9f9ce52ec test: add results/ to .gitignore 2016-12-10 18:00:25 +00:00
Zdenek Kabelac
900d203586 tests: fix missing exclusive activation
For cluster conversion  LV for caching needs to be activated
exclusively.
2016-12-09 15:15:02 +01:00
Zdenek Kabelac
0ce9ae3cda tests: more snaps
Check lvs reports 'origin' not openned.
2016-12-05 17:12:42 +01:00
Zdenek Kabelac
3f6ade4b0d tests: apostrof 2016-12-05 17:12:42 +01:00
Zdenek Kabelac
022d3af068 tests: check we recognize broken table entry
One (initial) test to recognize we see a mismatching
table entry for cache LV.
2016-12-05 17:12:42 +01:00
Tony Asleson
ad7fd775f2 lvmdbustest.py: Rename env test variable
Use LVM_DBUSD_TEST_MODE env variable to customize what we test.
Default is the same where we try to test all combinations of all
modes.  Renamed to make it consistent with the other env variables
that are used in the unit test.
2016-11-30 15:59:06 -06:00
Tony Asleson
ea2eb2df97 lvmdbustest.py: Remove redundant import 2016-11-30 15:59:06 -06:00
Tony Asleson
b75d1a591c lvmdbustest.py: Remove outdated TODOs
- We check that all properties match the introspection data.  We
don't verify values for every property as only lvm knows what they
should be.

- We are testing vg.Move
2016-11-30 15:59:06 -06:00
Tony Asleson
bb845cab76 lvmdbustest.py: Re-enable test_vg_uuid_gen
This looks to be working now, not sure when it was resolved.
2016-11-30 15:59:06 -06:00
Zdenek Kabelac
b0bda09005 tests: ensure there is dbus config file
Copy lvmdbusd.profile to lib as installed place.
Use  TESTOLDPWD and avoid add new 'same' variable test_data_dir.
2016-11-26 00:22:38 +01:00
Tony Asleson
bd47b202fb lvmdbustest: Reduce dbus object churn
Instead of creating a new dbus object each time we get an interface object
we will use the same one.
2016-11-17 11:35:16 -06:00
Tony Asleson
bfedeb7481 lvmdbustest: Move std_err_print to testlib
So we can re-use it in the testlib too.
2016-11-17 11:35:16 -06:00
Tony Asleson
61f6be7d2b lvmdbustest.py: Reduce test client introspection calls
The default dbus python library mode of operation is to leverage
introspection.  However, this introspection data isn't accessible
for users of the library and they have to specifically retrieve
the introspection data too. This resulted in many introspection
calls being made.  This change eliminates introspection calls if
we are testing multiple concurrent test clients.  If it's a single
client we will leverage a reduced amount of introspection data to
verify the introspection data is correct.  Typically clients don't
leverage introspection data nearly as much as this test client.
2016-11-17 11:35:16 -06:00
Tony Asleson
cd28717f24 lvmdbustest.py: Support concurrent test runs
The env variable LVM_DBUSD_PV_DEVICE_LIST when present and filled in
with at least 4 physical devices will run concurrently with other
instances running as long as they specify different devices in their
env variable.

When the env variable is not present the test runs as it did before.
2016-11-17 11:35:16 -06:00
Tony Asleson
affe2cebf5 lvmdbus: Make bus name configurable
Add env LVM_DBUS_NAME to change what the bus name is.
2016-11-17 11:35:16 -06:00
Tony Asleson
560229178c lvmdbustest.py: Remove raid4 use
Looks like this isn't support across versions.  Need to add functionality
to service to return the supported segment types, so we only use the
supported ones.
2016-11-17 11:35:16 -06:00
Zdenek Kabelac
e7da8e7e1f tests: fix checking for pvmove LV
Use consitently egrep.

TODO: make probably aux func
2016-11-14 12:55:43 +01:00
Zdenek Kabelac
b38564b8dc tests: do not set zero interval in aux lvm.conf
0 interval leads as of now to a busy loop with lvmetad and command.

Avoid testing this patological case.

TODO: Code should possibly translate zero interval into some small
sleep. With lvmpolld it's already 1/10s
2016-11-11 16:58:20 +01:00
Zdenek Kabelac
de3d054f78 tests: avoid using polling 2016-11-11 16:58:20 +01:00
Zdenek Kabelac
4a2250f9ce tests: update make targets
Add  new targets:

make check_lvmpolld
make check_cluster_lvmpolld
make check_lvmetad_lvmpolld
make check_all_lvmpolld

So check_lvmetad runs only base lvmetad test - to much
logic of remaining targets.

Previous behavior is available via  check_all_lvmpolld.
2016-11-11 16:58:20 +01:00
Zdenek Kabelac
c1862ea84c tests: for repair we need neewer version
Older cache targets were not able to report write failures.
2016-11-08 16:01:35 +01:00
Zdenek Kabelac
2ec3e7dca8 tests: test raid0_meta type
Enable testing of raid0_meta type.
Also slow down devices a bit more.
2016-11-08 16:01:35 +01:00
Alasdair G Kergon
6dce0e9489 tests: Disable 3-leg raid1 pre-sync repair attempt
Test fails as it doesn't ensure device isn't already in sync.
2016-11-04 00:23:08 +00:00
David Teigland
221d8ff2a4 tests: check that pvscan cannot activate exported VG 2016-11-03 11:43:37 -05:00