X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Fmetadata-updates.sh;h=41a184931d0062c4b78ff5ab4d01a45f752b468b;hb=39871df164bcd09a2e0d8b60c74dd2bb0c1151be;hp=2212a177412bd79ad8bad00f0f4a8b1fac44fd62;hpb=326341889117faa5e7cbb05de66d759200405525;p=fs%2Flustre-release.git diff --git a/lustre/tests/metadata-updates.sh b/lustre/tests/metadata-updates.sh index 2212a17..41a1849 100755 --- a/lustre/tests/metadata-updates.sh +++ b/lustre/tests/metadata-updates.sh @@ -20,6 +20,11 @@ NODES_TO_USE=${NODES_TO_USE:-$CLIENTS} [ -z $CLIENTS ] && NODES_TO_USE=$(hostname) +# hostname could differ from a network interface +# configured for NODES_TO_USE, bug 23961 +# the test dir on each host is created based on `hostname` of this host +HOSTS=$(comma_list $(do_nodes $NODES_TO_USE "echo \\\$(hostname)")) + FILE=testfile FILE_SIZE=1024 CURRENT_MODE=0644 @@ -99,7 +104,7 @@ get_stat () { echo "Checking file(s) attributes ... " do_nodesv $NODES_TO_USE "set $TRACE; -for HOST in ${NODES_TO_USE//,/ } ; do +for HOST in ${HOSTS//,/ } ; do TESTFILE=$TESTDIR/\\\$HOST/$FILE; tmp=\\\$(stat -c \\\"%u %g %s 0%a\\\" \\\$TESTFILE); echo \\\"\\\$TESTFILE [ uid gid size mode ] expected : $attr ; got : \\\$tmp \\\"; @@ -142,7 +147,7 @@ do_check_timestamps () { echo "Checking atime, mtime ... " do_nodesv $NODES_TO_USE "set $TRACE; -for HOST in ${NODES_TO_USE//,/ } ; do +for HOST in ${HOSTS//,/ } ; do TESTFILE=$TESTDIR/\\\$HOST/$FILE; tmp=\\\$(stat -c \\\"%X %Y\\\" \\\$TESTFILE); if [ x\\\"\\\$tmp\\\" != x\\\"$times\\\" ] ; then @@ -172,7 +177,7 @@ check_dir_contents () { echo "Checking dir contents ... (should exist files : f$num_files ... f$NUM_FILES) ... " do_nodes $NODES_TO_USE "set $TRACE; -for HOST in ${NODES_TO_USE//,/ } ; do +for HOST in ${HOSTS//,/ } ; do DIR=$TESTDIR/\\\$HOST; for i in \\\$(seq $NUM_FILES -1 $num_files) ; do if ! [ -f \\\$DIR/f\\\$i ] ; then @@ -246,17 +251,18 @@ check_dir_contents $(($NUM_FILES / 2 + 1)) || # "write_disjoint" test echo "Part 5. write_disjoint test: see lustre/tests/mpi/write_disjoint.c for details" if [ -f "$WRITE_DISJOINT" ]; then - set $TRACE - MACHINEFILE=${MACHINEFILE:-$TMP/$(basename $0 .sh).machines} - generate_machine_file $NODES_TO_USE $MACHINEFILE - mpi_run -np $(get_node_count ${NODES_TO_USE//,/ }) -machinefile $MACHINEFILE \ - $WRITE_DISJOINT -f $WRITE_DISJOINT_FILE -n $NUMLOOPS || STATUS=1 + set $TRACE + MACHINEFILE=${MACHINEFILE:-$TMP/$(basename $0 .sh).machines} + generate_machine_file $NODES_TO_USE $MACHINEFILE + mpi_run -np $(get_node_count ${NODES_TO_USE//,/ }) \ + ${MACHINEFILE_OPTION} $MACHINEFILE $WRITE_DISJOINT \ + -f $WRITE_DISJOINT_FILE -n $NUMLOOPS || STATUS=1 else skip_env "$0 : write_disjoint not found " fi -equals_msg `basename $0`: test complete, cleaning up +complete $SECONDS rm -rf $TESTDIR rm -f $MACHINEFILE check_and_cleanup_lustre -exit $STATUS +exit_status