1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
Commit Graph

322 Commits

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