# 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
--- /dev/null
+<?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>
--- /dev/null
+#!/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