From: Subrata Modak <subrata@linux.vnet.ibm.com>
To: Matt Helsley <matthltc@us.ibm.com>
Cc: Poornima Nayak <poornima.nayak@in.ibm.com>,
LTP <ltp-list@lists.sourceforge.net>,
Daniel Lezcano <daniel.lezcano@free.fr>,
Veerendra C <vechandr@in.ibm.com>,
Munipradeep <mbeeraka@in.ibm.com>
Subject: Re: [LTP] [PATCH 2/4] netns: Add ip tools check to netns tests.
Date: Mon, 06 Jul 2009 21:20:42 +0530 [thread overview]
Message-ID: <1246895443.4887.49.camel@subratamodak.linux.ibm.com> (raw)
In-Reply-To: <20090702085829.GD19135@count0.beaverton.ibm.com>
On Thu, 2009-07-02 at 01:58 -0700, Matt Helsley wrote:
> Use ip -V to exclude the network namespace testcases since they require
> version ("snapshot") ss080725 or higher to set the network namespace of
> interfaces used for testing.
>
> Signed-off-by: Matt Helsley <matthltc@us.ibm.com>
Thanks for this as well.
Regards--
Subrata
> Signed-off-by: Sachin P. Sant <sachinp@in.ibm.com>
> Cc: Daniel Lezcano <daniel.lezcano@free.fr>
> Cc: Poornima Nayak <poornima.nayak@in.ibm.com>
> Cc: Sudhir Kumar <skumar@linux.vnet.ibm.com>
> Cc: Veerendra C <vechandr@in.ibm.com>
> Cc: Munipradeep <mbeeraka@in.ibm.com>
> Cc: ltp@list.sourceforge.net
>
> ---
> testcases/kernel/containers/netns/runnetnstest.sh | 21 +++++++++++++++++++++
> 1 file changed, 21 insertions(+)
>
> Index: ltp/testcases/kernel/containers/netns/runnetnstest.sh
> ===================================================================
> --- ltp.orig/testcases/kernel/containers/netns/runnetnstest.sh
> +++ ltp/testcases/kernel/containers/netns/runnetnstest.sh
> @@ -24,6 +24,27 @@
>
> rc=0
> exit_code=0
> +
> +# Check the iproute2 version (aka "SnapShot")
> +IPROUTEV=`ip -V | cut -d ',' -f 2 | cut -d '-' -f 2 | sed -e 's/^ss//'`
> +
> +# We need to strip leading 0s else bash thinks we're giving it octal numbers.
> +IPROUTEY=$(echo ${IPROUTEV:0:2} | sed -e 's/^0\+//') # Year
> +IPROUTEM=$(echo ${IPROUTEV:2:2} | sed -e 's/^0\+//') # Month
> +IPROUTED=$(echo ${IPROUTEV:4:2} | sed -e 's/^0\+//') # Day
> +
> +V=$((${IPROUTEY}*12*32 + ${IPROUTEM}*32 + ${IPROUTED}))
> +
> +#
> +# iproute-ss080725 and later support setting the network namespace of an
> +# interface.
> +#
> +NETNSV=$((8*12*32 + 7*32 + 25))
> +if [ ${V} -lt ${NETNSV} ]; then
> + echo "INFO: iproute tools do not support setting network namespaces. Skipping network namespace tests."
> + exit $exit_code
> +fi
> +
> crtchild
> rc=$?
> if [ $rc -ne 0 ]; then
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next prev parent reply other threads:[~2009-07-06 18:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-02 8:48 [LTP] [PATCH 1/4] netns: Report version of iproute2 tools in ver_linux Matt Helsley
2009-07-02 8:58 ` [LTP] [PATCH 2/4] netns: Add ip tools check to netns tests Matt Helsley
2009-07-06 15:50 ` Subrata Modak [this message]
2009-07-02 9:02 ` [LTP] [PATCH 3/4] netns: Fixup non-sh syntax Matt Helsley
2009-07-03 3:33 ` Garrett Cooper
2009-07-02 9:05 ` [LTP] [PATCH 4/4] netns: Change interpretters from sh to bash Matt Helsley
2009-07-02 18:35 ` Mike Frysinger
2009-07-02 20:32 ` Matt Helsley
2009-07-02 22:09 ` Mike Frysinger
2009-07-06 21:51 ` [LTP] [PATCH] Remove bashisms (WAS Re: [PATCH 4/4] netns: Change interpretters from sh to bash) Matt Helsley
2009-07-06 21:57 ` Garrett Cooper
2009-07-06 23:10 ` Jiří Paleček
2009-07-06 23:24 ` Mike Frysinger
2009-07-07 1:30 ` Matt Helsley
2009-07-06 15:50 ` [LTP] [PATCH 4/4] netns: Change interpretters from sh to bash Subrata Modak
2009-07-06 15:50 ` [LTP] [PATCH 1/4] netns: Report version of iproute2 tools in ver_linux Subrata Modak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1246895443.4887.49.camel@subratamodak.linux.ibm.com \
--to=subrata@linux.vnet.ibm.com \
--cc=daniel.lezcano@free.fr \
--cc=ltp-list@lists.sourceforge.net \
--cc=matthltc@us.ibm.com \
--cc=mbeeraka@in.ibm.com \
--cc=poornima.nayak@in.ibm.com \
--cc=vechandr@in.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.