summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
* test: allow LVM volumes or RAM disks as test devicesmwilck@arcor.de2013-08-06
| | | | | | | | | | | | | | Allow other device types for testing; this allows to test on a larger variety of devices. Option --dev=[loop|lvm|ram] selects loop device (default), lvm, and ram disk, respecively. To use RAM disks with DDF, the kernel parameter ramdisk_size=65536 must be used. For LVM, use --volgroup=<vg> to specify the name of the volume group in which the test LVs will be created. Signed-off-by: Martin Wilck <mwilck@arcor.de> Signed-off-by: NeilBrown <neilb@suse.de>
* test: ensure testing uses correct mdmonNeilBrown2013-08-05
| | | | | | | | | When testing we want to run mdmon directly, not use systemctl to get systemd to run it. So allow an environment variable to make that choice. Signed-off-by: NeilBrown <neilb@suse.de>
* test: increase number of devices to 13mwilck@arcor.de2013-07-22
| | | | | | extended DDF/RAID10 tests need 6 disks for DDF. Signed-off-by: NeilBrown <neilb@suse.de>
* test: allow resync/reshape etc to go faster.NeilBrown2013-07-11
| | | | | | | | Whenever we "check wait" - make the resync process go at full speed. Also allow script to adjust it manually. Signed-off-by: NeilBrown <neilb@suse.de>
* tests: add a test for reverting reshapesNeilBrown2013-07-04
| | | | | | Only reverting reshapes that grow the array so far. Signed-off-by: NeilBrown <neilb@suse.de>
* test: include any 'stderr' output in the log file.NeilBrown2013-07-02
| | | | | | | Errors from mdadm go to 'stderr', so if there is an array, copy those to the log file. Signed-off-by: NeilBrown <neilb@suse.de>
* tests: add test for converting levels to raid0 and back.NeilBrown2013-06-24
| | | | | | | Now that I have this mostly working, I should make sure it doesn't break... Signed-off-by: NeilBrown <neilb@suse.de>
* Keep track on which kernel the test suite has runGilles Espinasse2012-11-20
| | | | | Signed-off-by: Gilles Espinasse <g.esp@free.fr> Signed-off-by: NeilBrown <neilb@suse.de>
* test: remove unnecessary bash-ism.NeilBrown2012-11-20
| | | | | | | Bash allows '-' in function names, but other shells don't. So use '_' - always safe. Signed-off-by: NeilBrown <neilb@suse.de>
* test: add --disable-integrity switch.NeilBrown2012-11-20
| | | | | | | The integrity tests are very slow and aren't always needed. So make them optional. Signed-off-by: NeilBrown <neilb@suse.de>
* test: keep separate log file for each failed test.NeilBrown2012-10-23
| | | | | | | | If a test failed when --keep-going is selected, give the log file a name based on the test name, so that all the logs can be examined afterwards. Signed-off-by: NeilBrown <neilb@suse.de>
* test: redirect all output to log file to keep output cleanGilles Espinasse2012-10-23
| | | | | | | | If a test sent anything to stdout, it would not get logged, and would mess up the listing of test status. Signed-off-by: Gilles Espinasse <g.esp@free.fr> Signed-off-by: NeilBrown <neilb@suse.de>
* Replace --no-error by --keep-goingGilles Espinasse2012-10-22
| | | | | | | | Suggest to replace by the option name that 'make' use. no error is only a developper hope. Signed-off-by: Gilles Espinasse <g.esp@free.fr> Signed-off-by: NeilBrown <neilb@suse.de>
* Allow escape by ctrl-c broken by --no-error changeGilles Espinasse2012-10-22
| | | | | Signed-off-by: Gilles Espinasse <g.esp@free.fr> Signed-off-by: NeilBrown <neilb@suse.de>
* Make test a bash script (as it is)Robert Buchholz2012-07-09
| | | | Signed-off-by: NeilBrown <neilb@suse.de>
* Fix --no-error in test scriptJes Sorensen2012-05-30
| | | | | | | | | | | b8e91a32cdaa2a6dea8b0dd54365ede33d5a9a60 was applied incorrectly. It changed the name of the variable set when specifying --no-error, without changing the places checking it. Set it back as it was to make --no-error work correctly again. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de>
* Move setup code to a function and introduce matching cleanup argumentJes Sorensen2012-05-28
| | | | | Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de>
* Improve --help message from testJes Sorensen2012-05-28
| | | | | Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de>
* Add --no-error argument to 'test'Jes Sorensen2012-05-28
| | | | | | | | This allows the test suite to run to completion even if one test fails. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de>
* Add support for saving log files in test scriptJes Sorensen2012-05-28
| | | | | | | | --logdir= specifies where to save, if different from default, and --save-logs tells test to save all log files. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de>
* Add command line argument parsing to 'test' sriptJes Sorensen2012-05-23
| | | | | | | | | | This adds more generic command line argument parsing to the test script. It also introduces a couple of new options, while preserving the old '<prefix>' and 'setup' arguments. The new options are --disable-multipath and --tests=<test1>,<test2>,... Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de>
* Check for multipath module before running multipath testsJes Sorensen2012-05-23
| | | | | | | | Some systems do not ship the md multipath module. If not available simply skip any multipath tests. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de>
* Update some device sizes for self tests.NeilBrown2012-05-18
| | | | | | | | A recent change means that devices smaller than 1Gig no longer have 1Meg wasted at the start. So we must adjust some sizes again. Signed-off-by: NeilBrown <neilb@suse.de>
* test: don't worry too much about array size.NeilBrown2012-05-03
| | | | | | | | With different amounts of space being reserved for metadata it is hard for the script to know how big the array should be. So allow a bit of slack. Signed-off-by: NeilBrown <neilb@suse.de>
* tests: use $config to store test config pathCzarnowska, Anna2011-03-28
| | | | | | | We also need to tell Monitor where to look for Policy in 11spare-migration tests Signed-off-by: Anna Czarnowska <anna.czarnowska@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
* test: call "udevadm settle" after stopping array.NeilBrown2011-03-22
| | | | | | | | If we don't do this, then the unlink from /dev might happen after the next step in the test creates something in /dev, and device names seem to go missing. Signed-off-by: NeilBrown <neilb@suse.de>
* test: remind where the log file is.NeilBrown2011-02-01
| | | | Signed-off-by: NeilBrown <neilb@suse.de>
* test: remove all the environment handling.NeilBrown2011-02-01
| | | | | | | Instead, just include the environ explicitly in the test file or, where shared, source the shared file. Signed-off-by: NeilBrown <neilb@suse.de>
* Allow test to detect 'resync=DELAYED' stateNeilBrown2011-01-31
| | | | | | | There is no space around the '=' when resync is delayed, so allow for that in pattern matching. Signed-off-by: NeilBrown <neilb@suse.de>
* Enable tests for OLCE, takeover, migrations for imsm metadataKrzysztof Wojcik2010-12-26
| | | | | | | | | | | | | | | | | | | | | | | | | | Patch provides set of tests for On-line Capacity Expansion, takeover, migrations operations for imsm metadata type. Tests are grouped by operation type: 12 - On-line Capacity Expansion on one volume 13 - On-line Capacity Expansion on two volumes 14 - Negative tests for takeover, migrations 15 - Chunk size migrations 16 - raid0 -> raid5, raid5 -> raid0 migrations 18 - takeover operations To run particular test group, following command should be executed: (from mdadm's source code root directory) ./test <group number> Example: To run On-line Capacity Expansion on one volume tests: ./test 12 Tests execution results: - In case of test pass, "succeeded" word is printed on console - If test is failed, "FAILED" word is printed on console and logs are stored in <mdadm-root-dir>/tests/log/ directory Signed-off-by: Artur Wojcik <artur.wojcik@intel.com> Signed-off-by: Krzysztof Wojcik <krzysztof.wojcik@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
* Spare migration testsAnna Czarnowska2010-11-29
| | | | | | | | | This is a series of tests checking if mdadm Monitor migrates spares according to rules in /etc/mdadm.conf defined by POLICY lines. Signed-off-by: Anna Czarnowska <anna.czarnowska@intel.com> Signed-off-by: Marcin Labun <marcin.labun@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
* tests: adjust sizes for new defaultsNeilBrown2010-03-10
| | | | | | | Default metadata type is now 1.2, and we sometimes add extra alignment before the data section, so adjust tests for these changes. Signed-off-by: NeilBrown <neilb@suse.de>
* Change default metadata from 0.90 to 1.1NeilBrown2009-11-17
| | | | | | | | | 1.1 is more flexible in a number of ways and is safer. 0.90 is still fully supported. 1.0 should possibly be used for RAID1 arrays that you want to boot off, depending on your boot loader. Signed-off-by: NeilBrown <neilb@suse.de>
* tests/imsm: allow for rounding of array size.NeilBrown2009-10-16
| | | | | | | IMSM rounds array size to a multiple of 1024K, so our tests must assume this. Signed-off-by: NeilBrown <neilb@suse.de>
* Test different r5/r6 layouts.NeilBrown2009-10-16
| | | | | | Make sure kernel and restripe agree on all different layouts. Signed-off-by: NeilBrown <neilb@suse.de>
* Test level changes and related reshaping.NeilBrown2009-10-12
| | | | Signed-off-by: NeilBrown <neilb@suse.de>
* test: minor fixesNeilBrown2009-04-07
| | | | | | | | - allow core files to be dumped. - modprobe md_mod if needed to write to /sys/module/md_mod/parameters/.... Signed-off-by: NeilBrown <neilb@suse.de>
* test: support testing DDFNeilBrown2009-04-06
| | | | | | | | DDF requires larger devices as 32Meg is reserved. So allocated larger loop devices for DDF tests. Signed-off-by: NeilBrown <neilb@suse.de>
* test: return correct error status for mdadmNeilBrown2009-04-01
| | | | | mdadm's return status is being hidden by the 'test' script so individual tests cannot see it.
* test: fix a call to udevsettleDan Williams2009-02-23
| | | | | | | udevsettle is deprecated, use udevadm settle Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* workaround a hald interaction and quiet cleanupDan Williams2008-12-08
| | | | | | | | | The 'udevadm settle' call appears to resolve: mdadm: failed to stop array /dev/md127: Device or resource busy Perhaps a running process, mounted filesystem or active volume group? Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* test: enable per-test custom environment setup/teardownDan Williams2008-12-08
| | | | Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* test: always start with a clean slate.NeilBrown2008-11-04
| | | | | | | To avoid confusion with old array, also zero superblocks before starting a test. Signed-off-by: NeilBrown <neilb@suse.de>
* test: make sure udev isn't opening a device before closing it.NeilBrown2008-11-04
| | | | | | | As we open and close so quickly, udev might still have the device open. so call udevsettle before stopping an array during testing. Signed-off-by: NeilBrown <neilb@suse.de>
* Factor out add-disk codeNeilBrown2008-09-18
| | | | | | | | | | | | | The variety of approaches to 'add_disk' are factored out into a separate function, and Incremental mode benefits by being closer to supporting the assembly of containers. Also remove the adding-to-array-data-structure out of sysfs_add_disk and into add_disk. And add some tests for --incremental mode to make sure we don't break it. Signed-off-by: NeilBrown <neilb@suse.de>
* Merge branch 'master' into from-stableNeilBrown2008-08-07
|\ | | | | | | | | | | | | Conflicts: Create.c Manage.c
| * Add test for stoping and restarting a raid5 reshape.Neil Brown2008-06-27
| | | | | | | | | | There was a kernel bug with stopping and restarting raid5 recently. So add a test to check for it.
* | Stop all arrays before running each test in regression test driver.Neil Brown2008-07-12
|/ | | | | Sometimes I forget to stop arrays at the end of scripts, and that shows errors in the next script, which is confusing.
* Fix autoassemble for stack arrays.Neil Brown2008-05-20
| | | | | | | | If you have stacked arrays, then mdadm -As --homehost=fred should work but doesn't. It gets into an infinite loop! So write some tests, and fix the bugs.
* Add --auto-detect for in-kernel autodetect.Neil Brown2007-05-21
| | | | This is equivalent to raidautorun that some distros provide.