[CRIU] [PATCH] test/zdtm: add option -r to run test with specified name

Andrew Vagin avagin at parallels.com
Wed Aug 21 09:27:35 EDT 2013


On Tue, Aug 20, 2013 at 11:30:26AM -0700, Yicheng Qin wrote:
> Hi Andrew,
> 
> I write this patch to fix running test that is not in TEST_LIST.
> But I am not sure whether it reaches your expect.
> May you check it?

Sure. It's what I want. Thanks.

Acked-by: Andrew Vagin <avagin at parallels.com>

> 
> Thx!
> 
> 
> On Tue, Aug 20, 2013 at 11:27 AM, Yicheng Qin <yichengq at google.com> wrote:
> 
>     The option can run test with specified name directly without check
>     or match.
> 
>     It can be used to run experimental test that is not in TEST_LIST.
> 
>     Signed-off-by: Yicheng Qin <yichengq at google.com>
>     ---
>      test/zdtm.sh | 13 +++++++++++++
>      1 file changed, 13 insertions(+)
> 
>     diff --git a/test/zdtm.sh b/test/zdtm.sh
>     index 275cc8d..7f34c8d 100755
>     --- a/test/zdtm.sh
>     +++ b/test/zdtm.sh
>     @@ -158,6 +158,7 @@ PS_PORT=12345
>      TCPDUMP_PID=
>      COMPILE_ONLY=0
>      BATCH_TEST=0
>     +SPECIFIED_NAME_USED=0
> 
>      check_criu()
>      {
>     @@ -658,6 +659,11 @@ while :; do
>                     shift
>                     continue
>             fi
>     +       if [ "$1" = "-r" ]; then
>     +               SPECIFIED_NAME_USED=1
>     +               shift
>     +               continue
>     +       fi
>             break;
>      done
> 
>     @@ -685,9 +691,16 @@ Options:
>             -a <FILE>.tar.gz : save archive with dump files and logs
>             -g : Generate executables only
>             -n : Batch test
>     +       -r : Run test with specified name directly without match or check
>      EOF
>      elif [ "${1:0:1}" = '-' ]; then
>             echo "unrecognized option $1"
>     +elif [ $SPECIFIED_NAME_USED -eq 1 ]; then
>     +       if [ $# -eq 0 ]; then
>     +               echo "test name should be provided"
>     +               exit 1
>     +       fi
>     +       run_test $1 || case_error $t
>      else
>             if [ $COMPILE_ONLY -eq 0 ]; then
>                     check_mainstream || exit 1
>     --
>     1.8.3
> 
> 
> 


More information about the CRIU mailing list