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