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

1740 Commits

Author SHA1 Message Date
Marian Csontos
83d3cc76f3 test: Run pytest with installed libs 2015-11-02 12:52:30 +01:00
Alasdair G Kergon
15a97cc610 pre-release 2015-10-30 15:34:00 +00:00
Peter Rajnoha
5b04eda93f tests: add report-fields.sh test 2015-10-30 15:47:56 +01:00
Peter Rajnoha
9a3b64e81a tests: add test for minimum mda size 2015-10-30 10:02:00 +01:00
Zdenek Kabelac
28e54032c0 tests: update test for resize
Drop already tested 'threshold & create' which is in
lvextend-thin-full.sh

Count with now match faster 'dmeventd' wakeup on watermark
as it's now nearly instant after crossing threshold value.
2015-10-29 15:11:16 +01:00
Ondrej Kozina
bca55c9b20 tests: replace invalid use of 'fail' with 'die' 2015-10-29 13:30:29 +01:00
Zdenek Kabelac
f104a81932 tests: let pass bigger readahead
If the underlaying device has actually bigger read-ahead settings,
let it pass.
But anyway switch to 512 strip-size to get really high R-A sector count.
2015-10-29 12:39:07 +01:00
Zdenek Kabelac
3720eb63be tests: fix wrong line has been commented 2015-10-29 12:39:07 +01:00
Zdenek Kabelac
8b5525383f tests: no point in using should
lvmetad does not support lvm1 - so expect failure.
2015-10-29 12:39:07 +01:00
Zdenek Kabelac
6e1e0e8813 tests: using matching type
Compare time_t.
2015-10-27 16:00:10 +01:00
Zdenek Kabelac
4159680a0e tests: use more SKIP
Speed-up check_lvmpolld.
2015-10-27 16:00:09 +01:00
Zdenek Kabelac
76cff10a73 tests: avoid reading utils when skipping
Save even more CPU/time and avoid reading utils, when skipping test.
2015-10-27 16:00:09 +01:00
Zdenek Kabelac
3b5939bbbb tests: use skip flags
corrected usage of skip flags.
2015-10-27 00:45:37 +01:00
Zdenek Kabelac
a2dd1f6e19 tests: support skip flags 2015-10-26 23:57:47 +01:00
Zdenek Kabelac
c301cc5d38 tests: extend timer for 4 hours
Extend max time for test suite to 4 hours.
Also replace some 'non-ascii' chars from source files
and keep them plain ascii.
2015-10-26 23:57:47 +01:00
Zdenek Kabelac
b29593378f tests: snapshot now respects threshold 2015-10-26 07:38:23 +01:00
Zdenek Kabelac
2786cd27da tests: enable raid test on 4.3
With kernel -rc6 it's passing our raid tests again - so enable
it in tests.

Note: related only to Fedora rawhide kernels...
2015-10-22 22:46:10 +02:00
Ondrej Kozina
ef4d69f456 tests: add lvmetad shutdown on idle test 2015-10-20 15:45:28 +02:00
Ondrej Kozina
392248186e tests: add test for missing mirror in-sync info 2015-10-20 12:19:02 +02:00
Zdenek Kabelac
acc70de439 tests: more extend testing 2015-10-13 16:02:21 +02:00
Zdenek Kabelac
cf1c2da836 tests: wait for initial sync
Raid should be in-sync ATM for any gaming.
2015-10-13 16:02:21 +02:00
Zdenek Kabelac
c4cc5eabfe tests: start logging dmeventd output
Log dmeventd output from test - keep output logging in test
and avoid sending messages to syslog.
2015-10-13 16:02:21 +02:00
Zdenek Kabelac
8cc21354c2 tests: better regex check
Enhance check for matching prefix.
2015-10-13 16:02:20 +02:00
Zdenek Kabelac
2cb1f6eafe tests: show status in in_sync
Make visible actual status line when returing 'raid' is in sync.
Useful to prove when kernel is wrong.
2015-10-13 16:02:20 +02:00
Peter Rajnoha
5bd63df237 tests: test vgimportclone and -n option 2015-10-12 12:55:39 +02:00
Zdenek Kabelac
277dd0aa7a tests: check devices with prefix aren't in use
Avoid running tests, when prefix already exist in the system.
As prefix just uses  PID number, we may hit a case for long
running tests, where devices from some previous runs were not
properly cleared away - detect this and fail early.
(Such machine should be inspected and fixed).
2015-10-06 15:23:55 +02:00
Zdenek Kabelac
4c2cc782aa tests: ensure test will not block
This test is somewhat 'stupid' and simulates mostly unsupported
situation - so avoid blocking here.
2015-10-01 16:45:14 +02:00
Zdenek Kabelac
05e7fdd5ce tests: use proper target name for check 2015-10-01 16:05:51 +02:00
Marian Csontos
efcb3bbc8d test: Fix timeout handling
Timeouts were considered as warnings only. Signalling failure is
preferred.
2015-10-01 13:19:29 +02:00
Alasdair G Kergon
7097663ddd test: Cope with stripe rounding message change. 2015-09-28 12:25:31 +01:00
Zdenek Kabelac
47f623d64b tests: update removal test
Test is currently checking a very non-standard use case.
Make it a more resistent against being blocked in kernel.
2015-09-22 00:08:45 +02:00
Zdenek Kabelac
7e63364529 tests: check for block device
Need to detect if block device exist.
2015-09-22 00:08:44 +02:00
Zdenek Kabelac
83a52c07b7 tests: check dmsetup remove --force 2015-09-18 17:45:46 +02:00
Zdenek Kabelac
7d1dd5f52d tests: use remount-ro for extfs
Avoid showing kernel warn of umounting broken fs.
2015-09-18 17:45:46 +02:00
Peter Rajnoha
b5022102bb libdm: report: make it possible to use blank value as selection for string list report field
$ lvs -o name,tags vg
  LV    LV Tags
  lvol0
  lvol1 mytag

Before this patch:
$ lvs -o name,tags vg -S 'tags=""'
  Failed to parse string list value for selection field lv_tags.
  Selection syntax error at 'tags=""'.
  Use 'help' for selection to get more help.

(and the same for -S 'tags={}' and -S 'tags=[]')

With this patch applied:
$ lvs -o name,tags vg -S 'tags=""'
  LV    LV Tags
  lvol0

(and the same for -S 'tags={}' and -S 'tags=[]')
2015-09-17 10:19:15 +02:00
Zdenek Kabelac
cee9ed2244 tests: early check for snapshot-merge 2015-09-14 20:18:54 +02:00
Zdenek Kabelac
e7e15631dd tests: lvextend of full thin pool 2015-09-14 20:18:54 +02:00
Zdenek Kabelac
226e7d7b3c tests: wait for sync before deactivation
On slower machine/disk, sync may block udev from reading and may prevent
deactivation.
2015-09-11 21:52:27 +02:00
Zdenek Kabelac
cd2e4310b3 tests: new thin tests 2015-09-11 21:52:27 +02:00
Zdenek Kabelac
9b8c876293 tests: remove only existing loops
If loop device meanwhile dissapered, skip 'losetup -d' call.
2015-09-10 17:28:47 +02:00
Zdenek Kabelac
e94ab01940 tests: fix check lv_not_exist
Use 'not' to set proper 'expected return status'
so we do not 'leak' debug logs printed for failing case.
2015-09-10 17:28:47 +02:00
Zdenek Kabelac
54c982081f tests: check cache stripe and raid behavior
Somehow raid tests landed in plain cache - separte them out
so they properly check for  have_raid.

Check we do not support strip option with cache-pool creation.
2015-09-10 17:28:47 +02:00
Zdenek Kabelac
5911fa1d91 cache: warn if caching causes troubles
Certain stacks of cached LVs may have unexpected consequences.
So add a warning function called when LV is cached to detect
such caces and WARN user about them - the best we could do ATM.
2015-09-10 17:27:30 +02:00
Zdenek Kabelac
587fd6a0e4 tests: ensure dd flushed all data before exit 2015-09-08 15:41:34 +02:00
Zdenek Kabelac
6cb7f21e38 tests: better check for compiled version
Use install /lib files to check for expected version.
2015-09-08 15:41:34 +02:00
Zdenek Kabelac
8ff43c3705 makefiles: ensure no old .h are left
Ensure make clean  cleans any left-over file from their previous
location so they are not in conflict with new ones.

Also hide error message when .commands file is not present.
2015-09-08 15:41:33 +02:00
Zdenek Kabelac
596ec5c74b tests: skip raid testing on 4.[1,2] fc24 kernels
Hopefull 4.3 will be fixed and test will be updated to let
raid test running again.

Meanwhile using md-raid may effectively kill kernel,
so leave at least other tests running.
2015-09-08 12:12:38 +02:00
Zdenek Kabelac
fa4d2ec241 tests: update install rules
Enhnace 'make install' rules for test suite (used for rpm packaging).
Install lvmlockd conf files.
Compile runner with correct CXXFLAGS.
2015-09-07 17:44:08 +02:00
Zdenek Kabelac
5da497d0a8 tests: update thin test
Use slightly better values
2015-09-03 23:34:37 +02:00
Zdenek Kabelac
dc261f17e9 tests: use conv=fdatasync
Should be slightly better to flushed before dd exits
instead of using direct IO.
2015-09-03 23:34:37 +02:00
Zdenek Kabelac
d0ff35c5a6 tests: update cache tests 2015-08-26 11:24:41 +02:00
David Teigland
ba898b9ab6 tests: fix check for lvmlockd test 2015-08-21 17:00:21 -05:00
David Teigland
d827dd8b05 tests: add test for lvmlockd lock_args 2015-08-21 15:09:38 -05:00
David Teigland
e53758c5f6 tests: add lib function to test hidden LVs with lvs -a 2015-08-21 15:09:38 -05:00
David Teigland
1f27c9f6a4 tests: create/remove improvements for lvmlockd testing 2015-08-21 15:09:38 -05:00
David Teigland
d310e1f907 test: allow tests with lvmlockd 2015-08-21 15:09:38 -05:00
Zdenek Kabelac
1c811bfcd9 tests: check cachepolicy with lvconvert 2015-08-21 15:35:45 +02:00
David Teigland
c09dad71fb tests: fix lockd options in sanlock-prepare 2015-08-18 15:06:49 -05:00
Zdenek Kabelac
77357081c8 tests: update thin test
Since we now let pass activation of thin-pool 'off-by-one' for
plain 'vgchange -ay' update the test to use higher TID.
2015-08-17 17:07:09 +02:00
Zdenek Kabelac
a606966029 tests: Revert update for new thin pool messaging
This reverts commit 3dbb9a57ca.
Original code is back as the code restored previous TID handling.
2015-08-17 11:25:03 +02:00
Zdenek Kabelac
c2d814e78d tests: keep testing mq policy
Tests were written for 'mq' policy, so disable smq.
2015-08-12 14:33:16 +02:00
Zdenek Kabelac
9e3ef2809a tests: link some new cache profiles 2015-08-12 14:33:16 +02:00
Marian Csontos
0dae377fbf test: Update Makefiles
- Add missing check_lvmpolld to toplevel Makefile
- Document check_system
2015-07-30 20:39:38 +02:00
Marian Csontos
b785a50da4 test: Help, default and relative paths in runner
Add help message.
Handle relative paths first.
Use `.` for OUTDIR instead of `/` if empty.
2015-07-17 20:36:50 +02:00
Marian Csontos
2bc0525e93 test: Fix hardcoded /usr/share in testsuite 2015-07-17 20:36:50 +02:00
Alasdair G Kergon
c7fc06a262 test: Ignore known concurrent VG clvmd failure.
Don't abort test when clvmd processes two VGs concurrently.
  CLVMD: ioctl/libdm-iface.c:1940   Internal error: Performing unsafe table load while 3 device(s) are known to be suspended:  (253:19)
2015-07-17 12:56:52 +01:00
Zdenek Kabelac
4a33d57143 thin: fix warning for overprovisioning
When lvm.conf is properly configure for auto resize of overprovisioned
thin-pool volume, avoid showing any warning (2.02.124).
2015-07-15 13:10:21 +02:00
Marian Csontos
47ac6a1a2e test: Fix syntax error in prepare_devs 2015-07-10 16:15:15 +02:00
Zdenek Kabelac
6e1f421a6d tests: follow symlinks
If the srcdir itself is a symlink the find would not return expected
value. So support also this config and use -L.
2015-07-08 15:41:48 +02:00
Zdenek Kabelac
bfd0689d64 tests: use old snapshot for huge volumes
Avoid stacking thins over thins.
2015-07-07 09:57:32 +02:00
Jonathan Brassow
4daea88516 clean-up: typos s/bellow/below/ 2015-07-06 10:15:11 -05:00
Zdenek Kabelac
3dbb9a57ca tests: update for new thin pool messaging 2015-07-03 16:13:15 +02:00
Zdenek Kabelac
622064f00f thin: check for overprovisioning 2015-07-03 16:13:14 +02:00
David Teigland
fe70b03de2 Add lvmlockd 2015-07-02 15:42:26 -05:00
Peter Rajnoha
eaa0d927a4 tests: add test for 454782f (select with synonyms for string field types) 2015-07-02 11:46:58 +02:00
Zdenek Kabelac
02767c5eb1 tests: tests needs pre 1.13 thin-pool extorg
This test is testing older style, so disable feature when present.
2015-06-26 22:16:01 +02:00
Zdenek Kabelac
03c4fee5a7 tests: deactivate before remove
Testing if this avoids udev race with removal of snapshot on some
test machines.
See: https://bugzilla.redhat.com/show_bug.cgi?id=1217819
2015-06-26 22:11:46 +02:00
Zdenek Kabelac
44c7bc0262 tests: workaround udev problem
If udev has not removed 'dir' entry - just issue TEST WARNING, clear
dir, but do not fail whole rest of test.
2015-06-24 15:19:53 +02:00
Zdenek Kabelac
4c6b3f5ec3 tests: use vgscan after enable_dev
Since our test environment runs also in non-real-udev world,
it's using  /etc/.cache file with scanned files.

So in this case it is mandatory the user runs 'vgscan'
after a device reappears in the system.

This 'first' lvm2 command then fixes metadata (just like vgs did).
2015-06-23 13:39:57 +02:00
Zdenek Kabelac
ae76e8f0d0 tests: skip when snapshot does not work
Some older kernel (i.e. 3.11.10 on fc20) do not work properly.
Skip the test if snapshot does not meet 50%.
2015-06-23 13:25:09 +02:00
Zdenek Kabelac
7ee3ccd826 tests: newer version needed for ext-orig 2015-06-23 11:56:42 +02:00
Zdenek Kabelac
9c86d33e68 cleanup: avoid printing gcc warning
Casting to (void) with gcc doesn't remove unused_result warning.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25509
2015-06-23 11:06:02 +02:00
Zdenek Kabelac
b45e9183bc tests: external origin updates
Update test for recent updates to support unalligned sizes
and extension of reduced volume.
2015-06-19 16:33:29 +02:00
Zdenek Kabelac
a3e0d830bd thin: support unaligned size of external origin and thin pool
With thin-pool kernel target module 1.13 it's now support usage of
external origin with sizes which are not 'alligned' with chunk size
of thin-pool.

Enable lvm2 support for this and also fix reporting of data_percent
usage for case sizes are not alligned.
2015-06-18 18:50:36 +02:00
Petr Rockai
9c0049b1ce test: Ensure that outdated PVs are wiped just once. 2015-06-10 16:27:59 +02:00
Zdenek Kabelac
778b66a719 tests: check for idle only for raid type 2015-05-27 11:59:10 +02:00
Zdenek Kabelac
d3abc25e76 tests: check for clmvd socket
A bit hacky since it expects PID_DIR == DEFAULT_RUN_DIR for now,
just to check whether it fixes startup clvmd sync problem.
2015-05-27 11:10:43 +02:00
Zdenek Kabelac
f0a4955eb1 tests: better check for array in sync
Update check for raid array being in sync - getting somewhat complex.
It's another way to fight with problems in:
https://bugzilla.redhat.com/show_bug.cgi?id=1210637
2015-05-27 11:10:43 +02:00
Zdenek Kabelac
c254743ef3 tests: drop debug print 2015-05-27 11:10:43 +02:00
Ondrej Kozina
da20e0c507 tests: add test for pvscan --cache --background
regression test for a segfault in pvscan --cache --background
bug fixed by commit:
f8bf641095
2015-05-25 10:48:45 +02:00
David Teigland
e27182249a tests: add test for duplicate pvs 2015-05-19 11:02:53 -05:00
Zdenek Kabelac
0cb9df3cec tests: fix calcucaltion
Code works properly.
2015-05-18 12:45:43 +02:00
Zdenek Kabelac
caaca15854 tests: thin_restore not needed
Few more test which could live without thin_restore.
2015-05-18 12:45:42 +02:00
Zdenek Kabelac
30c3bbcd9e makefiles: better clean
More exact clean of library exported symbols files.

Also use $(firstword) test to check for empty string
so 'make clean' has now cleaner condensed look.

Clean also created include links.
2015-05-18 12:45:42 +02:00
Zdenek Kabelac
1bed578535 makefiles: use := for shell calls 2015-05-18 12:45:42 +02:00
Zdenek Kabelac
76cc477fba tests: no warn if test does not need thin_repair
Set LVM_TEST_THIN_REPAIR_CMD to /bin/false for test which
doesn't need it.

This way - even if on the system there is no such tool present,
test will not result with warning about missing tool.

Also remove from Makefile settings of TEST vars which are set in
through /lib/paths  - this also allows to override them in test.
2015-05-17 20:24:36 +02:00
Zdenek Kabelac
a42c1c5728 tests: respect @CONFDIR@/machine-id
Obtain location of machine-id.

NOTE: lvmconfig cannot dump 'life' value - should be fixed.
2015-05-14 10:52:55 +02:00
Zdenek Kabelac
57a16abe2c tests: do not use |&
Bash 3.2  doesn't understand this syntax (i.e. RHEL5).
And it's even better - reports syntax error and return success.
2015-05-14 10:52:55 +02:00
Ondrej Kozina
2ec51e6185 tests: remove forgotten -vvvv option 2015-05-12 17:16:54 +02:00
Zdenek Kabelac
100daa7fd8 tests: ndev by default 2015-05-12 12:40:37 +02:00
Zdenek Kabelac
13e87045fd makefiles: use LN_S 2015-05-12 12:40:37 +02:00
Ondrej Kozina
f5199a1cbd tests: remove forgotten set -v in aux 2015-05-11 19:08:19 +02:00
Zdenek Kabelac
5420edd56e tests: split flavours
Remove duplicate flavour-udev-lvmetad-lvmpolld
and put them 1-per-line.
2015-05-11 17:31:09 +02:00
Zdenek Kabelac
3eb2d4d2ce tests: typo in aux
Ooops editor grabbed q in test.
2015-05-11 16:14:24 +02:00
Zdenek Kabelac
fabc19b73c tests: disable lvmetad and lvmpolld
Since now we enable those by default when compiled with those daemons,
explicitely disable them in tests when needed.

Alphabetically sort configurables.
2015-05-11 15:53:21 +02:00
Zdenek Kabelac
e3ccf98023 tests: missed conversion
Assuming it should test same number as other functions.
2015-05-09 09:17:26 +02:00
Zdenek Kabelac
abcab54cca tests: avoid clobering dmesg
Restore old harness access to /dev/kmsg.
2015-05-09 09:17:26 +02:00
Ondrej Kozina
e587b0677b lvmpolld: Add standalone polldaemon.
See doc/lvmpolld_overview.txt
2015-05-09 00:59:18 +01:00
Zdenek Kabelac
53aff9322e tests: better filter
Filter $PREFIX rather then just LVMTEST.
2015-05-08 21:00:10 +02:00
Zdenek Kabelac
1d832aef09 tests: missing vg 2015-05-08 21:00:10 +02:00
Zdenek Kabelac
05934d2538 format_text: properly validate PV size for restore
Use 64bit arithmentic for PV size calculation (Coverity).

Also remove sector shift for compared PV size, since all
values are already held in sectors.

This fixes validatio of PV size when restoring PV
from vg metadata backup file.
2015-05-08 15:12:35 +02:00
Tony Asleson
6d35c69b06 Python: Improve lv property test coverage
Improve the python unit test case to cover all of the properties of a LV and
the properties of a LV segment.

In addition we also add a 'tag' to the lv so that we can retrieve it
using the 'lv_tags' property to ensure that this works as expected.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
2015-05-06 08:51:05 -05:00
Ondrej Kozina
5bbf083cd1 tests: do not restart lvmetad when not necessary
overlooked pvmove-restart test during cleanup
2015-05-06 15:20:11 +02:00
Zdenek Kabelac
7a5a4f952e tests: play better with mdadm
Manage mdadm devices on older distros is a challange.
2015-05-04 13:11:41 +02:00
Zdenek Kabelac
2d10a6f6ae tests: check for open_count
Instead of checking /proc/mounts check for open_count of snap device.
Parallel umount has race, so check for open_count.
2015-05-04 10:18:44 +02:00
Zdenek Kabelac
7a588bce7b tests: drop extra scsi init
Use first test also for checking the support is there -
avoid one extra unnecessary scsi_debug reload.
2015-05-04 10:17:48 +02:00
Zdenek Kabelac
c90ee0414d tests: check for clvmd process entry
Instead of checking just for pid file - rather check
for process  - since there could be slight race, the
pid file is gone, but process still exists.
2015-05-04 10:16:33 +02:00
Zdenek Kabelac
3f05e662bb tests: validate passed LVM_TEST_DEVDIR
Quit test early if passed LVM_TEST_DEVDIR dir does not exists.
2015-05-04 10:15:56 +02:00
Zdenek Kabelac
b09ac72624 tests: wait for scsi device to appear
Continue with test as soon as device appear (avoid 2s delay)
2015-05-04 10:14:52 +02:00
Zdenek Kabelac
75aa3e951f tests: dd needs to fail in this case 2015-05-03 01:06:20 +02:00
Zdenek Kabelac
224e30a4b1 tests: more waits on restart
Check for socket presence (hardcoded for now)
2015-05-03 00:43:15 +02:00
Zdenek Kabelac
31f1375d23 tests: use 800ms write delay
Since this value magically worked for  pvmove-abort*
use it here as well.

Also prepate_lvmetad has better kill&reload mechanism.
2015-05-03 00:43:15 +02:00
Zdenek Kabelac
4f6660db7d tests: use odirect
Fill snaphot with odirect so we know data hits disk
before we test how full the snapshot is.
2015-05-03 00:43:15 +02:00
Zdenek Kabelac
3542fce0fb tests: more advance cleanup of running pvmove
More take down more targets and use time-limited code.
2015-05-01 22:49:38 +02:00
Zdenek Kabelac
abdfb1e75b tests: configure use_lvmetad when needed 2015-05-01 22:49:38 +02:00
Zdenek Kabelac
9c7063ef89 tests: free -h is quite new option
Stay with -g and and ignore failure.
2015-05-01 15:40:04 +02:00
Zdenek Kabelac
79844b9066 tests: minor simplifications
minor updates
2015-05-01 15:07:59 +02:00
Zdenek Kabelac
fee09f0964 tests: disable usage of fuser
Seems we captured problems with debug.log overwrite,
so avoid quite expensive usage of fuser tool with each lvm command.
2015-05-01 15:07:59 +02:00
Zdenek Kabelac
4ce5b5fdf3 tests: run api tests from startup dir 2015-05-01 15:07:59 +02:00
Zdenek Kabelac
a3473e60db tests: no lvmetad reload for debugless output
Introduce LVM_TEST_LVMETAD_DEBUG_OPTS to allow to override
default debug opts for lvmetad.

However could be still overloaded on command line:

make check_lvmetad LVM_TEST_LVMETAD_DEBUG_OPTS="-l all"...
2015-05-01 15:07:58 +02:00
Zdenek Kabelac
dd4e6b4e7e tests: lower version of dm-delay
Let's see what will break with lower version 1.1.

Also avoid repeated check of target version.
2015-05-01 15:07:58 +02:00
Zdenek Kabelac
16e8006eb0 tests: rename kill_tagged_processes
Better name for aux function.
First use normal -TERM, and only after a while use -KILL
(leaving some time to correctly finish)
Print INFO about killed processes.
2015-05-01 15:07:58 +02:00
Zdenek Kabelac
c18e969e30 tests: move conf preparing
If the test in the middle is restarting lvmetad
avoid conf regenerating.
2015-05-01 15:07:58 +02:00
Zdenek Kabelac
0eea780bce tests: hide error message
Hide error about missing declare -A  support.
2015-05-01 15:07:58 +02:00
Zdenek Kabelac
0480b4743a tests: wait between remount
Let's see if this help with some races...
2015-05-01 15:07:58 +02:00
Zdenek Kabelac
4daede06e5 tests: move kernel_at_least to aux
Hide func processing and reuse existing
version_at_least().
2015-05-01 15:07:58 +02:00
Zdenek Kabelac
f48a4c391c tests: watch out for RAM size
Reduce mem-requirements on low memory boxes,
activate less volumes if machine is below 0.5G.

Also print mem size at test header.
2015-05-01 15:07:58 +02:00
Zdenek Kabelac
3706abde5e tests: lvmconf update
New lvmconf function is using bash associative arrays - however
older systems like RHEL5 doesn't provide this feature. In this case
stay with older variant.

Restore support for use case like this:
aux lvmconf 'tags/@foo {}'
2015-04-30 11:16:14 +02:00
Zdenek Kabelac
244ca7ee77 tests: minimize teardown when uneeded
If test has not yet initilized any device,
make teardown a bit faster.
2015-04-29 15:09:58 +02:00
Zdenek Kabelac
c5b4327f3d tests: bash-fu for lvmconf
Sqeeze about 0.1s out of every created conf and use internal
bash associative arrays instead of lot of command forking
2015-04-29 15:09:58 +02:00
bkabrda@redhat.com
5d8b31ffad python: python 3 compat patch for lvm2
As provided by rhbz: 1136366
2015-04-29 15:09:56 +02:00
Ondrej Kozina
90cbc5576f tests: try harder to kill all dangling procs
also simplify and make less prone to an error checks
for running bg processes inside a pvmove-resume tests
2015-04-28 22:31:50 +02:00
Ondrej Kozina
8c9ab2a4dd tests: simplify removal of dangling bg procs
some tests left dangling bg processes originating in
lvm2 commands being able to spawn any bg polling process
(lvchange, vgchange, pvmove, lvconvert...)

Initial fn 'add_to_kill_list' should collect processes with
specific parameters (proc's command line and parent processes ID).
After testing finishes the fn kill_listed_processes should remove these
listed by 'add_to_kill_list'.

Unfortunately it proved to be prone to an error especially in scenarios
where cmd line of initiating command contained characters required to
be espaced before passing to shell script to make it work correctly.
(Or if cmd spawned more than one bg process with same cmd line. i.e.:
vgchange or lvchange).

The new implementation is much simpler. It uses env. variable (LVM_TEST_TAG)
for marking a process desired to be killed later or during test env. teardown.
(i.e.: LVM_TEST_TAG=kill_me_$PREFIX to kill only processes related to
current test environment)
2015-04-28 22:31:40 +02:00
Zdenek Kabelac
71dbfd7c20 tests: more help# 2015-04-28 11:35:56 +02:00
Zdenek Kabelac
3fbb7b6e35 tests: always zero disk header
It appear that older wipefs doesn't wipe partition table.
So ensure there is no partition on LVM_TEST_BACKING_DEVICE.
2015-04-28 11:32:52 +02:00
Zdenek Kabelac
1bb5b498f0 tests: more descriptive aux
Tell what's reason of aux fail here.
2015-04-28 11:23:16 +02:00
Zdenek Kabelac
a378e5a6dd tests: drop debug test
Remove 'debug leftover' from test.
2015-04-28 11:23:16 +02:00
Zdenek Kabelac
a7d28639eb tests: use new help in aux
Simplify tests and use aux mdadm helpers.
2015-04-25 00:40:02 +02:00
Zdenek Kabelac
1e3c135d71 tests: aux for mdadm
Implement aux helper fce for mdadm.
2015-04-25 00:40:02 +02:00
Zdenek Kabelac
f50229041b tests: allow add printable skip message 2015-04-25 00:40:02 +02:00
Zdenek Kabelac
a939857a63 tests: check sysfs more generically
Allow to access more files in device sysfs subtree.
2015-04-25 00:40:02 +02:00
Ondrej Kozina
d9176782fe tests: add double quotes around add_to_kill_list parms 2015-04-25 00:40:02 +02:00
Zdenek Kabelac
d7888e8316 tests: try more advanced clean
When test is executed on real device - lets try a more complete
cleanup - discard whole device first and try to wipe any
headers it might be left from previous test.
2015-04-25 00:39:43 +02:00
Zdenek Kabelac
de0ce46361 tests: fix md raid test on real /dev
Zero raid signatures when raid is stopped - so signatures
are not requiring wipe when pvcreate follows.

Handle real /dev
2015-04-23 20:28:44 +02:00
Zdenek Kabelac
2fea720881 tests: add missing "" around dev 2015-04-22 11:18:31 +02:00
Zdenek Kabelac
4b161de2e5 tests: aux works better with installed_testsuite
When test suite is used from installed rpm package
we need to handle things better.

This patch is rather first approach - expecting few more
tweaks needed.
2015-04-22 11:18:31 +02:00
Zdenek Kabelac
7a64a157e1 tests: simplify teardown
If TESTNAME has not been created yet, avoid running complex teardown.
2015-04-22 11:18:31 +02:00
Zdenek Kabelac
d8874556cd tests: install also api test
Install .t & .py binaries.
On 'make clean'  ensure also -t files are removed.
2015-04-22 10:57:42 +02:00
Zdenek Kabelac
3216a9a819 tests: drop DEBUG log after success
At this moment LVM_LOG_FILE_EPOCH with
LVM_EXPECTED_EXIT_STATUS  properly deletes debug logs
only for real commands - support for lvm2 API does not yet
exists
2015-04-22 10:55:37 +02:00
Zdenek Kabelac
14c3f9603e tests: use 800ms delay
Worked better with pvmove-abort-all so use here as well.
2015-04-22 09:09:26 +02:00
Zdenek Kabelac
3f8da60079 tests: notify drops log always
Even on success remove debug.log here.
2015-04-22 09:09:26 +02:00
Zdenek Kabelac
afdff40542 tests: explicitely ignore result code 2015-04-22 09:09:26 +02:00
Zdenek Kabelac
30e8b284a7 tests: allow to use sysfs filter
Current filtering logic in lvm2 needs some rework.
For now at least enable it in test suite.
2015-04-22 09:09:26 +02:00
Zdenek Kabelac
caa9223c85 tests: update to renamed envvars
Enhance 'not' so 'should' now shows log trace from
command which has failed but should not.
2015-04-20 19:18:56 +02:00
Zdenek Kabelac
85e833c172 tests: add extra keyword for timing control
Control logging of timer with
"## timing off"  and "## timing on"
2015-04-20 19:18:56 +02:00
Zdenek Kabelac
cf4df9e349 tests: use new debug logging feature
Enhance 'not' to manage autodeletion of log files in right cases.
Use separately marked epoch log files for clvmd and dmeventd.
Properly manage stack tracing for new debug.log names.
2015-04-20 12:12:22 +02:00
Zdenek Kabelac
191f3cf52a tests: shell-fu
Preserve quotes for devs and use  shell arrays to pass things around.
2015-04-15 15:09:45 +02:00
Zdenek Kabelac
43a6f9e726 tests: move print of replaced vars 2015-04-15 15:09:45 +02:00
Zdenek Kabelac
53c2c45625 tests: align test result in batch mode 2015-04-15 13:35:42 +02:00
Zdenek Kabelac
e478471dd5 tests: move stamp handling
Shift stamp handling into TimedBuffer,
so it's same everywhere.
2015-04-15 13:35:42 +02:00
Zdenek Kabelac
5d4695569d tests: hide error output
Hide error message if pid is already away.
2015-04-15 13:35:42 +02:00
Zdenek Kabelac
930f0aae84 tests: fix aux have test
Previous commit has made have_cache & have_thin producing
false return value.

Fix it and at the some time provide much better reconfiguring
warning message.

If the test machine is missing needed and configured binaries
it will produce TEST WARNING result.
2015-04-15 13:35:42 +02:00
Zdenek Kabelac
1a7dd13e70 tests: no tables for no devices
If dm table does't contain any PREFIX device, don't bother
to call other commands

No tracing if test is skipped.
2015-04-15 13:35:42 +02:00
Zdenek Kabelac
f5466fe435 tests: preserve "" around dev 2015-04-15 13:35:42 +02:00
Zdenek Kabelac
1a814af46b makefiles: fix usage of default value
When a var like LVM_TEST_THIN_CHECK_CMD is set to ""
(which is valid) we need to correctly use '-'.
Otherwise ':-' replaces such value with built-in default.
2015-04-15 13:35:42 +02:00
Petr Rockai
7e58ae7dac test: Show all lvmetad messages (errors, warnings), not just debug+wire. 2015-04-14 20:18:27 +02:00
Zdenek Kabelac
d1a770107d tests: update pvmove tests
Put in pvmove background process into list quickly.
Update API for aux add_to_kill_list()/kill_listed_processes().
Run on 'background' (&) only non-background pvmoves.
2015-04-14 13:29:43 +02:00
Zdenek Kabelac
75454c2b32 tests: rusage skipped only for skipped 2015-04-14 13:29:43 +02:00
Zdenek Kabelac
a084b3122f tests: integrate default thin/cache tool paths
If the system is correctly configure (cache & thin tools are present)
avoid 'extra' rebuild of configuration.

On the other hand - if some tool is missing - duplicate ##LVMCONF should
make it more straighforward to see.
2015-04-14 10:11:36 +02:00
Zdenek Kabelac
c6bcfcba85 tests: stacktrace understands fullpath
$0 as name of script could be either relative or full path.
When it's fullpath don't prepend $TESTOLDPWD.
2015-04-14 10:11:36 +02:00
Zdenek Kabelac
c969e05aab tests: avoid dup of lvm.conf
When running lvmetad test - avoid duplicate create of lvm.conf
Also as lvmetad cannot be used with cluster make it as 2 code paths.
2015-04-14 10:11:35 +02:00
Zdenek Kabelac
ee6fc17663 makefiles: skip lvmetad tests
When build without lvmetad, skip  n/udev-lvmetad flavour execution.
Update help test.
2015-04-14 10:11:35 +02:00
Ondrej Kozina
96124c6c0b tests: [new] check pvmove resume works as expected
various methods of resuming interrupted pvmove are tested:
- pvmove
- pvmove -b
- lvchange
- vgchange

tests for commits:
- c26d81d6e6
- fe30658a4d
2015-04-13 20:53:18 +02:00
Zdenek Kabelac
e4261ba037 tests: update runner
Reenable TESTDIR  & PREFIX replacement.
Since we need to replace string in proper order (1st. @TESTDIR@,
2nd. @PREFIX@), drop map and use plain string.

Drop timestamp logging when 'stacktracing'
2015-04-13 16:38:32 +02:00
Zdenek Kabelac
0aef2b719f tests: log parallel debug.log usage as problem 2015-04-13 16:38:32 +02:00
Zdenek Kabelac
0457224feb tests: sections in test separated
Use  <========  to separate sections.
Use ##  to prefix these outputs.
Drop $top_srcdir from sed  (it's been replacing '..')
Hide more /dev  dirs.
2015-04-13 16:38:31 +02:00
Zdenek Kabelac
f080ebc123 tests: hide unwanted output 2015-04-13 16:38:31 +02:00
Zdenek Kabelac
391500643c tests: slowdown mirroring more
Since some of test machines are very slow, slowdown mirroring
even more.
2015-04-13 16:38:31 +02:00
Tony Asleson
f29df9acfe python: Unit test ws fixes
pep8 corrections for:
    - mixed leading ws (tabs & spaces)
    - spacing around arithmetic operators

Signed-off-by: Tony Asleson <tasleson@redhat.com>
2015-04-10 10:52:12 -05:00
Tony Asleson
2b557b595a python: Make lv addTag/removeTag persistent
Added lvm_vg_write in the addTag/removeTag paths to make the
changes persist.  Added unit test to ensure functionality.

https://bugzilla.redhat.com/show_bug.cgi?id=1210020

Signed-off-by: Tony Asleson <tasleson@redhat.com>
2015-04-10 10:38:43 -05:00
Zdenek Kabelac
249d4a921c tests: extend delay
400 was appeared to be good value in pvmove-abort.sh
so use also in abort-all.
2015-04-09 13:16:53 +02:00
Zdenek Kabelac
1a7c9ce3bd tests: handle debug.log from clvmd
When clvmd starts, it starts it's own command logging into debug.log.
This is interferring with our other command debug.log.
As as sideeffect we may experience log from command,
followed but lots of zeros and continued with clvmd log.

Fix it by renaming debug.log and now we could also print this trace
to get full list of clvmd activity nicely.

Also improve some post-mortem prints from udevadm and dmsetup to
make the output more usable.
2015-04-09 13:13:36 +02:00
Zdenek Kabelac
073643c9a2 tests: slowdown write on dev3 even more 2015-04-08 23:19:38 +02:00
Zdenek Kabelac
ebde60beab tests: use single lvmconf call 2015-04-08 23:19:37 +02:00
Zdenek Kabelac
a5b34f0f1b tests: put "" around dev path 2015-04-08 23:19:37 +02:00
Zdenek Kabelac
8fdca0de79 tests: check scsi_debug support opt_blks
Some older kernels (i.e. lenny) do not have such options.
2015-04-07 14:59:13 +02:00
Zdenek Kabelac
64353ff74b tests: when test fails collect more info
In some case it might be worth to know some more surrouding info
when command has crashed.

So collect  tables and some udev db content in this case.
2015-04-07 13:40:15 +02:00
Zdenek Kabelac
ba049e203b tests: skip clvmd testing of mirrored LV vgsplit
There is something wrong when even inactive LV can't be splitted
without cmirrord being present for clustered VG.
2015-04-03 20:14:26 +02:00
Zdenek Kabelac
87cb0a3e9f tests: change default to 30s.
Keep rather the default lower and avoid to pass it with every call.
2015-04-03 19:40:43 +02:00
Zdenek Kabelac
32a0f625a5 tests: slow down devices in outer loop
Since now we have metadata parts running with normal speed,
we could avoid reinitilising delayed dev for every test.
(Saving seconds on cookie waits...)
2015-04-03 19:40:42 +02:00