X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Ftests%2Fmetadata-updates.sh;h=eab2800059b18c4d21c2a39354e40eaff0e37551;hp=0228c2bca487f6d4740c62e5c338a187b50496ac;hb=6c2bbc022832087f2ff0f65d83e3b0a460e45911;hpb=8c4f96f910786ff3d73474ef5f8d4a96a30a0bed diff --git a/lustre/tests/metadata-updates.sh b/lustre/tests/metadata-updates.sh index 0228c2b..eab2800 100755 --- a/lustre/tests/metadata-updates.sh +++ b/lustre/tests/metadata-updates.sh @@ -32,8 +32,8 @@ NEW_MODE=0222 NEW_ATIME="2001-01-01 GMT" NEW_MTIME="2005-05-05 GMT" -test_UID=$(id -u) -test_GID=$(id -g) +test_USER=$(id -u -n) +test_GROUP=$(id -g -n) SUMFILE=$TESTDIR/mdsum @@ -99,21 +99,21 @@ $TRUNCATE \\\$TESTFILE 0" || return ${PIPESTATUS[0]} # check st_uid, st_gid, st_size, st_mode get_stat () { - local attr="$test_UID $test_GID $FILE_SIZE $CURRENT_MODE" + local attr="$test_USER $test_GROUP $FILE_SIZE $CURRENT_MODE" - echo "Checking file(s) attributes ... " + echo "Checking file(s) attributes ... " do_nodesv $NODES_TO_USE "set $TRACE; for HOST in ${HOSTS//,/ } ; do TESTFILE=$TESTDIR/\\\$HOST/$FILE; - tmp=\\\$(stat -c \\\"%u %g %s 0%a\\\" \\\$TESTFILE); + tmp=\\\$(stat -c \\\"%U %G %s 0%a\\\" \\\$TESTFILE); echo \\\"\\\$TESTFILE [ uid gid size mode ] expected : $attr ; got : \\\$tmp \\\"; if [ x\\\"\\\$tmp\\\" != x\\\"$attr\\\" ] ; then echo \\\"Wrong file attributes\\\"; exit 56; fi; done " || return ${PIPESTATUS[0]} - return 0 + return 0 } do_chmod () { @@ -251,16 +251,17 @@ 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 ${MACHINEFILE_OPTION} $MACHINEFILE \ + -np $(get_node_count ${NODES_TO_USE//,/ }) $WRITE_DISJOINT \ + -f $WRITE_DISJOINT_FILE -n $NUMLOOPS || STATUS=1 else skip_env "$0 : write_disjoint not found " fi -complete $(basename $0) $SECONDS +complete $SECONDS rm -rf $TESTDIR rm -f $MACHINEFILE check_and_cleanup_lustre