Whamcloud - gitweb
- make HEAD from b_post_cmd3
[fs/lustre-release.git] / lustre / tests / run-quotafmt.sh
1 #!/bin/bash
2 PATH=`dirname $0`:`dirname $0`/../utils:$PATH
3 TMP=${TMP:-/tmp}
4
5 MDS=`ls /proc/fs/lustre/mdt | grep -v num_refs | head -n 1`
6 [ -z "$MDS" ] && echo "no MDS available, skipping quotafile test" && exit 0
7
8 insmod ../ldiskfs/quotafmt_test.ko || 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 quotfmt_test quotfmt_name quotfmt_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 quotfmt_name
22 ignore_errors
23 cleanup
24 detach
25 EOC
26 rmmod quotafmt_test || RC2=3
27 [ $RC -eq 0 -a "$RC2" ] && RC=$RC2
28
29 exit $RC