[Ocfs2-test-devel] [PATCH 1/2] Ocfs2-test: Update xattr-multi-run.sh to fix several minor issues.
Marcos E. Matsunaga
Marcos.Matsunaga at oracle.com
Thu Jan 7 06:14:27 PST 2010
Signed-off-by: Marcos Matsunaga <Marcos.Matsunaga at oracle.com>
Regards,
Marcos Eduardo Matsunaga
Oracle USA
Linux Engineering
“The statements and opinions expressed here are my own and do not
necessarily represent those of Oracle Corporation.”
On 01/07/2010 12:37 AM, Tristan Ye wrote:
> First to remove unused f_create_hostfile() and corresponding vars,
> second to use number of testing nodes as the default slot number
> when mkfsing, lastly, use 'plm_rsh_agent' to meet new mpirun.
>
> Signed-off-by: Tristan Ye <tristan.ye at oracle.com>
> ---
> programs/xattr_tests/xattr-multi-run.sh | 44 +++++++------------------------
> 1 files changed, 10 insertions(+), 34 deletions(-)
>
> diff --git a/programs/xattr_tests/xattr-multi-run.sh b/programs/xattr_tests/xattr-multi-run.sh
> index cb6984f..26bd42f 100755
> --- a/programs/xattr_tests/xattr-multi-run.sh
> +++ b/programs/xattr_tests/xattr-multi-run.sh
> @@ -68,6 +68,7 @@ RUN_LOG_FILE=
> MOUNT_POINT=
> OCFS2_DEVICE=
>
> +SLOTS=
> BLOCKSIZE=
> CLUSTERSIZE=
> BLOCKNUMS=
> @@ -75,14 +76,12 @@ BLOCKNUMS=
> WORKPLACE=
>
> TMP_DIR=/tmp
> -DEFAULT_HOSTFILE=".openmpi_hostfile"
> DEFAULT_RANKS=4
>
> declare -i MPI_RANKS
> MPI_HOSTS=
> -MPI_HOSTFILE=
> MPI_ACCESS_METHOD="ssh"
> -MPI_PLS_AGENT_ARG="-mca pls_rsh_agent ssh:rsh"
> +MPI_PLS_AGENT_ARG="-mca plm_rsh_agent ssh:rsh"
>
> TEST_NO=0
> TEST_PASS=0
> @@ -173,34 +172,8 @@ f_getoptions()
> done
> shift $(($OPTIND -1))
> MOUNT_POINT=${1}
> -
> }
>
> -f_create_hostfile()
> -{
> - MPI_HOSTFILE="${TMP_DIR}/${DEFAULT_HOSTFILE}"
> - TMP_FILE="${TMP_DIR}/.tmp_openmpi_hostfile_$$"
> -
> - echo ${MPI_HOSTS}|sed -e 's/,/\n/g'>$TMP_FILE
> -
> - if [ -f "$MPI_HOSTFILE" ];then
> - ${RM} -rf ${MPI_HOSTFILE}
> - fi
> -
> - while read line
> - do
> - if [ -z $line ];then
> - continue
> - fi
> -
> - echo "$line">>$MPI_HOSTFILE
> -
> - done<$TMP_FILE
> -
> - ${RM} -rf $TMP_FILE
> -}
> -
> -
> f_setup()
> {
> if [ "${UID}" = "0" ];then
> @@ -211,7 +184,7 @@ f_setup()
> f_getoptions $*
>
> if [ "$MPI_ACCESS_METHOD" = "rsh" ];then
> - MPI_PLS_AGENT_ARG="-mca pls_rsh_agent rsh:ssh"
> + MPI_PLS_AGENT_ARG="-mca plm_rsh_agent rsh:ssh"
> REMOTE_SH_BIN=${RSH_BIN}
> fi
>
> @@ -244,10 +217,13 @@ f_setup()
>
> if [ -z "$MPI_HOSTS" ];then
> f_usage
> - else
> - f_create_hostfile
> - fi
>
> + # Use number of testing nodes as the default slot number.
> + if [ -z "${SLOTS}" ];then
> + echo $MPI_HOSTS|sed -e 's/,/\n/g' >/tmp/$$
> + SLOTS=`cat /tmp/$$ |wc -l`
> + rm -f /tmp/$$
> + fi
>
> ${CHMOD_BIN} -R 777 ${MOUNT_POINT}
>
> @@ -261,7 +237,7 @@ f_do_mkfs_and_mount()
> {
> echo -n "Mkfsing device(-b ${BLOCKSIZE} -C ${CLUSTERSIZE}): "|tee -a ${RUN_LOG_FILE}
>
> - echo y|${MKFS_BIN} --fs-features=xattr -b ${BLOCKSIZE} -C ${CLUSTERSIZE} -N 2 -L ocfs2-xattr-multi-test ${OCFS2_DEVICE} ${BLOCKNUMS}>>${RUN_LOG_FILE} 2>&1
> + echo y|${MKFS_BIN} --fs-features=xattr -b ${BLOCKSIZE} -C ${CLUSTERSIZE} -N ${SLOTS} -L ocfs2-xattr-multi-test ${OCFS2_DEVICE} ${BLOCKNUMS}>>${RUN_LOG_FILE} 2>&1
>
> RET=$?
> echo_status ${RET} |tee -a ${RUN_LOG_FILE}
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.oracle.com/pipermail/ocfs2-test-devel/attachments/20100107/f3455e2d/attachment.html
More information about the Ocfs2-test-devel
mailing list