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
Zdenek Kabelac
dc41859220
tests: enhance delay_dev
...
Use common code for error_dev & delay_dev.
Both functions now take list of sectors.
From now on we could delay just 'extent' section, while
keeping running lvm commands fast (having native metadata area).
2015-04-03 14:53:36 +02:00
Zdenek Kabelac
bd84389c68
tests: add get first_extent_sector
...
Trvial function to figure out sector position of 1st. extent.
2015-04-03 14:20:03 +02:00
Zdenek Kabelac
308f9bcc18
tests: simplify check sysfs_queue
...
Pass just device name and let figure out
sysfs path inside the function.
2015-04-03 10:27:00 +02:00
Zdenek Kabelac
a16324b0d3
tests: drop check for awk
2015-04-02 13:38:41 +02:00
Zdenek Kabelac
7a6e3838e9
tests: add check sysfs_queue
...
Add check function for content of /sys/block/$1/queue/$2 == $3
2015-04-02 13:38:41 +02:00
Ondrej Kozina
7c66850ce5
tests: add helper routine for pvmove status check
2015-03-30 18:38:50 +02:00
Zdenek Kabelac
f08154cc7b
tests: update aux
...
When we use /dev/loopX device - shift first PV1 sector by 1M
so /dev/loop0 and dm device do not appear as same device.
Also notify lvmetad once 'devs' are created - so in case this
command is called in the middle of test - lvmetad properly
drops its metadata for these devices.
Drop used test.img file between reuse so the 'prepare_vg'
always starts with zeroed disks.
When LVM_TEST_AUX_TRACE is set, allow shell tracing of aux commands.
2015-03-26 15:10:31 +01:00
Zdenek Kabelac
21343ffbfe
tests: start clvmd without lib/
2015-03-20 11:08:21 +01:00
Zdenek Kabelac
e4fa756385
tests: export shell vars
...
Export vars so they are visible in 'aux' calls as well.
(reenables cluster testing)
2015-03-19 11:23:44 +01:00
Zdenek Kabelac
eded54df7b
tests: avoid loop on older system
...
Cleanup overload of 'push'.
Don't busy-loop when reading is finished.
2015-03-12 00:07:45 +01:00
Zdenek Kabelac
26f5ec0e98
tests: update runner
...
Avoid busy-looping on CPU while reading socket pipe
and always call read only when select tells there is
something for read.
Change the batch output to old nicer output.
2015-03-11 21:17:23 +01:00
Zdenek Kabelac
243a135fe9
tests: capture and print thrown errors
2015-03-11 21:17:23 +01:00
Zdenek Kabelac
bdf4e3e2f2
tests: do not leak in mem in destructor
2015-03-11 21:17:23 +01:00
Zdenek Kabelac
6cecf61cc3
tests: cleanup some cxx warnings
2015-03-11 11:02:35 +01:00
Zdenek Kabelac
3f7e62b340
tests: enable kmsg by default
...
By default we want to capture kernel log into test trace
(since when test crashes it could be problem to reproduce).
2015-03-11 11:02:35 +01:00
Zdenek Kabelac
db5166fbfa
tests: extend test timeout to 180sec
...
Some test could take more then minute (with slow udev and slow
emulation) - extend timeout to 180sec.
2015-03-11 11:02:35 +01:00
Zdenek Kabelac
85ef614b37
tests: slightly more efficient vgcreate
...
With larger set of devices it's faster to directly call
vgcreate on empty set of devices then going though separate
pvcreate call first.
2015-03-06 14:05:06 +01:00
Zdenek Kabelac
10b8d2a4ea
tests: hide uninteresting output
...
We don't care about diff output.
2015-02-17 15:54:21 +01:00
Zdenek Kabelac
d303d9973f
tests: BACKING_DEV
...
Reset BACKING_DEV when it's same as LOOP.
Reset only 64K - so just eats a bit less space from underlaying loop
devices...
2015-02-12 15:40:52 +01:00
Zdenek Kabelac
739b751046
tests: don't crash if checked string is shorter
...
Not really sure what is this testing - just avoid coredump if
the test cannot happen since the index would too high.
2015-02-12 15:38:51 +01:00
Zdenek Kabelac
65d95caad5
tests: respect LVM_TEST_DIR
...
Check for empty LVM_TEST_DIR
(regression from 48275c7836
)
2015-02-12 15:38:50 +01:00
Marian Csontos
0e9f3dba75
test: Fix missing return in new test harness.
2015-02-12 13:28:26 +01:00
Marian Csontos
a8b45b7a4c
test: Fix harness not building on RHEL5
2015-02-10 17:02:01 +01:00
Petr Rockai
4686b8cea5
test: Fix a segfault in the test runner.
2015-02-05 13:51:06 +01:00
Petr Rockai
45e2aee8f9
test: It is not an error for a test daemon to exit before teardown.
2015-02-05 13:51:06 +01:00
Petr Rockai
78ba413ed1
test: Remove spurious set -x in lvm-wrapper.
2015-02-05 13:51:06 +01:00
Petr Rockai
d8983d4bd4
test: Properly detect warnings from testcases.
2015-02-05 13:51:06 +01:00
Petr Rockai
c96e42006d
test: Only force an IO sync when the testcase has finished.
2015-02-05 13:51:06 +01:00
Petr Rockai
210a66fbf8
test: Make killing local (test) daemons more robust.
2015-02-05 13:51:06 +01:00
Petr Rockai
1f727f3f3d
test: Call $VALGRIND directly in lvm-wrapper.
2015-02-05 13:51:06 +01:00
Petr Rockai
5d833fd458
test: Add support for running LVM commands in tests through strace.
2015-02-05 13:50:34 +01:00
Petr Rockai
a6d006d9db
test: Make lvm-wrapper available in the installed testsuite, too.
2015-02-05 13:50:33 +01:00
Petr Rockai
c2b7642d4d
test: Fix prepare_scsi_debug_dev.
2015-02-05 13:47:21 +01:00
Petr Rockai
7a0aa25c28
test: Re-try with loopback if a backing device is too small.
2015-02-05 13:47:21 +01:00
Petr Rockai
c82c69bb56
test: Update brick-shelltest (configurable timeout, better banner, exit code).
2015-02-05 13:47:20 +01:00
Petr Rockai
7ed8fc8f7d
test: Update brick-shelltest.h.
2015-02-05 13:47:20 +01:00
Petr Rockai
19bb62e2ec
test: Update brick-shelltest, adding timestamps to logs.
2015-02-05 13:47:20 +01:00
Petr Rockai
8646b50aa9
test: Package up the test runner in a reusable C++ "brick".
2015-02-05 13:47:19 +01:00
Petr Rockai
eec99ffa8c
test: Implement --fatal-timeouts to allow a timely VM restart.
2015-02-05 13:47:19 +01:00
Petr Rockai
34e818042e
test: Make the runner's heartbeat more reliable.
2015-02-05 13:47:19 +01:00
Petr Rockai
f0d314bd6d
test: Disable lvmetad logging in lvconvert-{mirror,raid}*.
2015-02-05 13:47:19 +01:00
Petr Rockai
d488f03229
test: Implement --only option to runner.
2015-02-05 13:47:18 +01:00
Petr Rockai
a8eb702093
test: Fix loading of an append-mode journal.
2015-02-05 13:47:18 +01:00
Petr Rockai
d74c147223
test: Add a missing copyright/licence notice to journal.h.
2015-02-05 13:47:18 +01:00
Petr Rockai
10c992e861
test: Fix a precedence bug in the runner.
2015-02-05 13:47:18 +01:00
Petr Rockai
b3caba849d
test: Use append for journal maintenance instead of rename.
2015-02-05 13:47:18 +01:00
Petr Rockai
23b5a006d4
test: Implement specialised --batch output style w/ rusage stats.
2015-02-05 13:47:18 +01:00
Petr Rockai
a665b90623
test: Add time/rusage formatting to the runner.
2015-02-05 13:47:18 +01:00
Petr Rockai
3fbea6029d
test: Print a heartbeat file (every 20s) in the runner.
2015-02-05 13:47:18 +01:00
Petr Rockai
e8cc9254e0
test: Avoid sleeps in the runner monitoring loop.
2015-02-05 13:47:18 +01:00
Petr Rockai
48275c7836
test: Run in /tmp if LVM_TEST_DIR is unset.
2015-02-05 13:47:18 +01:00
Petr Rockai
246fecee27
test: Rename the --quiet option to --batch.
2015-02-05 13:47:18 +01:00
Petr Rockai
feb2c7bc47
test: Targets and sources can't have the same name if builddir == srcdir.
2015-02-05 13:47:18 +01:00
Petr Rockai
2bc76bcdab
test: Run the testcases chdir'd into --testdir.
2015-02-05 13:47:18 +01:00
Petr Rockai
efb3e7ca00
test: Improve IO handling in the runner.
2015-02-05 13:47:18 +01:00
Petr Rockai
8c8fb67fc2
test: Improve tracking of silence (stuck testcases) in the runner.
2015-02-05 13:47:18 +01:00
Petr Rockai
dc1d157878
test: Make the runner's journal more reliable.
2015-02-05 13:47:17 +01:00
Petr Rockai
d27833ba7c
test: Implement flavours in the runner.
2015-02-05 13:47:17 +01:00
Petr Rockai
f3bf89ebcc
test: Fix handling of envvars in the runner.
2015-02-05 13:47:17 +01:00
Petr Rockai
b4215f956f
test: Make it possible to run tests from an installed location.
2015-02-05 13:47:17 +01:00
Petr Rockai
5698953948
test: Use the new flavour setup files in lib/inittest.
2015-02-05 13:47:17 +01:00