6 LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
7 . $LUSTRE/tests/test-framework.sh
8 # only call init_test_env if this script is called directly
9 if [[ -z "$TESTSUITE" || "$TESTSUITE" = "$(basename $0 .sh)" ]]; then
12 . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
15 . $LUSTRE/tests/setup-nfs.sh
17 check_and_setup_lustre
19 # first unmount all the lustre client
22 lustre_client=$(facet_active_host mds)
23 [ "$NFSVERSION" = "4" ] && cl_mnt_opt="$MOUNTOPT,32bitapi" || cl_mnt_opt=""
24 zconf_mount_clients $lustre_client $MOUNT "$cl_mnt_opt" || \
25 error "mount lustre on $lustre_client failed"
28 if ! setup_nfs "$NFSVERSION" "$MOUNT" "$lustre_client" "$CLIENTS"; then
29 error_noexit false "setup nfs failed!"
30 cleanup_nfs "$MOUNT" "$lustre_client" "$CLIENTS" || \
31 error_noexit false "failed to cleanup nfs"
32 if ! zconf_umount_clients $lustre_client $MOUNT force; then
33 error_noexit false "failed to umount lustre on $lustre_client"
34 elif ! zconf_mount_clients $CLIENTS $MOUNT; then
35 error_noexit false "failed to mount lustre"
37 check_and_cleanup_lustre
45 MACHINEFILE=${MACHINEFILE:-$TMP/$(basename $0 .sh).machines}
46 clients=${CLIENTS:-$HOSTNAME}
47 generate_machine_file $clients $MACHINEFILE || \
48 error "Failed to generate machine file"
49 num_clients=$(get_node_count ${clients//,/ })
52 if [ "$SLOW" = "no" ]; then
58 [ "$SLOW" = "no" ] && mbench_NFILES=10000
61 [ "$SLOW" = "no" ] && cnt_NRUN=2
64 [ "$SLOW" = "no" ] && ior_DURATION=30
66 # source the common file after all parameters are set to take affect
67 . $LUSTRE/tests/functions.sh
74 run_test compilebench "compilebench"
79 run_test metabench "metabench"
84 run_test connectathon "connectathon"
89 run_test iorssf "iorssf"
94 run_test iorfpp "iorfpp"
96 test_nfsread_orphan_file() {
97 run_nfsread_orphan_file
99 run_test nfsread_orphan_file
102 cleanup_nfs "$MOUNT" "$lustre_client" "$CLIENTS" || \
103 error_noexit false "cleanup_nfs failed"
104 if ! zconf_umount_clients $lustre_client $MOUNT force; then
105 error_noexit false "failed to umount lustre on $lustre_client"
106 elif ! zconf_mount_clients $CLIENTS $MOUNT; then
107 error_noexit false "failed to mount lustre after nfs test"
110 complete $(basename $0) $SECONDS
111 check_and_cleanup_lustre