summaryrefslogtreecommitdiffstats
path: root/test/lib
Commit message (Collapse)AuthorAgeFilesLines
* libdaemon: Draft logging infrastructure.Petr Rockai2012-08-081-1/+1
| | | | | | | | | | | - logging is not controlled by "levels" but by "types"; types are independent of each other... implementation of the usual "log level" user-level semantics can be simply done on top; the immediate application is enabling/disabling wire traffic logging independently of other debug data, since the former is rather bulky and can easily obscure almost everything else - all logs go to "outlets", of which we currently have 2: syslog and stderr; which "types" go to which "outlets" is entirely configurable
* TEST: Add library functions for checking and waiting for syncJonathan Brassow2012-07-242-0/+57
| | | | | Add 'in_sync' and 'wait_for_sync' to test and wait for synchronization of a mirror or RAID logical volume.
* Add provisions to flag tests that we know will fail, without flagging the buildPetr Rockai2012-05-162-4/+24
| | | | (i.e. an expected failure).
* Improve test suiteZdenek Kabelac2012-03-283-17/+23
| | | | | | | | | Add make help target. Add LVM_TEST_PARALLEL to support parallel runs of tests Work around the problem the dmsetup table/info may return error by using dmtable and dminfo function that will use 'should'. (Error happens when some concurently running process removes table entry while dmsetup command resolves table entries inside the loop.)
* Improve teardown_devsZdenek Kabelac2012-03-231-8/+10
| | | | | Try to avoid start of dmeventd during vgremove if the code has any bug inside.
* Update testing scriptsZdenek Kabelac2012-03-203-106/+122
| | | | | | | | | Make the teardown really usable - it will try down to remove all the left devices even from previous test runs (the only missing piece is probably proper mdadm teardown) Add few more local vars Try to setup PATH and LD_LIBRARY_PATH just once. Try shorter sleeps.
* Regression fix kernel version checkZdenek Kabelac2012-03-161-1/+1
| | | | got changed improperly with large update patch.
* Longer sleep after clvmd startZdenek Kabelac2012-03-161-3/+3
|
* Switch condition for dmeventd checkZdenek Kabelac2012-03-161-1/+1
|
* Update test.sh check.sh utils.sh get.shZdenek Kabelac2012-03-164-368/+342
| | | | | | | | | | | | Indent Better shell usage Function simplification More usage of 'get' functions Don't use valgrind tracing for check and get function (faster) Update shell debugging (PS4, better stacktrace) Support paths with spaces Export SCRIPTNAME for external usage Watch for dmeventd unexpectedly started during test
* Update aux.sh lvmwrapperZdenek Kabelac2012-03-162-208/+235
| | | | | | | | | | | | | | | | | | | Indent Add valgrind support: env LVM_TEST_VALGRIND={0123} (the higher level, more commands tested) env LVM_TEST_CLVMD=1 runs clvmd within valgrind. env VALGRIND script name executed for each lvm command (def. is valg). Smarted teardown - should minimize occurence of left dev entries (using dmsetup remove -f only as last resort) sort removed devices by open count before actual removal Use "" around string that may contain spaces. Set log/verbose and activation/retry_deactivation to defined value. Remove debug.log after successful lvm command (easier to check output).
* Test suite skip md_detectionZdenek Kabelac2012-03-161-0/+1
| | | | | Not normally needed - lets' enable it only for test that really needs it.
* Allow to use also special prefixed names for testZdenek Kabelac2012-03-161-2/+2
| | | | | | | | | | | | | | | | | Currently we could not test special prefixes in our test suite. As teardown will not find such device and basicaly busyloops here, as at cannot remove such names. This patch adds possibity to use: vgcreate V_$vg1 $dev Note: you still need to use $PREFIX somewhere in the name. (And of course, it's really bad idea to use $PREFIX (=LVMTEST) for normally used LVs) The only purpose of this patch is to allow testing cluster with special vg names that begins with V_ , P_....
* Improve harness codeZdenek Kabelac2012-03-121-21/+85
| | | | | | | Support timestamping with harness - using VERBOSE=2 Fix also logging in several situation (i.e. continue logging multiple test in VERBOSE mode, do not coredump with empty output).
* Change pvscan --cache syntaxAlasdair Kergon2012-03-061-1/+1
|
* Change pvscan --lvmetad to pvscan --cache.Alasdair Kergon2012-03-021-1/+1
|
* Make the calls to pvscan --lvmetad in the testsuite slightly more civilised.Petr Rockai2012-02-231-2/+8
|
* The lvmetad client-side integration. Only active when use_lvmetad = 1 is set inPetr Rockai2012-02-231-2/+6
| | | | lvm.conf *and* lvmetad is running.
* Run tests with lvmetad if we have it.Petr Rockai2012-02-152-2/+10
|
* In the test harness, do the back-substitution (@TESTDIR@, @PREFIX@) also on thePetr Rockai2012-02-151-2/+10
| | | | live VERBOSE output, not just the post-mortem dumps.
* If clvmd is not started, die test instead of skipping itZdenek Kabelac2012-01-261-3/+3
|
* Use a more canonic regex escaping in the default lvm.conf file for testing.Petr Rockai2011-12-121-1/+1
|
* Cleanup files from testingZdenek Kabelac2011-11-231-1/+1
| | | | | | Cleanup generated files from coverage testing. Do not skip standard .o compilation for lib/not and lib/harness. Make a bit longer string in harness to fit new shell/ in.
* Add generic function to check for target versionZdenek Kabelac2011-11-101-0/+33
| | | | | | | So the test script may use a simple line like i.e.: aux target_at_least dm-thin-pool 1 0 0 || skip aux target_at_least snapshot-origin 1 6 || skip
* Do not repeat a failed test's output when VERBOSE is in effect.Petr Rockai2011-11-071-3/+5
|
* Used device name instead of device pathZdenek Kabelac2011-10-231-1/+2
| | | | | Udev is tricky here - since with udev the node does not exists until it resume happens. So we need to resume devices via its name.
* Do not make link in the real /devZdenek Kabelac2011-10-231-1/+1
| | | | Skip trying to make link when real /dev dir is used for test.
* Allow overwrite for VERIFY_UDEVZdenek Kabelac2011-09-241-3/+3
| | | | | | | | | When running tests it might be useful to have an override option when testing on real /dev and some broken system (i.e. Debian and its rules). So one can use: LVM_TEST_DEVDIR=/dev LVM_VERIFY_UDEV=1 make check
* Avoid sending garbage to terminal in verbose mode.Zdenek Kabelac2011-09-241-5/+6
| | | | | | When read in drain returned <0 value, terminal content has been trashed. Remove unneeded memset() and use whole buffer. Free readbuf before exit (valgrind).
* Detect unusable nodes on fsZdenek Kabelac2011-09-242-4/+9
| | | | | | | | | | | | Test whether nodes could be used on given filesystem where TMP dir is being used and skip teardown quicker in fail case. (makes the problem quickly obvious if you try to such fs). Skip teardown_dev if we have not created any devs yet. and do not mkdir /dev/mapper dir when LVM_TEST_DEVDIR is set. Drop this test from t-000-basic.sh.
* Updated testing scriptZdenek Kabelac2011-09-091-4/+4
| | | | Since attrs were extended by 2 new fields update check functions.
* Do not call prepare_lvmetad just yet in tests.Petr Rockai2011-08-311-1/+0
|
* A compromise integration of LVMetaD into the build: I have kept all thePetr Rockai2011-08-312-0/+17
| | | | | | | | | | daemon/common code in a single libdaemon.a, which is completely private. This is currently linked into the lvmetad binary, and will be linked into LVM (the client part, since static linking only picks up only symbols that are actually used). I have also added --enable/disable-lvmetad to ./configure; although the current default is off, I expect this to be flipped to on shortly. There's no LVM-side support yet, but when there is, even when built, it'll still need to be enabled by an lvm.conf option.
* Add detect_internal_vg_cache_corruption to lvm.confZdenek Kabelac2011-08-111-0/+1
| | | | | | | | | | | Add config option to enable crc checking of VG structures. Currently it's disabled by default. For the internal test-suite this check it is enabled. Note: In the case the internal error is detected, debug build with compile option DEBUG_ENFORCE_POOL_LOCKING helps to catch the source of the problem.
* Increase timeout for udev settleZdenek Kabelac2011-07-081-1/+1
| | | | | For some unknown reason (atm) udev settle takes longer time on recent rawhide. To pass the test - inrease the settle timeout.
* Add framework for validation of ioctls. Doesn't do any checks yet.Alasdair Kergon2011-07-011-0/+1
| | | | | | dmsetup --checks libdevmapper: dm_task_enable_checks() lvm.conf: activation/checks=1
* use remove -fAlasdair Kergon2011-06-301-1/+1
|
* teardown stray filesystems tooAlasdair Kergon2011-06-301-24/+37
|
* Use -f to remove deviceZdenek Kabelac2011-06-301-2/+2
| | | | | | | | | Since some test may leave devices in suspend mode which would require carefull order of resume operation - use '-f' to replace them with error targets For disable_dev - when 'error' target is used for open count - treat return code as ok (|| true) to avoid breaking futher test processing.
* Try to force remove dm devices in after test fails.Milan Broz2011-06-301-0/+21
|
* Try to remove any stray loop devices left behind by earlier aborted tests.Alasdair Kergon2011-06-301-4/+7
|
* test attempt to remove stray loop devsAlasdair Kergon2011-06-302-2/+6
|
* Add age filter to dmsetup udevcomplete_all to minimise concurrency problems.Alasdair Kergon2011-06-291-1/+3
|
* make udev teardown conditional on using udevAlasdair Kergon2011-06-292-1/+7
|
* teardown aborts if it hits an error, so better teardown semaphores earlierAlasdair Kergon2011-06-291-3/+3
| | | | as we need them later in the teardown process
* print any loop devs that weren't torn downAlasdair Kergon2011-06-291-0/+3
|
* remove any stray semaphores after tearing down devsAlasdair Kergon2011-06-291-0/+3
|
* Add uuids to dmsetup create cmds.Alasdair Kergon2011-06-291-3/+3
|
* use dmsetup remove -f as a better way of simulating a device "disappearing"Alasdair Kergon2011-06-291-5/+1
|
* Change to still sync with udev (to test waiting for rules) then to verify udevAlasdair Kergon2011-06-281-3/+4
| | | | | operations like it used to (which will perform them on systems with non-std dev dirs where test udev rules aren't installed).