Whamcloud - gitweb
LU-6142 tests: Fix style issues for mkdirmany.c
[fs/lustre-release.git] / lustre / tests / run-llog.sh
1 #!/bin/bash
2
3 LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
4 . $LUSTRE/tests/test-framework.sh
5 init_test_env $@
6 . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
7
8 PATH=$(dirname $0):$LUSTRE/utils:$PATH
9 TMP=${TMP:-/tmp}
10
11 set -x
12 MGS=$($LCTL dl | awk '/mgs/ { print $4 }')
13 [ -z "$MGS" ] && echo "$0: SKIP: no MGS available, skipping llog test" && exit 0
14
15 load_module obdclass/llog_test || exit 1
16 $LCTL modules > $TMP/ogdb-$(hostname)
17 echo "NOW reload debugging syms.."
18
19 RC=0
20 # Using ignore_errors will allow lctl to cleanup even if the test fails.
21 eval "$LCTL <<-EOF || RC=2
22         attach llog_test llt_name llt_uuid
23         ignore_errors
24         setup $MGS
25         device llt_name
26         cleanup
27         detach
28 EOF"
29 rmmod -v llog_test || RC2=3
30 [ $RC -eq 0 -a "$RC2" ] && RC=$RC2
31
32 exit $RC