Bryn M. Reeves
3dae416229
tests: add driver_at_least() to aux.sh
...
Add a function to test whether the running device-mapper driver
version is at least equal to some given version.
2016-02-25 16:40:58 +00:00
David Teigland
0236a34224
tests: updates for check_lvmlockd
...
Move the lvmlockd-related setup functions into aux.
For check_lvmlockd_test, start a new instance of
lvmlockd --test for each shell test.
2016-02-23 14:00:28 -06:00
David Teigland
f54253d396
tests: add SKIP_WITH_LVMLOCKD
...
to all tests that don't already used vgcreate $SHARED
2016-02-23 09:28:48 -06:00
David Teigland
161ae36363
test: add make check_lvmlockd_test
...
Which runs lvmlockd in --test mode, without
any lock manager.
Also make some adjustments to the check_lvmlockd
variations using the lock managds.
2016-02-22 09:36:35 -06:00
Zdenek Kabelac
ed5e5c38b5
tests: skip thin-flags test on 32bit el6 kernel
...
Until kernel is fixed, stop running test always hitting OOPS there.
2016-02-22 14:59:28 +01:00
Zdenek Kabelac
fcbef05aae
doc: change fsf address
...
Hmm rpmlint suggest fsf is using a different address these days,
so lets keep it up-to-date
2016-01-21 12:11:37 +01:00
Peter Rajnoha
04d1a8a5e4
cleanup: rename 'invisible devices' to 'hidden devices'
2016-01-13 16:43:25 +01:00
Peter Rajnoha
c66a83fdc3
tests: update tests to deal with invisible devices consistently
2016-01-13 13:55:24 +01:00
Zdenek Kabelac
8d86c5db03
tests: improve teardown
...
Do not try to execute vgremove, when test has left suspended devices.
2015-11-24 11:29:28 +01:00
Marian Csontos
6f002c29a5
tests: stacktrace on skip if message is empty
2015-11-19 12:18:33 +01:00
Marian Csontos
2a23550cf3
tests: add missing --skip option and S env.variable
2015-11-19 12:00:59 +01:00
Zdenek Kabelac
ab4773671b
tests: do not skip test when delay is missing
...
Rather then skipping whole test - just do not use it.
Failing tests that have required delay need to deal with reality
and shell either check for HAVE_DM_DELAY and skip portion
of test or using should when needed.
2015-11-09 12:21:17 +01:00
Zdenek Kabelac
6e1e0e8813
tests: using matching type
...
Compare time_t.
2015-10-27 16:00:10 +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
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
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
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
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
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
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
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
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
David Teigland
e53758c5f6
tests: add lib function to test hidden LVs with lvs -a
2015-08-21 15:09:38 -05: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
Marian Csontos
47ac6a1a2e
test: Fix syntax error in prepare_devs
2015-07-10 16:15:15 +02:00
David Teigland
fe70b03de2
Add lvmlockd
2015-07-02 15:42:26 -05: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
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
f5199a1cbd
tests: remove forgotten set -v in aux
2015-05-11 19:08:19 +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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
93ab6d5184
tests: better check for empty set
...
Even when no arg is passed - there is still one "" arg there...
So taky it easy and check for empty string instead.
2015-04-03 16:38:05 +02:00
Zdenek Kabelac
d3a591a7b3
tests: hide unwanted output
2015-04-03 14:54:22 +02:00