[Ocfs2-test-devel] [PATCH 2/3] Ocfs2-test: Return error code and print error log once mpir_run failed.
Marcos E. Matsunaga
Marcos.Matsunaga at oracle.com
Fri Jan 9 06:57:48 PST 2009
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.”
Tristan Ye wrote:
> Once mpi_run by os.waitpid() failed after a os.error exception captured, we'd
> better print its corresponding error msg and return error code to caller to decide
> if the tests succeed or not.
>
> Signed-off-by: Tristan Ye <tristan.ye at oracle.com>
> ---
> programs/python_common/o2tf.py | 7 ++++---
> 1 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/programs/python_common/o2tf.py b/programs/python_common/o2tf.py
> index 53d7865..434d3c4 100644
> --- a/programs/python_common/o2tf.py
> +++ b/programs/python_common/o2tf.py
> @@ -234,7 +234,7 @@ so just do a sanity check here to test if all nodes are available.
>
> except os.error,inst:
> printlog(str(inst), logfile, 0, '')
> - pass
> + return -1
> #
> # StartMPI is used by :
> # - o2tf.py
> @@ -343,8 +343,9 @@ def openmpi_run(DEBUGON, nproc, cmd, nodes, remote_sh, logfile, w_flag):
> else:
> os.waitpid(pid, 0)
>
> - except os.error:
> - pass
> + except os.error,inst:
> + printlog(str(inst), logfile, 0, '')
> + return -1
>
> #
> # lamexec is used by :
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.oracle.com/pipermail/ocfs2-test-devel/attachments/20090109/2611d99b/attachment.html
More information about the Ocfs2-test-devel
mailing list