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 racer=$LUSTRE/tests/racer/racer.sh
16 . $LUSTRE/tests/setup-nfs.sh
18 check_and_setup_lustre
20 # first unmount all the lustre client
23 lustre_client=$(facet_active_host $SINGLEMDS)
24 [ "$NFSVERSION" = "4" ] && cl_mnt_opt="${MOUNT_OPTS:+$MOUNT_OPTS,}32bitapi" ||
26 zconf_mount_clients $lustre_client $MOUNT "$cl_mnt_opt" || \
27 error "mount lustre on $lustre_client failed"
30 if ! setup_nfs "$NFSVERSION" "$MOUNT" "$lustre_client" "$CLIENTS"; then
31 error_noexit false "setup nfs failed!"
32 cleanup_nfs "$MOUNT" "$lustre_client" "$CLIENTS" || \
33 error_noexit false "failed to cleanup nfs"
34 if ! zconf_umount_clients $lustre_client $MOUNT force; then
35 error_noexit false "failed to umount lustre on $lustre_client"
36 elif ! zconf_mount_clients $CLIENTS $MOUNT; then
37 error_noexit false "failed to mount lustre"
39 check_and_cleanup_lustre
47 MACHINEFILE=${MACHINEFILE:-$TMP/$(basename $0 .sh).machines}
48 clients=${CLIENTS:-$HOSTNAME}
49 generate_machine_file $clients $MACHINEFILE || \
50 error "Failed to generate machine file"
51 num_clients=$(get_node_count ${clients//,/ })
54 # Run short iteration in nfs mode
55 cbench_IDIRS=${cbench_IDIRS:-2}
56 cbench_RUNS=${cbench_RUNS:-2}
59 # Run quick in nfs mode
60 mbench_NFILES=${mbench_NFILES:-10000}
63 [ "$SLOW" = "no" ] && cnt_NRUN=2
66 ior_DURATION=${ior_DURATION:-30}
68 # source the common file after all parameters are set to take affect
69 . $LUSTRE/tests/functions.sh
73 get_mpiuser_id $MPI_USER
74 MPI_RUNAS=${MPI_RUNAS:-"runas -u $MPI_USER_UID -g $MPI_USER_GID"}
75 $GSS_KRB5 && refresh_krb5_tgt $MPI_USER_UID $MPI_USER_GID $MPI_RUNAS
80 run_test compilebench "compilebench"
85 run_test metabench "metabench"
90 run_test connectathon "connectathon"
95 run_test iorssf "iorssf"
100 run_test iorfpp "iorfpp"
102 test_racer_on_nfs() {
105 run_test racer_on_nfs "racer on NFS client"
108 cleanup_nfs "$MOUNT" "$lustre_client" "$CLIENTS" || \
109 error_noexit false "cleanup_nfs failed"
110 if ! zconf_umount_clients $lustre_client $MOUNT force; then
111 error_noexit false "failed to umount lustre on $lustre_client"
112 elif ! zconf_mount_clients $CLIENTS $MOUNT; then
113 error_noexit false "failed to mount lustre after nfs test"
117 check_and_cleanup_lustre