Whamcloud - gitweb
- add tools and beginning of multi mount point sanity test.
authorbraam <braam>
Thu, 5 Dec 2002 07:54:28 +0000 (07:54 +0000)
committerbraam <braam>
Thu, 5 Dec 2002 07:54:28 +0000 (07:54 +0000)
lustre/tests/llmount2-hack.sh
lustre/tests/llmount2-hackcleanup.sh [new file with mode: 0644]
lustre/tests/local2-hack.xml [new file with mode: 0644]
lustre/tests/sanityN.sh [new file with mode: 0644]

index d17805a..495626c 100644 (file)
@@ -2,16 +2,11 @@
 # suggested boilerplate for test script
 
 LCONF=${LCONF:-../utils/lconf}
-NAME=${NAME:-local2}
+NAME=${NAME:-local2-hack}
 
 config=$NAME.xml
-mkconfig=./$NAME.sh
 
-if [ ! -f $config -o $mkconfig -nt $config ]; then
-   sh $mkconfig $config || exit 1
-fi
-
-${LCONF} -v --reformat --gdb $config || exit 2
+${LCONF}  --reformat --gdb $config || exit 2
 
 ../utils/lctl <<EOF
 newdev
diff --git a/lustre/tests/llmount2-hackcleanup.sh b/lustre/tests/llmount2-hackcleanup.sh
new file mode 100644 (file)
index 0000000..21c915d
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/sh
+# suggested boilerplate for test script
+
+LCONF=${LCONF:-../utils/lconf}
+NAME=${NAME:-local2-hack}
+
+config=$NAME.xml
+
+umount /mnt/lustre1
+umount /mnt/lustre2
+../utils/lctl <<EOF
+name2dev OSC2_localhost
+cleanup
+detach
+name2dev MDC2_mds1
+cleanup
+detach
+quit
+EOF
+
+${LCONF} --cleanup $config
diff --git a/lustre/tests/local2-hack.xml b/lustre/tests/local2-hack.xml
new file mode 100644 (file)
index 0000000..c3f80a1
--- /dev/null
@@ -0,0 +1,43 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<lustre>
+  <ldlm name='ldlm' uuid='ldlm_UUID'/>
+  <node name='localhost' uuid='localhost_UUID'>
+    <profile>
+      <ldlm_ref uuidref='ldlm_UUID'/>
+      <network_ref uuidref='NET_localhost_tcp_UUID'/>
+      <mds_ref uuidref='mds1_UUID'/>
+      <obd_ref uuidref='OBD_localhost_UUID'/>
+      <ost_ref uuidref='OST_localhost_UUID'/>
+      <mountpoint_ref uuidref='MNT_localhost_UUID'/>
+    </profile>
+    <network type='tcp' name='NET_localhost_tcp' uuid='NET_localhost_tcp_UUID'>
+      <server>localhost</server>
+      <port>988</port>
+    </network>
+  </node>
+  <mds name='mds1' uuid='mds1_UUID'>
+    <fstype>extN</fstype>
+    <device size='100000'>/tmp/mds1</device>
+    <autoformat>yes</autoformat>
+    <network_ref uuidref='NET_localhost_tcp_UUID'/>
+    <node_ref uuidref='localhost_UUID'/>
+  </mds>
+  <obd type='obdfilter' name='OBD_localhost' uuid='OBD_localhost_UUID'>
+    <fstype>extN</fstype>
+    <device size='400000'>/tmp/ost1</device>
+    <autoformat>yes</autoformat>
+  </obd>
+  <osc name='OSC_localhost' uuid='OSC_localhost_UUID'>
+    <ost_ref uuidref='OST_localhost_UUID'/>
+    <obd_ref uuidref='OBD_localhost_UUID'/>
+  </osc>
+  <ost name='OST_localhost' uuid='OST_localhost_UUID'>
+    <network_ref uuidref='NET_localhost_tcp_UUID'/>
+    <obd_ref uuidref='OBD_localhost_UUID'/>
+  </ost>
+  <mountpoint name='MNT_localhost' uuid='MNT_localhost_UUID'>
+    <mds_ref uuidref='mds1_UUID'/>
+    <osc_ref uuidref='OSC_localhost_UUID'/>
+    <path>/mnt/lustre1</path>
+  </mountpoint>
+</lustre>
diff --git a/lustre/tests/sanityN.sh b/lustre/tests/sanityN.sh
new file mode 100644 (file)
index 0000000..0b575a9
--- /dev/null
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+export NAME=$NAME
+clean() {
+        echo -n "cleanup..."
+        sh llmount2-hackcleanup.sh > /dev/null
+}
+
+CLEAN=clean
+start() {
+        echo -n "mounting..."
+        sh llmount2-hack.sh > /dev/null
+        echo -n "mounted"
+}
+START=start
+
+error () { 
+    echo $1
+    exit 1
+}
+
+echo -n "test 1: check create on 2 mtpt's..."
+touch /mnt/lustre1/f1
+[ -f /mnt/lustre2/f1 ] || error "test 1 failure" 
+echo "pass"
+
+echo "test 2: check attribute updates on 2 mtpt's..."
+chmod a+x /mnt/lustre2/f1
+[ -x /mnt/lustre1/f1 ] || error "test 2 failure"
+echo "pass"
+
+echo "test 3: check after remount attribute updates on 2 mtpt's..."
+chmod a-x /mnt/lustre2/f1
+$CLEAN
+$START
+
+[ ! -x /mnt/lustre1/f1 ] || error "test 3 failure"
+echo "pass"
+
+$CLEAN
+$START
+
+exit