summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAge
...
* tests: use /tmp/mdadm.conf rather than /etc/mdadm.conf.NeilBrown2011-03-24
| | | | | | Modifying /etc/mdadm.conf for testing is just wrong. Signed-off-by: NeilBrown <neilb@suse.de>
* FIX: Tests: raid0->raid10 without degradationKrzysztof Wojcik2011-03-24
| | | | | | | | | | | | | | | raid0->raid10 transition needs at least 2 spare devices. After level changing to raid10 recovery is triggered on failed (missing) disks. At the end of recovery process we have fully operational (not degraded) raid10 array. Initialy there was possibility to migrate raid0->raid10 without recovery triggering (it results degraded raid10). Now it is not possible. This patch adapt tests to new mdadm's behavior. Signed-off-by: Krzysztof Wojcik <krzysztof.wojcik@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
* imsm: FIX: existing backup file fails unit testsAdam Kwolek2011-03-15
| | | | | | | | | | | During normal test execution, backup file is deleted after test execution. If test is interrupted/broken, backup file can remain for next run. When backup file exists before unit test run, suits 12 and 13 fails. To avoid this remove backup file before grow is executed. Signed-off-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
* imsm: Test for raid1 -> raid0 takeover addedKrzysztof Wojcik2011-02-14
| | | | | | | | Patch introduces test for raid1 to raid0 takeover operation verification for imsm metadata format. Signed-off-by: Krzysztof Wojcik <krzysztof.wojcik@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
* UT FIX: Pass all UT in suit 13Adam Kwolek2011-02-09
| | | | | | | | | | | Parameters in UT suit 13 were wrongly chosen. This causes that computed number of backup blocks was too big comparing to loop devices size used in test. Changes in test parameters (chunk, array size) causes that backup blocks passes mdadm condition for very small loop devices. Signed-off-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
* UT FIX: imsm container can have different blocks numberAdam Kwolek2011-02-09
| | | | | | | | | | | | | | | | | | | When imsm container is created it have different blocks number in /proc/mdstat depending on containing array raid level (raid0/raid5). raid5 case: md127 : inactive sdd[3](S) sde[2](S) sdc[1](S) sdb[0](S) 2884 blocks super external:imsm raid0 case: md127 : inactive sdd[3](S) sde[2](S) sdc[1](S) sdb[0](S) 836 blocks super external:imsm Due to this, it cannot be compared to one value for both cases. Test imsm container existence before unit test run only. Signed-off-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
* Spare migration tests updatedCzarnowska, Anna2011-02-08
| | | | | | | | | | | | | | | | | | | | | | | | Added tests for cases when: 0 - there is no config file at all 0a - config file has no domains defined 9a - spare is in global domain 15 - spare is in global domain for $platform metadata Test 4 pass condition changed for imsm metadata. disk_policy only adds controller domain for imsm when config_rules_has_path=1. If there are any domains in config then every disk will have also a controller domain. As a result the array needing spares has at least one controller domain even when it doesn't have any other domains specified explicitly. In this case any spare in the same controller domain matches when it has no other domains from config. (This behaviour is different from the case when there is no paths in config at all as array domain then is null and no spare matches) Signed-off-by: Anna Czarnowska <anna.czarnowska@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
* tests: add IMSM_NO_PLATFORM to some places that were missing it.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>
* 11spare-migration: pass conditions for tests 9 and 12 should be reversedLabun, Marcin2011-01-31
| | | | | | | | | Test 9: We do not block spare migration between different metadatas. test 13: Migrated spare must belong the same domain as destination - there is no additional condition for action. Signed-off-by: Marcin Labun <marcin.labun@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
* env-11spare-migration: imsm requires IMSM_NO_PLATFORM set with loop devicesLabun, Marcin2011-01-31
| | | | | | | | | By default IMSM checks if member device belongs to AHCI or ISCI controller. When using loop devices one must disable these checks by setting IMSM_NO_PLATFORM. Signed-off-by: Marcin Labun <marcin.labun@intel.com> 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>
* Create: report failure if array cannot be started.NeilBrown2010-12-01
| | | | | | We weren't checking the result of writing 'active' to array_state Signed-off-by: NeilBrown <neilb@suse.de>
* ddf: fail creation of new subarray with same name as old.NeilBrown2010-12-01
| | | | 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>
* Manage: be more careful about --add attempts.NeilBrown2010-11-22
| | | | | | | | | If an --add is requested and a re-add looks promising but fails or cannot possibly succeed, then don't try the add. This avoids inadvertently turning devices into spares when an array is failed but the devices seem to actually work. Signed-off-by: NeilBrown <neilb@suse.de>
* Fix writing of second backup superblock during growNeilBrown2010-08-05
| | | | | | | | | | There 'rv' tests were confused and sometimes wrong. This resulted in not writing the second bsb. Also fix the test script so the the critical section is long enough that we have some hope of interrupting it. Signed-off-by: NeilBrown <neilb@suse.de>
* udevadm settle in autodetect testNeilBrown2010-08-05
| | | | | | some udev activity was interfering with the partitioning. Signed-off-by: NeilBrown <neilb@suse.de>
* Fix test for imsm prodigal member scenarioNeilBrown2010-08-05
| | | | | | | | | | The 'container_enough' changes fliped the default from assembling an array as soon as we possibly could, to assembling only when all expected devices are present. This broken 09imsm-assemble which expects the original default. So change from "-I" to "-IR" to restore the expected behaviour. Signed-off-by: NeilBrown <neilb@suse.de>
* Fix tests/layoutsNeilBrown2010-07-29
| | | | | | | some attributes files now return "new (old)", so allow for that when reading the attr file. 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>
* Set default bitmap-chunksize for internal bitmaps to at least 64MegNeilBrown2009-11-17
| | | | | | | | | A small bitmap-chunksize hurts performance without helping resync speed much - particularly on internal bitmaps. So set the default to at least 64Meg. 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>
* Increase default chunk size to 512KNeilBrown2009-11-17
| | | | | | | | | | | This seems more appropriate for current (and recent) model drives than 64K. 64K is still the default for '--build' as changing that could corrupt data. 64K is also the default rounding for 'linear' on kernels older than 2.6.16. Signed-off-by: NeilBrown <neilb@suse.de>
* Merge branch 'master' into devel-3.1NeilBrown2009-10-22
|\
| * testreshape5 fixes.NeilBrown2009-10-20
| | | | | | | | | | | | We seem to need a 'udevadm settle', and possibly the 'sync'.. Signed-off-by: NeilBrown <neilb@suse.de>
| * tests/imsm: allow for rounding of array size.NeilBrown2009-10-20
| | | | | | | | | | | | | | IMSM rounds array size to a multiple of 1024K, so our tests must assume this. Signed-off-by: NeilBrown <neilb@suse.de>
| * test/ddf: don't insist that mdadm.conf is always in the same order.NeilBrown2009-10-19
| | | | | | | | | | | | | | When created by different process, the order could reasonably be different. So sort before compare Signed-off-by: NeilBrown <neilb@suse.de>
| * test/raid6integ: correct typeNeilBrown2009-10-19
| | | | | | | | | | | | ddf-zero-restart was misspelled. Signed-off-by: NeilBrown <neilb@suse.de>
| * imsm: regression test for prodigal array member scenarioDan Williams2009-10-13
| | | | | | | | | | | | | | | | Provide a test to sanity check assembly and reassembly in the presence of conflicting family number information. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | 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 changelevel: add tests for changing degraded arrays.NeilBrown2009-10-12
| | | | | | | | Signed-off-by: NeilBrown <neilb@suse.de>
* | Test level changes and related reshaping.NeilBrown2009-10-12
| | | | | | | | Signed-off-by: NeilBrown <neilb@suse.de>
* | testreshape5 - add tests for RAID6NeilBrown2009-10-12
|/ | | | | | .. to make sure our raid6 calculations are working. Signed-off-by: NeilBrown <neilb@suse.de>
* testreshape5 - flush devices between tests.NeilBrown2009-09-25
| | | | | | We need to flush the block devices before reading different data. Signed-off-by: NeilBrown <neilb@suse.de>
* tests: basic ddf testsNeilBrown2009-04-14
| | | | | | | Test script to create a ddf with three different member arrays, and assemble it in a variety of ways. Signed-off-by: NeilBrown <neilb@suse.de>
* tests: add some simple data integrity tests for raid5/raid6NeilBrown2009-04-14
| | | | | | Make sure the data is preserved even when the array is degraded. Signed-off-by: NeilBrown <neilb@suse.de>
* ism-tests: fix the imsm-create-fail-rebuild testNeilBrown2009-04-01
| | | | | it was testing the return status of mdadm wrongly, and I found I needed a 'udevadm settle'.
* imsm: provide a simulated option-rom for regression testsDan Williams2009-02-23
| | | | | | | | | | | IMSM_NO_PLATFORM turns off checks that should be tested, so provide a IMSM_TEST_OROM variable to allow testing the orom constraints in the mdadm regression suite. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: test overlapping createsDan Williams2008-12-08
| | | | Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* tests/06name: adjust for homehostNeilBrown2008-11-04
| | | | | | | Now that we set homehost by default, adjust teh 06name test accordingly. 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>
* Some more cleanup of tests.Neil Brown2008-06-27
| | | | | Don't use '$mdadm', just 'mdadm'. And --stop all arrays when finished.
* 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.
* 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.
* Don't try the auto-detect test when md_mod is a moduleNeil Brown2008-05-15
| | | | ....as this cannot work.
* Enhance raid4 support: --assemble and --monitor wasn't quite happy with it.Doug Ledford2007-07-09
| | | | | | | | | | | | | | | | | | | | | | | From: Doug Ledford <dledford@redhat.com> This one actually does a couple things. Mainly related to raid4, but kinda touches other raid levels some. When creating a raid4 array, treat it like a raid5 array in that we create it in degraded mode by default and add the last disk as a spare. Besides speeding things up, this has a second effect that it makes mdadm more consistent. In order to create a degraded raid5 array, you need only passing missing as one of the devices. For a degraded raid4 array, prior to this patch, you must pass assume-clean or else it refuses to create the array. Even force won't make it work without assume-clean. With the patch, raid4 behaves identical to raid5. Separate from that, the monitor functionality completely ignores raid4 arrays. That seems to stem from the code that checks to see if the array is part of a long list of types. It seems easier to check which array types *aren't* redundant instead of listing the ones that are redundant and missing some of them. This makes the monitor service actually watch raid4 arrays.
* Add --auto-detect for in-kernel autodetect.Neil Brown2007-05-21
| | | | This is equivalent to raidautorun that some distros provide.
* Update tests and add linear-addNeil Brown2007-05-21
| | | | | | Update the testing scripts to allow for new space calculations for space for bitmaps. Add a test script for adding devices to linear arrays.