summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAge
* tests/10ddf-fail-spare: new unit testmwilck@arcor.de2013-08-06
| | | | | | | This is Albert Pauw's latest test. Note that this FAILS. Signed-off-by: Martin Wilck <mwilck@arcor.de> Signed-off-by: NeilBrown <neilb@suse.de>
* tests/10ddf-fail-twice: remove hard-coded assumptionsmwilck@arcor.de2013-08-06
| | | | | | | | | This test has some randomness because it is not always deterministic which of the two arrays gets the spare and which remains degraded. Handle it. Signed-off-by: Martin Wilck <mwilck@arcor.de> Signed-off-by: NeilBrown <neilb@suse.de>
* tests/env-ddf-template: some helper functionsmwilck@arcor.de2013-08-06
| | | | | | | | helper functions to determine the list of devices in an array, etc. Signed-off-by: Martin Wilck <mwilck@arcor.de> Signed-off-by: NeilBrown <neilb@suse.de>
* tests/10ddf-fail-twice: New unit testmwilck@arcor.de2013-08-05
| | | | | | | This is the test by Albert Pauw. Fail 2 disks, and add one. Signed-off-by: Martin Wilck <mwilck@arcor.de> Signed-off-by: NeilBrown <neilb@suse.de>
* tests/env-ddf-template: helper for new unit testMartin Wilck2013-07-31
| | | | | | | | I forgot to check in this helper script, similar to the one for IMSM. It is needed by tests/10ddf-create-fail-rebuild. Signed-off-by: Martin Wilck <mwilck@arcor.de> Signed-off-by: NeilBrown <neilb@suse.de>
* tests/10ddf-create-fail-rebuild: new unit test for DDFMartin Wilck2013-07-31
| | | | | | | | This test adds a new unit test similar to 009imsm-create-fail-rebuild. With the previous patches, it actually succeeds on my system. Signed-off-by: Martin Wilck <mwilck@arcor.de> Signed-off-by: NeilBrown <neilb@suse.de>
* Add test for --replace handling.NeilBrown2013-07-24
| | | | Signed-off-by: NeilBrown <neilb@suse.de>
* Improve revert testsNeilBrown2013-07-24
| | | | | | | 1/ perform revert-grow on more metadata versions 2/ add revert-inplace. Signed-off-by: NeilBrown <neilb@suse.de>
* tests/10ddf-geometry: new unit testmwilck@arcor.de2013-07-22
| | | | | | Test various RAID geometries, creation and deletion of subarrays Signed-off-by: NeilBrown <neilb@suse.de>
* tests/10ddf-create: create RAID5 firstmwilck@arcor.de2013-07-22
| | | | | | | | Let the first created array be RAID5 rather than RAID0. This makes the test harder than before, because everything after the first Create has do be done indirectly through mdmon. Signed-off-by: NeilBrown <neilb@suse.de>
* test/10-ddf-create: fix commentsmwilck@arcor.de2013-07-09
| | | | | | Comments should reflect the changes in the script. Signed-off-by: NeilBrown <neilb@suse.de>
* tests/10ddf-create: add RAID 10 arraymwilck@arcor.de2013-07-08
| | | | | | | | This patch adds RAID10 support to the DDF test script. It actually passes! Signed-off-by: Martin Wilck <mwilck@arcor.de> Signed-off-by: NeilBrown <neilb@suse.de>
* tests: add test to revert shrinking reshapes.NeilBrown2013-07-04
| | | | 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>
* tests/raid6repair: default data offset has changed.NeilBrown2013-06-27
| | | | | | So the test scripts must change too. Signed-off-by: NeilBrown <neilb2suse.de>
* tests: add device size tests when change raid leve to/from 0NeilBrown2013-06-25
| | | | | | There was a kernel bug that got this wrong, so better check for it. 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>
* test/00names: use appropriate mdadm.confNeilBrown2013-06-24
| | | | | | | Using non-numeric names needs an mdadm.conf setting, so make sure we have one. Signed-off-by: NeilBrown <neilb@suse.de>
* tests: add test for non-numeric device namesNeilBrown2013-06-19
| | | | Signed-off-by: NeilBrown <neilb@suse.de>
* Add test for interaction of --assemble with --incrNeilBrown2013-06-19
| | | | | | | and fix the bug that it found. The refactor of start_array() missed a test. Signed-off-by: NeilBrown <neilb@suse.de>
* Add test for --update=metadata and fix bug it found.NeilBrown2013-06-19
| | | | | | We were not setting device size correctly for raid0. Signed-off-by: NeilBrown <neilb@suse.de>
* tests: rearrange sometest groupings.NeilBrown2013-06-19
| | | | | | | All 'update' tests in 04 More imsm tests in 09 Signed-off-by: NeilBrown <neilb@suse.de>
* Remove lots of unnecessary white space.NeilBrown2013-06-19
| | | | | | | Now that I am using white-space mode in Emacs I can see all of this, and I don't like it :-) Signed-off-by: NeilBrown <neilb@suse.de>
* tests: zero devices before --adding them.NeilBrown2013-05-01
| | | | | | | | Linux 3.10 will allow more "--add" to be handled as "--re-add". To be sure the tests work correctly we sometimes need to zero the device to ensure it really is an --add that happens. Signed-off-by: NeilBrown <neilb@suse.de>
* tests/10ddf-create: omit log output checkmwilck@arcor.de2013-04-23
| | | | | | | | | The test script was counting output lines - its expectations don't match the current code any more. Remove this pointless test. Signed-off-by: Martin Wilck <mwilck@arcor.de> 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>
* Tests: adjust for recent changes.NeilBrown2012-11-20
| | | | | | | | | | | | commit cb19a251a581fe78dcddd1d95dca4d8cb7664819 super1: reserve at least 2 chunks for reshape headroom. reserved more space in a RAID5, so we need to update to array sizes when reshaping. Also make sure reshape tests we change the shape: raid5->raid1 was failing and we didn't notice. Signed-off-by: NeilBrown <neilb@suse.de>
* Fix tests sh too many arguments warningsGilles Espinasse2012-10-11
| | | | | | | | Signed-off-by: Gilles Espinasse <g.esp@free.fr> Add quotes on if [ $sum != $sum1 ] Fix 2 typo /sh1sum/sha1sum/ /matc /match / Signed-off-by: NeilBrown <neilb@suse.de>
* raid6check: Auto-repair modeRobert Buchholz2012-09-10
| | | | | | | | When calling raid6check in regular scanning mode, specifiying "autorepair" as the last positional parameter will cause it to automatically repair any single slot failes it identifies. Signed-off-by: NeilBrown <neilb@suse.de>
* raid6check: Repair mode used geo_map incorrectlyRobert Buchholz2012-09-10
| | | | | | | | | In repair mode, the data block indices to be repaired were calculated using geo_map() which returns the disk slot for a data block index and not the reverse. Now we simply store the reverse of that calculation when we do it anyway. Signed-off-by: NeilBrown <neilb@suse.de>
* 07reshape5intr: Set speed_limit_min to be able to reduce resync speed below 1000Jes Sorensen2012-08-13
| | | | | | | | We need to set speed_limit_min accordingly, otherwise setting speed_limit_max below 1000 will have no effect. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de>
* tests/03r5assemV1: reduce sync speed further.NeilBrown2012-08-13
| | | | | | | | | | | | This test is quite sensitive to resync speed - if the resync happens to quickly it fails because it sees aan optimal array when it expects a degraded array. 1000 is often slow enough but now always, so slow it down even more. This requires reducing speed_limit_min also as kernel ignores 'max' when speed is below 'min'. Reported-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de>
* Repair mode for raid6Robert Buchholz2012-07-09
| | | | | | | | | | | | | | | | In repair mode, raid6check will rewrite one single stripe by regenerating the data (or parity) of two raid devices that are specified via the command line. If you need to rewrite just one slot, pick any other slot at random. Note that the repair option will change data on the disks directly, so both the md layer above as well as any layers above md (such as filesystems) may be accessing the stripe data from cached buffers. Either instruct the kernels to drop the caches or reassemble the raid after repair. Signed-off-by: NeilBrown <neilb@suse.de>
* New tests testing removal of internal bitmapsJes Sorensen2012-05-30
| | | | | | | | To match the add-bitmap tests, here is a set of tests checking the removal of bitmaps. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de>
* New tests testing the addition of bitmapsJes Sorensen2012-05-30
| | | | | | | | | | This set of tests verifies that it is possible to add an internal bitmap to an existing array, and that the device can be written to after the bitmap is added. This should catch cases such as the one fixed by 4474ca42e2577563a919fd3ed782e2ec55bf11a2 Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de>
* Increase minimum chunk size in testsuite to 64kBAnton Blanchard2012-05-24
| | | | | | | | | | | When running the mdadm testsuite on ppc64 with a 64kB page size I see a couple of failures because the chunk size is smaller than a page. Bump the chunksize to 64kB to fix these failures. Signed-off-by: Anton Blanchard <anton@samba.org> 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>
* Fix tests/05r1-re-add-nosupperNeilBrown2012-03-22
| | | | | | | This shouldn't have been changed when we size of RAID1 arrays was changed, as this uses 'build', not 'create' Signed-off-by: NeilBrown <neilb@suse.de>
* Create: round off size for RAID1 arrays.NeilBrown2012-03-22
| | | | | | | | | | | RAID1 arrays don't have a chunk size, but if you ever convert one to RAID5 you will need at least a small one >= 4K. So round of size to a multiple of 64K. This only affect Create, not "--grow --size=max". The latter is too hard and with smaller returns. Signed-off-by: NeilBrown <neilb@suse.de>
* tests/03r5assemV1 - slow down recovery a bit more.NeilBrown2011-12-23
| | | | | | | | | | In this test we stop and restart an array that is being recovered, and we do that several times. Sometimes it completes the recovery before we expect and test results are wrong. So slow it down a bit more. Signed-off-by: NeilBrown <neilb@suse.de>
* More fixes for tests.NeilBrown2011-06-16
| | | | | | Some more fixes to help some tests run properly. Signed-off-by: NeilBrown <neilb@suse.de>
* test/ddf add a udevadm settleNeilBrown2011-06-15
| | | | | | We need to settle udev before assuming the devices exist. Signed-off-by: NeilBrown <neilb@suse.de
* Remove more duplicated codeNeilBrown2011-06-15
| | | | | | | Code from env-imsm-template is also in 09imsm-create-fail-rebuild, so remove it from there. Signed-off-by: NeilBrown <neilb@suse.de>
* tests/08imsm-overlap - remove duplicated codeNeilBrown2011-06-15
| | | | | | | This test contains a lot of code that is also in env-imsm-template. So remove it and simple source the other. Signed-off-by: NeilBrown <neilb@suse.de>
* Fix imsm-overlap test.NeilBrown2011-06-15
| | | | | | | | | Now that we reserve space for migration buffer devices are a little bit smaller so we need to allow for that in the test suite. Also add a 'udevadm settle' - it seems to help Signed-off-by: NeilBrown <neilb@suse.de>
* imsm: Unit Tests - remove backup-file during grow commandAdam Kwolek2011-06-08
| | | | | | | | Update reshape/migration unit tests to not to use backup file. Imsm native check-pointing has to be used (internally) instead. Signed-off-by: Krzysztof Wojcik <krzysztof.wojcik@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
* test: Don't use dev6 and dev7 together in a non-multipath testNeilBrown2011-03-28
| | | | | | | | | dev6 and dev7 refer to the same storage and are used for multipath testing. So using them both in any other test will be confusing. So change 11spare-migration test 5 to use dev10 rather than dev7 Signed-off-by: NeilBrown <neilb@suse.de>
* tests: Make sure config file is empty when required.NeilBrown2011-03-28
| | | | | | | | We need to have no config at all for this test so make sure it is empty. Reported-by: Anna Czarnowska <anna.czarnowska@intel.com> 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>