Whamcloud - gitweb
Land b_smallfix onto HEAD (20040428_2142)
[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=`ls /proc/fs/lustre/mds | grep -v num_refs | head -n 1`
6 [ -z "$MDS" ] && echo "no MDS available, skipping llog test" && exit 0
7
8 insmod ../obdclass/llog_test.o || exit 1
9 lctl modules > $TMP/ogdb-`hostname`
10 echo "NOW reload debugging syms.."
11
12 RC=0
13 lctl <<EOT || RC=2
14 newdev
15 attach llog_test llt_name llt_uuid
16 setup $MDS
17 EOT
18
19 # Using ignore_errors will allow lctl to cleanup even if the test fails.
20 lctl <<EOC
21 cfg_device llt_name
22 ignore_errors
23 cleanup
24 detach
25 EOC
26 rmmod llog_test || RC2=3
27 [ $RC -eq 0 -a "$RC2" ] && RC=$RC2
28
29 exit $RC