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
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//,/ })
54 cbench_DIR=${cbench_DIR:-"/usr/bin"}
55 cbench_IDIRS=${cbench_IDIRS:-4}
56 # FIXME: wiki page requirements is 30, do we really need 30 ?
57 cbench_RUNS=${cbench_RUNS:-4}
59 if [ "$SLOW" = "no" ]; then
67 METABENCH=${METABENCH:-$(which metabench 2> /dev/null || true)}
68 mbench_NFILES=${mbench_NFILES:-30400}
69 [ "$SLOW" = "no" ] && mbench_NFILES=10000
71 mbench_THREADS=${mbench_THREADS:-4}
76 cnt_DIR=${cnt_DIR:-""}
77 cnt_NRUN=${cnt_NRUN:-10}
78 [ "$SLOW" = "no" ] && cnt_NRUN=2
83 IOR=${IOR:-$(which IOR 2> /dev/null || true)}
85 ior_THREADS=${ior_THREADS:-2}
86 ior_iteration=${ior_iteration:-1}
87 ior_blockSize=${ior_blockSize:-6} # Gb
88 ior_xferSize=${ior_xferSize:-2m}
89 ior_type=${ior_type:-POSIX}
90 ior_DURATION=${ior_DURATION:-60} # minutes
91 [ "$SLOW" = "no" ] && ior_DURATION=30
93 # source the common file after all parameters are set to take affect
94 . $LUSTRE/tests/functions.sh
98 get_mpiuser_id $MPI_USER
99 MPI_RUNAS=${MPI_RUNAS:-"runas -u $MPI_USER_UID -g $MPI_USER_GID"}
100 $GSS_KRB5 && refresh_krb5_tgt $MPI_USER_UID $MPI_USER_GID $MPI_RUNAS
102 test_compilebench() {
105 run_test compilebench "compilebench"
110 run_test metabench "metabench"
112 test_connectathon() {
115 run_test connectathon "connectathon"
120 run_test iorssf "iorssf"
125 run_test iorfpp "iorfpp"
128 cleanup_nfs "$MOUNT" "$lustre_client" "$CLIENTS" || \
129 error_noexit false "cleanup_nfs failed"
130 if ! zconf_umount_clients $lustre_client $MOUNT force; then
131 error_noexit false "failed to umount lustre on $lustre_client"
132 elif ! zconf_mount_clients $CLIENTS $MOUNT; then
133 error_noexit false "failed to mount lustre after nfs test"
136 complete $(basename $0) $SECONDS
137 check_and_cleanup_lustre