summaryrefslogtreecommitdiffstats
path: root/tests (follow)
Commit message (Collapse)AuthorAgeFilesLines
* test: Don't use dev6 and dev7 together in a non-multipath testNeilBrown2011-03-281-2/+2
| | | | | | | | | 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-281-0/+1
| | | | | | | | 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-282-9/+8
| | | | | | | 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>
* tests: use /tmp/mdadm.conf rather than /etc/mdadm.conf.NeilBrown2011-03-241-4/+4
| | | | | | Modifying /etc/mdadm.conf for testing is just wrong. Signed-off-by: NeilBrown <neilb@suse.de>
* FIX: Tests: raid0->raid10 without degradationKrzysztof Wojcik2011-03-243-13/+4
| | | | | | | | | | | | | | | 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-141-2/+6
| | | | | | | | | | | 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-132-1/+23
| | | | | | | | 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-093-5/+5
| | | | | | | | | | | 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-091-1/+1
| | | | | | | | | | | | | | | | | | | 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-081-3/+69
| | | | | | | | | | | | | | | | | | | | | | | | 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-012-0/+2
| | | | Signed-off-by: NeilBrown <neilb@suse.de>
* test: remove all the environment handling.NeilBrown2011-02-0183-269/+248
| | | | | | | 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-311-4/+4
| | | | | | | | | 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-311-0/+2
| | | | | | | | | 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-2676-0/+987
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-011-0/+1
| | | | | | 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-11-301-0/+3
| | | | Signed-off-by: NeilBrown <neilb@suse.de>
* Spare migration testsAnna Czarnowska2010-11-283-0/+584
| | | | | | | | | 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-221-0/+1
| | | | | | | | | 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-051-1/+7
| | | | | | | | | | 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-051-0/+2
| | | | | | some udev activity was interfering with the partitioning. Signed-off-by: NeilBrown <neilb@suse.de>
* Fix test for imsm prodigal member scenarioNeilBrown2010-08-051-5/+5
| | | | | | | | | | 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-291-1/+1
| | | | | | | 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-1016-31/+32
| | | | | | | 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-1710-11/+11
| | | | | | | | | 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-1731-89/+94
| | | | | | | | | 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-1718-38/+38
| | | | | | | | | | | 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-223-4/+82
|\
| * testreshape5 fixes.NeilBrown2009-10-191-1/+2
| | | | | | | | | | | | 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-191-0/+3
| | | | | | | | | | | | | | 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-191-4/+4
| | | | | | | | | | | | | | 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-191-2/+2
| | | | | | | | | | | | ddf-zero-restart was misspelled. Signed-off-by: NeilBrown <neilb@suse.de>
| * imsm: regression test for prodigal array member scenarioDan Williams2009-10-142-0/+78
| | | | | | | | | | | | | | | | 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-161-0/+3
| | | | | | | | | | | | | | 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-164-3/+154
| | | | | | | | | | | | 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-121-0/+56
| | | | | | | | Signed-off-by: NeilBrown <neilb@suse.de>
* | Test level changes and related reshaping.NeilBrown2009-10-121-0/+51
| | | | | | | | Signed-off-by: NeilBrown <neilb@suse.de>
* | testreshape5 - add tests for RAID6NeilBrown2009-10-121-5/+12
|/ | | | | | .. to make sure our raid6 calculations are working. Signed-off-by: NeilBrown <neilb@suse.de>
* testreshape5 - flush devices between tests.NeilBrown2009-09-251-0/+1
| | | | | | We need to flush the block devices before reading different data. Signed-off-by: NeilBrown <neilb@suse.de>
* tests: basic ddf testsNeilBrown2009-04-141-0/+76
| | | | | | | 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-142-0/+82
| | | | | | 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-011-2/+3
| | | | | 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-233-4/+156
| | | | | | | | | | | 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-093-0/+94
| | | | Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* tests/06name: adjust for homehostNeilBrown2008-11-041-2/+2
| | | | | | | 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-182-0/+14
| | | | | | | | | | | | | 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-273-8/+9
| | | | | Don't use '$mdadm', just 'mdadm'. And --stop all arrays when finished.
* Add test for stoping and restarting a raid5 reshape.Neil Brown2008-06-271-0/+33
| | | | | 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-201-0/+23
| | | | | | | | 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-151-0/+7
| | | | ....as this cannot work.