<div dir="ltr"><div><span style="font-family:arial,sans-serif;font-size:12.666666984558105px">> How are you going to investigate errors?</span><br></div><div><span style="font-family:arial,sans-serif;font-size:12.666666984558105px"><br>
</span></div>If you run zdtm test suite, there are still several ways to debug.<div>First, you can check the STDOUT to see which test failed.</div><div>And, STDERR provides the details about the error, which are excerpted from dump.log, restore.log and program output. You can also check original logs.</div>
<div>Then, you can dig into it deep by run just one test at one time.</div><div><br></div><div>I'll add an option for it.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Aug 12, 2013 at 1:10 AM, Andrew Vagin <span dir="ltr"><<a href="mailto:avagin@parallels.com" target="_blank">avagin@parallels.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Fri, Aug 09, 2013 at 08:09:06AM -0700, Yicheng Qin wrote:<br>
> From: Yicheng Qin <<a href="mailto:yichengq@google.com">yichengq@google.com</a>><br>
> Subject: [PATCH] test/zdtm: skip failed individual tests instead of exiting<br>
><br>
> This ensures that all tests can be run in one pass, which can provide<br>
> better overview of test result.<br>
<br>
</div>Pls, add a seperate option for this scenario.<br>
<br>
Currently zdtm.sh stops after an error for easier investigation.<br>
<div><div class="h5"><br>
><br>
> Signed-off-by: Yicheng Qin <<a href="mailto:yichengq@google.com">yichengq@google.com</a>><br>
> ---<br>
> test/zdtm.sh | 21 ++++++++++++++++++---<br>
> 1 file changed, 18 insertions(+), 3 deletions(-)<br>
><br>
> diff --git a/test/zdtm.sh b/test/zdtm.sh<br>
> index 6db2bf0..094ea53 100755<br>
> --- a/test/zdtm.sh<br>
> +++ b/test/zdtm.sh<br>
> @@ -174,6 +174,7 @@ PAGE_SERVER=0<br>
> PS_PORT=12345<br>
> TCPDUMP_PID=<br>
> NS_TEST_ONLY=0<br>
> +EXIT_VALUE=0<br>
><br>
> check_mainstream()<br>
> {<br>
> @@ -439,7 +440,7 @@ EOF<br>
> # with some error code, or checkpoint is complete but return<br>
> # code is non-zero because of post dump action.<br>
> if [ "$retcode" -ne 0 ] && [[ "$retcode" -ne 32 || -z "$dump_only" ]]; then<br>
> - echo WARNING: $tname returned $retcode and left running for debug needs<br>
<br>
<br>
> + echo WARNING: $tname failed and returned $retcode<br>
> return 1<br>
> fi<br>
><br>
> @@ -553,7 +554,14 @@ case_error()<br>
><br>
> echo "==================== ERROR OVER ====================" >&2<br>
><br>
> - exit 1<br>
> + # cleanout failed test to prepare for next one<br>
> + local tname=`basename $test`<br>
> + local tdir=`dirname $test`<br>
> + killall -9 $tname > /dev/null 2>&1<br>
<br>
</div></div>How are you going to investigate errors?<br>
<div><div class="h5"><br>
> + make -C $tdir $tname.cleanout<br>
> +<br>
> + # record the error<br>
> + EXIT_VALUE=1<br>
> }<br>
><br>
> checkout()<br>
> @@ -664,6 +672,12 @@ if [ $# -eq 0 ]; then<br>
> for t in $IPC_TEST_LIST; do<br>
> run_test $t -n ipc || case_error $t<br>
> done<br>
> +<br>
> + if [ $EXIT_VALUE -eq 0 ]; then<br>
> + echo ZDTM tests PASS.<br>
> + else<br>
> + echo ZDTM tests FAIL.<br>
> + fi<br>
> elif [ "$1" = "-l" ]; then<br>
> echo $TEST_LIST $UTS_TEST_LIST $MNT_TEST_LIST $IPC_TEST_LIST | tr ' ' '\n'<br>
> elif [ "$1" = "-g" ]; then<br>
> @@ -711,4 +725,5 @@ else<br>
> fi<br>
> fi<br>
><br>
> -[ -n "$TMP_TREE" ] && rm -rf $TMP_TREE || exit 0<br>
> +[ -n "$TMP_TREE" ] && rm -rf $TMP_TREE<br>
> +exit $EXIT_VALUE<br>
> --<br>
> 1.8.3<br>
><br>
<br>
</div></div>> _______________________________________________<br>
> CRIU mailing list<br>
> <a href="mailto:CRIU@openvz.org">CRIU@openvz.org</a><br>
> <a href="https://lists.openvz.org/mailman/listinfo/criu" target="_blank">https://lists.openvz.org/mailman/listinfo/criu</a><br>
<br>
</blockquote></div><br></div>