* Re: [LTP] [PATCH 1/3] lib/test_net.sh: add tst_ping() to check icmp connectivity
[not found] ` <1457334114-10461-2-git-send-email-haliu@redhat.com>
@ 2016-03-09 12:08 ` Alexey Kodanev
2016-03-09 12:11 ` Alexey Kodanev
0 siblings, 1 reply; 7+ messages in thread
From: Alexey Kodanev @ 2016-03-09 12:08 UTC (permalink / raw)
To: Hangbin Liu; +Cc: LTP List
Hi,
On 03/07/2016 10:01 AM, Hangbin Liu wrote:
> Signed-off-by: Hangbin Liu <haliu@redhat.com>
> ---
> testcases/lib/test_net.sh | 37 +++++++++++++++++++++++++++++++++++++
> 1 file changed, 37 insertions(+)
>
> diff --git a/testcases/lib/test_net.sh b/testcases/lib/test_net.sh
> index 418fed3..f75e78e 100644
> --- a/testcases/lib/test_net.sh
> +++ b/testcases/lib/test_net.sh
> @@ -314,3 +314,40 @@ tst_netload()
>
> return $ret
> }
> +
> +# tst_ping IFACE ADDR [SIZE]
> +# Check icmp connectivity
> +# IFACE: source interface name
> +# ADDR: destination IPv4 or IPv6 address
> +# SIZE: message size
> +tst_ping()
> +{
> + # The max number of ICMP echo request
> + PING_MAX=${PING_MAX:-"10"}
> +
> + # Check the arguments
> + if [ $# -lt 2 ]; then
> + tst_resm TBROK "tst_ping src_iface dest_ipv4/6_addr [msg_size]"
> + return 1
> + fi
> +
> + local src_iface=$1
> + local dst_addr=$2
They could be defaulted to $(tst_iface) and $(tst_ipaddr rhost) accordingly.
Then, we don't have to check the number of arguments and it fits for the
most cases.
> + # ping cmd use 56 as default message size
> + local msg_size=${3:-"56"}
> +
> + if echo $dst_addr | grep ":"; then
> + local PING="ping6"
> + TST_IPV6=6
> + else
> + local PING="ping"
> + fi
> +
if test runs with -6 option, TST_IPV6 will be defined as 6, otherwise is "".
We can use it inside test_net.sh and tests. So here, we could call ping
command
as follows: "ping$TST_IPV6 ..."
> + if [ "$dst_addr" == "$(tst_ipaddr)" ]; then
> + tst_rhost_run -c "$PING -I $src_iface -c $PING_MAX $dst_addr \
> + -s $msg_size > /dev/null 2>&1"
> + else
> + $PING -I $src_iface -c $PING_MAX $dst_addr -s $msg_size > \
> + /dev/null 2>&1
> + fi
> +}
Do we actually need to run this command from remote host?
Best regards,
Alexey
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 7+ messages in thread* [LTP] [PATCH 1/3] lib/test_net.sh: add tst_ping() to check icmp connectivity
2016-03-09 12:08 ` [LTP] [PATCH 1/3] lib/test_net.sh: add tst_ping() to check icmp connectivity Alexey Kodanev
@ 2016-03-09 12:11 ` Alexey Kodanev
2016-03-10 6:22 ` Hangbin Liu
0 siblings, 1 reply; 7+ messages in thread
From: Alexey Kodanev @ 2016-03-09 12:11 UTC (permalink / raw)
To: ltp
re-sending to the new ltp list...
On 03/09/2016 03:08 PM, Alexey Kodanev wrote:
> Hi,
> On 03/07/2016 10:01 AM, Hangbin Liu wrote:
>> Signed-off-by: Hangbin Liu <haliu@redhat.com>
>> ---
>> testcases/lib/test_net.sh | 37 +++++++++++++++++++++++++++++++++++++
>> 1 file changed, 37 insertions(+)
>>
>> diff --git a/testcases/lib/test_net.sh b/testcases/lib/test_net.sh
>> index 418fed3..f75e78e 100644
>> --- a/testcases/lib/test_net.sh
>> +++ b/testcases/lib/test_net.sh
>> @@ -314,3 +314,40 @@ tst_netload()
>> return $ret
>> }
>> +
>> +# tst_ping IFACE ADDR [SIZE]
>> +# Check icmp connectivity
>> +# IFACE: source interface name
>> +# ADDR: destination IPv4 or IPv6 address
>> +# SIZE: message size
>> +tst_ping()
>> +{
>> + # The max number of ICMP echo request
>> + PING_MAX=${PING_MAX:-"10"}
>> +
>> + # Check the arguments
>> + if [ $# -lt 2 ]; then
>> + tst_resm TBROK "tst_ping src_iface dest_ipv4/6_addr [msg_size]"
>> + return 1
>> + fi
>> +
>> + local src_iface=$1
>> + local dst_addr=$2
>
> They could be defaulted to $(tst_iface) and $(tst_ipaddr rhost)
> accordingly.
> Then, we don't have to check the number of arguments and it fits for
> the most cases.
>
>> + # ping cmd use 56 as default message size
>> + local msg_size=${3:-"56"}
>> +
>> + if echo $dst_addr | grep ":"; then
>> + local PING="ping6"
>> + TST_IPV6=6
>> + else
>> + local PING="ping"
>> + fi
>> +
>
> if test runs with -6 option, TST_IPV6 will be defined as 6, otherwise
> is "".
> We can use it inside test_net.sh and tests. So here, we could call
> ping command
> as follows: "ping$TST_IPV6 ..."
>
>
>> + if [ "$dst_addr" == "$(tst_ipaddr)" ]; then
>> + tst_rhost_run -c "$PING -I $src_iface -c $PING_MAX $dst_addr \
>> + -s $msg_size > /dev/null 2>&1"
>> + else
>> + $PING -I $src_iface -c $PING_MAX $dst_addr -s $msg_size > \
>> + /dev/null 2>&1
>> + fi
>> +}
>
> Do we actually need to run this command from remote host?
>
> Best regards,
> Alexey
>
^ permalink raw reply [flat|nested] 7+ messages in thread* [LTP] [PATCH 1/3] lib/test_net.sh: add tst_ping() to check icmp connectivity
2016-03-09 12:11 ` Alexey Kodanev
@ 2016-03-10 6:22 ` Hangbin Liu
2016-03-10 7:23 ` Alexey Kodanev
0 siblings, 1 reply; 7+ messages in thread
From: Hangbin Liu @ 2016-03-10 6:22 UTC (permalink / raw)
To: ltp
Hi Alexey,
Thanks for the reply, please see comments in the mail.
On Wed, Mar 09, 2016 at 03:11:36PM +0300, Alexey Kodanev wrote:
> re-sending to the new ltp list...
>
> On 03/09/2016 03:08 PM, Alexey Kodanev wrote:
> >Hi,
> >On 03/07/2016 10:01 AM, Hangbin Liu wrote:
> >>Signed-off-by: Hangbin Liu <haliu@redhat.com>
> >>---
> >> testcases/lib/test_net.sh | 37 +++++++++++++++++++++++++++++++++++++
> >> 1 file changed, 37 insertions(+)
> >>
> >>diff --git a/testcases/lib/test_net.sh b/testcases/lib/test_net.sh
> >>index 418fed3..f75e78e 100644
> >>--- a/testcases/lib/test_net.sh
> >>+++ b/testcases/lib/test_net.sh
> >>@@ -314,3 +314,40 @@ tst_netload()
> >> return $ret
> >> }
> >>+
> >>+# tst_ping IFACE ADDR [SIZE]
> >>+# Check icmp connectivity
> >>+# IFACE: source interface name
> >>+# ADDR: destination IPv4 or IPv6 address
> >>+# SIZE: message size
> >>+tst_ping()
> >>+{
> >>+ # The max number of ICMP echo request
> >>+ PING_MAX=${PING_MAX:-"10"}
> >>+
> >>+ # Check the arguments
> >>+ if [ $# -lt 2 ]; then
> >>+ tst_resm TBROK "tst_ping src_iface dest_ipv4/6_addr [msg_size]"
> >>+ return 1
> >>+ fi
> >>+
> >>+ local src_iface=$1
> >>+ local dst_addr=$2
> >
> >They could be defaulted to $(tst_iface) and $(tst_ipaddr rhost)
> >accordingly.
> >Then, we don't have to check the number of arguments and it fits for the
> >most cases.
ok, I will fix it.
> >
> >>+ # ping cmd use 56 as default message size
> >>+ local msg_size=${3:-"56"}
> >>+
> >>+ if echo $dst_addr | grep ":"; then
> >>+ local PING="ping6"
> >>+ TST_IPV6=6
> >>+ else
> >>+ local PING="ping"
> >>+ fi
> >>+
> >
> >if test runs with -6 option, TST_IPV6 will be defined as 6, otherwise is
> >"".
> >We can use it inside test_net.sh and tests. So here, we could call ping
> >command
> >as follows: "ping$TST_IPV6 ..."
Good idea.
> >
> >
> >>+ if [ "$dst_addr" == "$(tst_ipaddr)" ]; then
> >>+ tst_rhost_run -c "$PING -I $src_iface -c $PING_MAX $dst_addr \
> >>+ -s $msg_size > /dev/null 2>&1"
> >>+ else
> >>+ $PING -I $src_iface -c $PING_MAX $dst_addr -s $msg_size > \
> >>+ /dev/null 2>&1
> >>+ fi
> >>+}
> >
> >Do we actually need to run this command from remote host?
I'm OK with both side. but the previous test run check_icmp_connectivity from
remote.
$LTP_RSH $RHOST ${LTPROOT}/testcases/bin/check_icmpv4_connectivity
So how do you think.
Thanks & Best Regards
Hangbin
^ permalink raw reply [flat|nested] 7+ messages in thread* [LTP] [PATCH 1/3] lib/test_net.sh: add tst_ping() to check icmp connectivity
2016-03-10 6:22 ` Hangbin Liu
@ 2016-03-10 7:23 ` Alexey Kodanev
2016-03-11 3:00 ` Hangbin Liu
0 siblings, 1 reply; 7+ messages in thread
From: Alexey Kodanev @ 2016-03-10 7:23 UTC (permalink / raw)
To: ltp
Hi,
On 03/10/2016 09:22 AM, Hangbin Liu wrote:
>>>
>>>> + if [ "$dst_addr" == "$(tst_ipaddr)" ]; then
>>>> + tst_rhost_run -c "$PING -I $src_iface -c $PING_MAX $dst_addr \
>>>> + -s $msg_size > /dev/null 2>&1"
>>>> + else
>>>> + $PING -I $src_iface -c $PING_MAX $dst_addr -s $msg_size > \
>>>> + /dev/null 2>&1
>>>> + fi
>>>> +}
>>> Do we actually need to run this command from remote host?
> I'm OK with both side. but the previous test run check_icmp_connectivity from
> remote.
>
> $LTP_RSH $RHOST ${LTPROOT}/testcases/bin/check_icmpv4_connectivity
>
> So how do you think.
If we're checking connectivity... it doesn't really matter,
but running it from remote host is not so convenient.
Thanks,
Alexey
^ permalink raw reply [flat|nested] 7+ messages in thread* [LTP] [PATCH 1/3] lib/test_net.sh: add tst_ping() to check icmp connectivity
2016-03-10 7:23 ` Alexey Kodanev
@ 2016-03-11 3:00 ` Hangbin Liu
0 siblings, 0 replies; 7+ messages in thread
From: Hangbin Liu @ 2016-03-11 3:00 UTC (permalink / raw)
To: ltp
On Thu, Mar 10, 2016 at 10:23:14AM +0300, Alexey Kodanev wrote:
> Hi,
> On 03/10/2016 09:22 AM, Hangbin Liu wrote:
> >>>
> >>>>+ if [ "$dst_addr" == "$(tst_ipaddr)" ]; then
> >>>>+ tst_rhost_run -c "$PING -I $src_iface -c $PING_MAX $dst_addr \
> >>>>+ -s $msg_size > /dev/null 2>&1"
> >>>>+ else
> >>>>+ $PING -I $src_iface -c $PING_MAX $dst_addr -s $msg_size > \
> >>>>+ /dev/null 2>&1
> >>>>+ fi
> >>>>+}
> >>>Do we actually need to run this command from remote host?
> >I'm OK with both side. but the previous test run check_icmp_connectivity from
> >remote.
> >
> >$LTP_RSH $RHOST ${LTPROOT}/testcases/bin/check_icmpv4_connectivity
> >
> >So how do you think.
>
> If we're checking connectivity... it doesn't really matter,
> but running it from remote host is not so convenient.
That's also I think :) Will do it on local side.
Thanks
Hangbin
^ permalink raw reply [flat|nested] 7+ messages in thread
* [LTP] [PATCH 0/3] networking/stress: add ip xfrm ipsec support
@ 2016-03-07 7:20 Hangbin Liu
2016-03-07 7:20 ` [LTP] [PATCH 1/3] lib/test_net.sh: add tst_ping() to check icmp connectivity Hangbin Liu
0 siblings, 1 reply; 7+ messages in thread
From: Hangbin Liu @ 2016-03-07 7:20 UTC (permalink / raw)
To: ltp
Hi Alexey and Cyril,
Sorry for the late patches. I was bussy with other stuff durning previous
months. Here I only add an ipsec lib and add ip xfrm support for
icmp4-uni-basic01. I will fix other tests when you feel these patches are
OK.
As we know, most of the network stress tests have IPsec testing, and we use
setkey for configuration. But setkey[1] hasn't updated for a long time. And
some distros, RHEL7 for example, even don't have ipset-tools package. On
other hand, iproute2 is recommend for network configuration. And ip xfrm is
more powerful than setkey. So let's use ip xfrm for ipsec testing.
For c2x function in ipsec_lib.sh. It's only a convert function and do not
print any info. So I kept it with the old style.
[1] http://ipsec-tools.sourceforge.net/
Here is the test result:
# ./networkstress.sh -i
<<<test_start>>>
tag=icmp4-uni-basic01 stime=1457331713
cmdline="icmp4-uni-basic01"
contacts=""
analysis=exit
<<<test_output>>>
icmp4-uni-basic01 1 TINFO : Verify that the kernel is not crashed with receiving and sending various size of ICMP message with the following conditions
icmp4-uni-basic01 1 TINFO : - Test duration is 3600 [sec]
icmp4-uni-basic01 1 TINFO : - Version of IP is IPv4
icmp4-uni-basic01 1 TINFO : - Size of packets are ( 10 100 1000 10000 65507 )
icmp4-uni-basic01 1 TINFO : initialize 'lhost' 'eth1' interface
icmp4-uni-basic01 1 TINFO : initialize 'rhost' 'eth1' interface
icmp4-uni-basic01 1 TPASS : There has IPv4 connectivity with msg_size 10
icmp4-uni-basic01 2 TPASS : There has IPv4 connectivity with msg_size 100
icmp4-uni-basic01 3 TPASS : There has IPv4 connectivity with msg_size 1000
icmp4-uni-basic01 4 TPASS : There has IPv4 connectivity with msg_size 10000
icmp4-uni-basic01 5 TPASS : There has IPv4 connectivity with msg_size 65507
icmp4-uni-basic01 6 TPASS : Test is finished successfully.
icmp4-uni-basic01 7 TINFO : initialize 'lhost' 'eth1' interface
icmp4-uni-basic01 7 TINFO : initialize 'rhost' 'eth1' interface
<<<execution_status>>>
initiation_status="ok"
duration=49 termination_type=exited termination_id=0 corefile=no
cutime=48 cstime=10
<<<test_end>>>
<<<test_start>>>
tag=icmp4-uni-basic02 stime=1457331762
cmdline="icmp4-uni-basic02"
contacts=""
analysis=exit
<<<test_output>>>
incrementing stop
icmp4-uni-basic02 1 TINFO : Verify that the kernel is not crashed with receiving and sending various size of ICMP message with the following conditions
icmp4-uni-basic02 1 TINFO : - Test duration is 3600 [sec]
icmp4-uni-basic02 1 TINFO : - Version of IP is IPv4
icmp4-uni-basic02 1 TINFO : - Size of packets are ( 10 100 1000 10000 65507 )
icmp4-uni-basic02 1 TINFO : - IPsec [ AH / transport ]
icmp4-uni-basic02 1 TINFO : initialize 'lhost' 'eth1' interface
icmp4-uni-basic02 1 TINFO : initialize 'rhost' 'eth1' interface
src 10.0.0.1 dst 10.0.0.2
proto ah spi 0x00001001 reqid 0 mode transport
replay-window 0
auth hmac(sha1) 0x626565665f666973685f706f726b5f73616c6164
sel src 10.0.0.1/32 dst 10.0.0.2/32
src 10.0.0.2 dst 10.0.0.1
proto ah spi 0x00001000 reqid 0 mode transport
replay-window 0
auth hmac(sha1) 0x626565665f666973685f706f726b5f73616c6164
sel src 10.0.0.2/32 dst 10.0.0.1/32
src 10.0.0.1/32 dst 10.0.0.2/32
dir in priority 0 ptype main
tmpl src 10.0.0.1 dst 10.0.0.2
proto ah reqid 0 mode transport
src 10.0.0.2/32 dst 10.0.0.1/32
dir out priority 0 ptype main
tmpl src 10.0.0.2 dst 10.0.0.1
proto ah reqid 0 mode transport
src 10.0.0.2 dst 10.0.0.1
proto ah spi 0x00001000 reqid 0 mode transport
replay-window 0
auth-trunc hmac(sha1) 0x626565665f666973685f706f726b5f73616c6164 96
sel src 10.0.0.2/32 dst 10.0.0.1/32
src 10.0.0.1 dst 10.0.0.2
proto ah spi 0x00001001 reqid 0 mode transport
replay-window 0
auth-trunc hmac(sha1) 0x626565665f666973685f706f726b5f73616c6164 96
sel src 10.0.0.1/32 dst 10.0.0.2/32
src 10.0.0.2/32 dst 10.0.0.1/32
dir in priority 0 ptype main
tmpl src 10.0.0.2 dst 10.0.0.1
proto ah reqid 0 mode transport
src 10.0.0.1/32 dst 10.0.0.2/32
dir out priority 0 ptype main
tmpl src 10.0.0.1 dst 10.0.0.2
proto ah reqid 0 mode transport
icmp4-uni-basic02 1 TPASS : There has IPv4 connectivity with msg_size 10
icmp4-uni-basic02 2 TPASS : There has IPv4 connectivity with msg_size 100
icmp4-uni-basic02 3 TPASS : There has IPv4 connectivity with msg_size 1000
icmp4-uni-basic02 4 TPASS : There has IPv4 connectivity with msg_size 10000
icmp4-uni-basic02 5 TBROK : There is no IPv4 connectivity with msg_size 65507
^^ here is a TBROK in icmp4-uni-basic02, I will fix it in next patch
icmp4-uni-basic02 5 TINFO : initialize 'lhost' 'eth1' interface
icmp4-uni-basic02 5 TINFO : initialize 'rhost' 'eth1' interface
icmp4-uni-basic02 5 TINFO : initialize 'lhost' 'eth1' interface
icmp4-uni-basic02 5 TINFO : initialize 'rhost' 'eth1' interface
<<<execution_status>>>
initiation_status="ok"
duration=62 termination_type=exited termination_id=2 corefile=no
cutime=78 cstime=17
<<<test_end>>>
ltp-pan reported FAIL
Hangbin Liu (3):
lib/test_net.sh: add tst_ping() to check icmp connectivity
network/stress: add ipsec lib
network/stress/icmp: use ip xfrm for icmp4-uni-basic01 ipsec testing
testcases/lib/test_net.sh | 37 ++++++
.../stress/icmp/uni-basic/icmp4-uni-basic01 | 66 ++++------
testcases/network/stress/ipsec/Makefile | 31 +++++
testcases/network/stress/ipsec/ipsec_lib.sh | 134 +++++++++++++++++++++
4 files changed, 224 insertions(+), 44 deletions(-)
create mode 100644 testcases/network/stress/ipsec/Makefile
create mode 100644 testcases/network/stress/ipsec/ipsec_lib.sh
--
2.5.0
^ permalink raw reply [flat|nested] 7+ messages in thread* [LTP] [PATCH 1/3] lib/test_net.sh: add tst_ping() to check icmp connectivity
2016-03-07 7:20 [LTP] [PATCH 0/3] networking/stress: add ip xfrm ipsec support Hangbin Liu
@ 2016-03-07 7:20 ` Hangbin Liu
0 siblings, 0 replies; 7+ messages in thread
From: Hangbin Liu @ 2016-03-07 7:20 UTC (permalink / raw)
To: ltp
Signed-off-by: Hangbin Liu <haliu@redhat.com>
---
testcases/lib/test_net.sh | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/testcases/lib/test_net.sh b/testcases/lib/test_net.sh
index 418fed3..f75e78e 100644
--- a/testcases/lib/test_net.sh
+++ b/testcases/lib/test_net.sh
@@ -314,3 +314,40 @@ tst_netload()
return $ret
}
+
+# tst_ping IFACE ADDR [SIZE]
+# Check icmp connectivity
+# IFACE: source interface name
+# ADDR: destination IPv4 or IPv6 address
+# SIZE: message size
+tst_ping()
+{
+ # The max number of ICMP echo request
+ PING_MAX=${PING_MAX:-"10"}
+
+ # Check the arguments
+ if [ $# -lt 2 ]; then
+ tst_resm TBROK "tst_ping src_iface dest_ipv4/6_addr [msg_size]"
+ return 1
+ fi
+
+ local src_iface=$1
+ local dst_addr=$2
+ # ping cmd use 56 as default message size
+ local msg_size=${3:-"56"}
+
+ if echo $dst_addr | grep ":"; then
+ local PING="ping6"
+ TST_IPV6=6
+ else
+ local PING="ping"
+ fi
+
+ if [ "$dst_addr" == "$(tst_ipaddr)" ]; then
+ tst_rhost_run -c "$PING -I $src_iface -c $PING_MAX $dst_addr \
+ -s $msg_size > /dev/null 2>&1"
+ else
+ $PING -I $src_iface -c $PING_MAX $dst_addr -s $msg_size > \
+ /dev/null 2>&1
+ fi
+}
--
2.5.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [LTP] [PATCH 0/3] networking/stress: add ip xfrm ipsec support
@ 2016-03-07 7:14 Hangbin Liu
2016-03-07 7:14 ` [LTP] [PATCH 1/3] lib/test_net.sh: add tst_ping() to check icmp connectivity Hangbin Liu
0 siblings, 1 reply; 7+ messages in thread
From: Hangbin Liu @ 2016-03-07 7:14 UTC (permalink / raw)
To: ltp
Hi Alexey and Cyril,
Sorry for the late patches. I was bussy with other stuff durning previous
months. Here I only add an ipsec lib and add ip xfrm support for
icmp4-uni-basic01. I will fix other tests when you feel these patches are
OK.
As we know, most of the network stress tests have IPsec testing, and we use
setkey for configuration. But setkey[1] hasn't updated for a long time. And
some distros, RHEL7 for example, even don't have ipset-tools package. On
other hand, iproute2 is recommend for network configuration. And ip xfrm is
more powerful than setkey. So let's use ip xfrm for ipsec testing.
For c2x function in ipsec_lib.sh. It's only a convert function and do not
print any info. So I kept it with the old style.
[1] http://ipsec-tools.sourceforge.net/
Here is the test result:
# ./networkstress.sh -i
<<<test_start>>>
tag=icmp4-uni-basic01 stime=1457331713
cmdline="icmp4-uni-basic01"
contacts=""
analysis=exit
<<<test_output>>>
icmp4-uni-basic01 1 TINFO : Verify that the kernel is not crashed with receiving and sending various size of ICMP message with the following conditions
icmp4-uni-basic01 1 TINFO : - Test duration is 3600 [sec]
icmp4-uni-basic01 1 TINFO : - Version of IP is IPv4
icmp4-uni-basic01 1 TINFO : - Size of packets are ( 10 100 1000 10000 65507 )
icmp4-uni-basic01 1 TINFO : initialize 'lhost' 'eth1' interface
icmp4-uni-basic01 1 TINFO : initialize 'rhost' 'eth1' interface
icmp4-uni-basic01 1 TPASS : There has IPv4 connectivity with msg_size 10
icmp4-uni-basic01 2 TPASS : There has IPv4 connectivity with msg_size 100
icmp4-uni-basic01 3 TPASS : There has IPv4 connectivity with msg_size 1000
icmp4-uni-basic01 4 TPASS : There has IPv4 connectivity with msg_size 10000
icmp4-uni-basic01 5 TPASS : There has IPv4 connectivity with msg_size 65507
icmp4-uni-basic01 6 TPASS : Test is finished successfully.
icmp4-uni-basic01 7 TINFO : initialize 'lhost' 'eth1' interface
icmp4-uni-basic01 7 TINFO : initialize 'rhost' 'eth1' interface
<<<execution_status>>>
initiation_status="ok"
duration=49 termination_type=exited termination_id=0 corefile=no
cutime=48 cstime=10
<<<test_end>>>
<<<test_start>>>
tag=icmp4-uni-basic02 stime=1457331762
cmdline="icmp4-uni-basic02"
contacts=""
analysis=exit
<<<test_output>>>
incrementing stop
icmp4-uni-basic02 1 TINFO : Verify that the kernel is not crashed with receiving and sending various size of ICMP message with the following conditions
icmp4-uni-basic02 1 TINFO : - Test duration is 3600 [sec]
icmp4-uni-basic02 1 TINFO : - Version of IP is IPv4
icmp4-uni-basic02 1 TINFO : - Size of packets are ( 10 100 1000 10000 65507 )
icmp4-uni-basic02 1 TINFO : - IPsec [ AH / transport ]
icmp4-uni-basic02 1 TINFO : initialize 'lhost' 'eth1' interface
icmp4-uni-basic02 1 TINFO : initialize 'rhost' 'eth1' interface
src 10.0.0.1 dst 10.0.0.2
proto ah spi 0x00001001 reqid 0 mode transport
replay-window 0
auth hmac(sha1) 0x626565665f666973685f706f726b5f73616c6164
sel src 10.0.0.1/32 dst 10.0.0.2/32
src 10.0.0.2 dst 10.0.0.1
proto ah spi 0x00001000 reqid 0 mode transport
replay-window 0
auth hmac(sha1) 0x626565665f666973685f706f726b5f73616c6164
sel src 10.0.0.2/32 dst 10.0.0.1/32
src 10.0.0.1/32 dst 10.0.0.2/32
dir in priority 0 ptype main
tmpl src 10.0.0.1 dst 10.0.0.2
proto ah reqid 0 mode transport
src 10.0.0.2/32 dst 10.0.0.1/32
dir out priority 0 ptype main
tmpl src 10.0.0.2 dst 10.0.0.1
proto ah reqid 0 mode transport
src 10.0.0.2 dst 10.0.0.1
proto ah spi 0x00001000 reqid 0 mode transport
replay-window 0
auth-trunc hmac(sha1) 0x626565665f666973685f706f726b5f73616c6164 96
sel src 10.0.0.2/32 dst 10.0.0.1/32
src 10.0.0.1 dst 10.0.0.2
proto ah spi 0x00001001 reqid 0 mode transport
replay-window 0
auth-trunc hmac(sha1) 0x626565665f666973685f706f726b5f73616c6164 96
sel src 10.0.0.1/32 dst 10.0.0.2/32
src 10.0.0.2/32 dst 10.0.0.1/32
dir in priority 0 ptype main
tmpl src 10.0.0.2 dst 10.0.0.1
proto ah reqid 0 mode transport
src 10.0.0.1/32 dst 10.0.0.2/32
dir out priority 0 ptype main
tmpl src 10.0.0.1 dst 10.0.0.2
proto ah reqid 0 mode transport
icmp4-uni-basic02 1 TPASS : There has IPv4 connectivity with msg_size 10
icmp4-uni-basic02 2 TPASS : There has IPv4 connectivity with msg_size 100
icmp4-uni-basic02 3 TPASS : There has IPv4 connectivity with msg_size 1000
icmp4-uni-basic02 4 TPASS : There has IPv4 connectivity with msg_size 10000
icmp4-uni-basic02 5 TBROK : There is no IPv4 connectivity with msg_size 65507
^^ here is a TBROK in icmp4-uni-basic02, I will fix it in next patch
icmp4-uni-basic02 5 TINFO : initialize 'lhost' 'eth1' interface
icmp4-uni-basic02 5 TINFO : initialize 'rhost' 'eth1' interface
icmp4-uni-basic02 5 TINFO : initialize 'lhost' 'eth1' interface
icmp4-uni-basic02 5 TINFO : initialize 'rhost' 'eth1' interface
<<<execution_status>>>
initiation_status="ok"
duration=62 termination_type=exited termination_id=2 corefile=no
cutime=78 cstime=17
<<<test_end>>>
ltp-pan reported FAIL
Hangbin Liu (3):
lib/test_net.sh: add tst_ping() to check icmp connectivity
network/stress: add ipsec lib
network/stress/icmp: use ip xfrm for icmp4-uni-basic01 ipsec testing
testcases/lib/test_net.sh | 37 ++++++
.../stress/icmp/uni-basic/icmp4-uni-basic01 | 66 ++++------
testcases/network/stress/ipsec/Makefile | 31 +++++
testcases/network/stress/ipsec/ipsec_lib.sh | 134 +++++++++++++++++++++
4 files changed, 224 insertions(+), 44 deletions(-)
create mode 100644 testcases/network/stress/ipsec/Makefile
create mode 100644 testcases/network/stress/ipsec/ipsec_lib.sh
--
2.5.0
^ permalink raw reply [flat|nested] 7+ messages in thread* [LTP] [PATCH 1/3] lib/test_net.sh: add tst_ping() to check icmp connectivity
2016-03-07 7:14 [LTP] [PATCH 0/3] networking/stress: add ip xfrm ipsec support Hangbin Liu
@ 2016-03-07 7:14 ` Hangbin Liu
0 siblings, 0 replies; 7+ messages in thread
From: Hangbin Liu @ 2016-03-07 7:14 UTC (permalink / raw)
To: ltp
Signed-off-by: Hangbin Liu <haliu@redhat.com>
---
testcases/lib/test_net.sh | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/testcases/lib/test_net.sh b/testcases/lib/test_net.sh
index 418fed3..f75e78e 100644
--- a/testcases/lib/test_net.sh
+++ b/testcases/lib/test_net.sh
@@ -314,3 +314,40 @@ tst_netload()
return $ret
}
+
+# tst_ping IFACE ADDR [SIZE]
+# Check icmp connectivity
+# IFACE: source interface name
+# ADDR: destination IPv4 or IPv6 address
+# SIZE: message size
+tst_ping()
+{
+ # The max number of ICMP echo request
+ PING_MAX=${PING_MAX:-"10"}
+
+ # Check the arguments
+ if [ $# -lt 2 ]; then
+ tst_resm TBROK "tst_ping src_iface dest_ipv4/6_addr [msg_size]"
+ return 1
+ fi
+
+ local src_iface=$1
+ local dst_addr=$2
+ # ping cmd use 56 as default message size
+ local msg_size=${3:-"56"}
+
+ if echo $dst_addr | grep ":"; then
+ local PING="ping6"
+ TST_IPV6=6
+ else
+ local PING="ping"
+ fi
+
+ if [ "$dst_addr" == "$(tst_ipaddr)" ]; then
+ tst_rhost_run -c "$PING -I $src_iface -c $PING_MAX $dst_addr \
+ -s $msg_size > /dev/null 2>&1"
+ else
+ $PING -I $src_iface -c $PING_MAX $dst_addr -s $msg_size > \
+ /dev/null 2>&1
+ fi
+}
--
2.5.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-03-11 3:00 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1457334114-10461-1-git-send-email-haliu@redhat.com>
[not found] ` <1457334114-10461-2-git-send-email-haliu@redhat.com>
2016-03-09 12:08 ` [LTP] [PATCH 1/3] lib/test_net.sh: add tst_ping() to check icmp connectivity Alexey Kodanev
2016-03-09 12:11 ` Alexey Kodanev
2016-03-10 6:22 ` Hangbin Liu
2016-03-10 7:23 ` Alexey Kodanev
2016-03-11 3:00 ` Hangbin Liu
2016-03-07 7:20 [LTP] [PATCH 0/3] networking/stress: add ip xfrm ipsec support Hangbin Liu
2016-03-07 7:20 ` [LTP] [PATCH 1/3] lib/test_net.sh: add tst_ping() to check icmp connectivity Hangbin Liu
-- strict thread matches above, loose matches on Subject: below --
2016-03-07 7:14 [LTP] [PATCH 0/3] networking/stress: add ip xfrm ipsec support Hangbin Liu
2016-03-07 7:14 ` [LTP] [PATCH 1/3] lib/test_net.sh: add tst_ping() to check icmp connectivity Hangbin Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox