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

1453 Commits

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