Whamcloud - gitweb
- added test_3b which emulates recursive mount. Does not pass yet.
[fs/lustre-release.git] / lustre / tests / run-llog.sh
1 #!/bin/bash
2 PATH=`dirname $0`:`dirname $0`/../utils:$PATH
3 TMP=${TMP:-/tmp}
4
5 MDS=`find /proc/fs/lustre/mds/* -type d | head -n1 | sed 's/.*\///'`
6 [ -z "$MDS" ] && echo "no MDS available, skipping llog test" && exit 0
7
8 test "x$(uname -r | grep -o "2.6")" = "x2.6" && MODEXT=ko || MODEXT=o
9
10 insmod ../obdclass/llog_test.$MODEXT || exit 1
11 lctl modules > $TMP/ogdb-`hostname`
12
13 # take care of UML developers
14 [ -f /r/$TMP/ogdb-`hostname` ] && 
15     cp -f $TMP/ogdb-`hostname` /r/$TMP/ogdb-`hostname`
16 echo "NOW reload debugging syms.."
17
18 RC=0
19 lctl <<EOT || RC=2
20 newdev
21 attach llog_test llt_name llt_uuid
22 setup $MDS
23 EOT
24
25 # Using ignore_errors will allow lctl to cleanup even if the test fails.
26 lctl <<EOC
27 cfg_device llt_name
28 ignore_errors
29 cleanup
30 detach
31 EOC
32 rmmod llog_test || RC2=3
33 [ $RC -eq 0 -a "$RC2" ] && RC=$RC2
34
35 exit $RC