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 $SINGLEMDS)
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 # Run short iteration in nfs mode
53 cbench_IDIRS=${cbench_IDIRS:-2}
54 cbench_RUNS=${cbench_RUNS:-2}
57 # Run quick in nfs mode
58 mbench_NFILES=${mbench_NFILES:-10000}
61 [ "$SLOW" = "no" ] && cnt_NRUN=2
64 ior_DURATION=${ior_DURATION:-30}
66 # source the common file after all parameters are set to take affect
67 . $LUSTRE/tests/functions.sh
71 get_mpiuser_id $MPI_USER
72 MPI_RUNAS=${MPI_RUNAS:-"runas -u $MPI_USER_UID -g $MPI_USER_GID"}
73 $GSS_KRB5 && refresh_krb5_tgt $MPI_USER_UID $MPI_USER_GID $MPI_RUNAS
78 run_test compilebench "compilebench"
83 run_test metabench "metabench"
88 run_test connectathon "connectathon"
93 run_test iorssf "iorssf"
98 run_test iorfpp "iorfpp"
101 cleanup_nfs "$MOUNT" "$lustre_client" "$CLIENTS" || \
102 error_noexit false "cleanup_nfs failed"
103 if ! zconf_umount_clients $lustre_client $MOUNT force; then
104 error_noexit false "failed to umount lustre on $lustre_client"
105 elif ! zconf_mount_clients $CLIENTS $MOUNT; then
106 error_noexit false "failed to mount lustre after nfs test"
109 complete $(basename $0) $SECONDS
110 check_and_cleanup_lustre