<div dir="ltr"><div>The idea is great!</div>I'd love to do it.<div><br></div><div>Abandon this one then.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Aug 12, 2013 at 1:02 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:08:11AM -0700, Yicheng Qin wrote:<br>
> From: Yicheng Qin <<a href="mailto:yichengq@google.com">yichengq@google.com</a>><br>
> Subject: [PATCH] test/zdtm: add -n option to run in-namespace tests only<br>
><br>
> Support -n option in zdtm, which means that only in-namespace tests<br>
> will be run.<br>
<br>
</div>zdtm.sh [OPTIONS] [TEST NAME]<br>
What do you think, if we change [TEST NAME] on [TEST PATTER]?<br>
<br>
For example:<br>
bash test/zdtm.sh 'ns/*'<br>
This command runs in-namespace tests only<br>
<br>
I would prefer this variant, because it's more functional.<br>
<br>
Could you implement this functionality?<br>
<br>
Thanks.<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 | 12 ++++++++++++<br>
> 1 file changed, 12 insertions(+)<br>
><br>
> diff --git a/test/zdtm.sh b/test/zdtm.sh<br>
> index 5b064f7..6db2bf0 100755<br>
> --- a/test/zdtm.sh<br>
> +++ b/test/zdtm.sh<br>
> @@ -173,6 +173,7 @@ CLEANUP=0<br>
> PAGE_SERVER=0<br>
> PS_PORT=12345<br>
> TCPDUMP_PID=<br>
> +NS_TEST_ONLY=0<br>
><br>
> check_mainstream()<br>
> {<br>
> @@ -358,6 +359,11 @@ run_test()<br>
> expr "$test" : 'ns/' > /dev/null && PIDNS=1 || PIDNS=""<br>
> test=${ZP}/${test#ns/}<br>
><br>
> + # option '-n' to skip tests without namespace<br>
> + if [[ $NS_TEST_ONLY -eq 1 ]] && [[ "$PIDNS" == "" ]]; then<br>
> + return<br>
> + fi<br>
> +<br>
> shift<br>
> local args=$*<br>
> local tname=`basename $test`<br>
> @@ -629,6 +635,11 @@ while :; do<br>
> shift<br>
> continue;<br>
> fi<br>
> + if [ "$1" = "-n" ]; then<br>
> + shift<br>
> + NS_TEST_ONLY=1<br>
> + continue<br>
> + fi<br>
> if [ "$1" = "-s" ]; then<br>
> SNAPSHOT=1<br>
> shift<br>
> @@ -682,6 +693,7 @@ Options:<br>
> -t : mount tmpfs for dump files<br>
> -a <FILE>.tar.gz : save archive with dump files and logs<br>
> -g : Generate executables only<br>
> + -n : Run tests in namespace only<br>
> EOF<br>
> elif [ "${1:0:1}" = '-' ]; then<br>
> echo "unrecognized option $1"<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>