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="${MOUNT_OPTS:+$MOUNT_OPTS,}32bitapi" ||
25 zconf_mount_clients $lustre_client $MOUNT "$cl_mnt_opt" || \
26 error "mount lustre on $lustre_client failed"
29 if ! setup_nfs "$NFSVERSION" "$MOUNT" "$lustre_client" "$CLIENTS"; then
30 error_noexit false "setup nfs failed!"
31 cleanup_nfs "$MOUNT" "$lustre_client" "$CLIENTS" || \
32 error_noexit false "failed to cleanup nfs"
33 if ! zconf_umount_clients $lustre_client $MOUNT force; then
34 error_noexit false "failed to umount lustre on $lustre_client"
35 elif ! zconf_mount_clients $CLIENTS $MOUNT; then
36 error_noexit false "failed to mount lustre"
38 check_and_cleanup_lustre
46 MACHINEFILE=${MACHINEFILE:-$TMP/$(basename $0 .sh).machines}
47 clients=${CLIENTS:-$HOSTNAME}
48 generate_machine_file $clients $MACHINEFILE || \
49 error "Failed to generate machine file"
50 num_clients=$(get_node_count ${clients//,/ })
53 # Run short iteration in nfs mode
54 cbench_IDIRS=${cbench_IDIRS:-2}
55 cbench_RUNS=${cbench_RUNS:-2}
58 # Run quick in nfs mode
59 mbench_NFILES=${mbench_NFILES:-10000}
62 [ "$SLOW" = "no" ] && cnt_NRUN=2
65 ior_DURATION=${ior_DURATION:-30}
67 # source the common file after all parameters are set to take affect
68 . $LUSTRE/tests/functions.sh
72 get_mpiuser_id $MPI_USER
73 MPI_RUNAS=${MPI_RUNAS:-"runas -u $MPI_USER_UID -g $MPI_USER_GID"}
74 $GSS_KRB5 && refresh_krb5_tgt $MPI_USER_UID $MPI_USER_GID $MPI_RUNAS
79 run_test compilebench "compilebench"
84 run_test metabench "metabench"
89 run_test connectathon "connectathon"
94 run_test iorssf "iorssf"
99 run_test iorfpp "iorfpp"
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"
111 check_and_cleanup_lustre