Whamcloud - gitweb
Some racy problems happened when sanity-quota.sh run on buffalo.
[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 $LPROC/mds | grep -v num_refs | head -n 1`
6 [ -z "$MDS" ] && echo "no MDS available, skipping llog test" && exit 0
7
8 case `uname -r` in
9 2.4.*) insmod ../obdclass/llog_test.o || exit 1 ;;
10 2.6.*) insmod ../obdclass/llog_test.ko || exit 1 ;;
11 *) echo "unknown kernel version `uname -r`" && exit 99 ;;
12 esac
13 lctl modules > $TMP/ogdb-`hostname`
14 echo "NOW reload debugging syms.."
15
16 RC=0
17 lctl <<EOT || RC=2
18 attach llog_test llt_name llt_uuid
19 setup $MDS
20 EOT
21
22 # Using ignore_errors will allow lctl to cleanup even if the test fails.
23 lctl <<EOC
24 device llt_name
25 ignore_errors
26 cleanup
27 detach
28 EOC
29 rmmod llog_test || RC2=3
30 [ $RC -eq 0 -a "$RC2" ] && RC=$RC2
31
32 exit $RC