summaryrefslogtreecommitdiffstats
path: root/tests/09imsm-assemble
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2011-02-01 04:43:59 +0100
committerNeilBrown <neilb@suse.de>2011-02-01 04:43:59 +0100
commit3cdcfda4b0d0f1cd94ab1d7e287765c82f15d4e4 (patch)
tree13f4938f23efb8ea5f3d316d5b74b258bfddffac /tests/09imsm-assemble
parentIncr: don't exclude 'active' devices from auto inclusion in a container. (diff)
downloadmdadm-3cdcfda4b0d0f1cd94ab1d7e287765c82f15d4e4.tar.xz
mdadm-3cdcfda4b0d0f1cd94ab1d7e287765c82f15d4e4.zip
test: remove all the environment handling.
Instead, just include the environ explicitly in the test file or, where shared, source the shared file. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'tests/09imsm-assemble')
-rw-r--r--tests/09imsm-assemble26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/09imsm-assemble b/tests/09imsm-assemble
index 46e15bcf..2b62e02d 100644
--- a/tests/09imsm-assemble
+++ b/tests/09imsm-assemble
@@ -1,5 +1,31 @@
# validate the prodigal member disk scenario i.e. a former container
# member is returned after having been rebuilt on another system
+
+
+imsm_check_hold() {
+ if mdadm --remove $1 $2; then
+ echo "$2 removal from $1 should have been blocked" >&2
+ cat /proc/mdstat >&2
+ mdadm -E $2
+ exit 1
+ fi
+}
+
+imsm_check_removal() {
+ if ! mdadm --remove $1 $2 ; then
+ echo "$2 removal from $1 should have succeeded" >&2
+ cat /proc/mdstat >&2
+ mdadm -E $2
+ exit 1
+ fi
+}
+
+export IMSM_DEVNAME_AS_SERIAL=1
+export IMSM_TEST_OROM=1
+container=/dev/md/container
+member=/dev/md/vol0
+
+
num_disks=4
size=$((10*1024))
mdadm -CR $container -e imsm -n $num_disks $dev0 $dev1 $dev2 $dev3