All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geliang Tang <geliang.tang@suse.com>
To: Matthieu Baerts <matthieu.baerts@tessares.net>
Cc: mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-next v8 8/8] selftests: mptcp: add mp_fail testcases
Date: Fri, 29 Oct 2021 21:21:55 +0800	[thread overview]
Message-ID: <20211029132155.GA4144@bogon> (raw)
In-Reply-To: <04774993-d824-0f62-c55d-bd21e46b99fb@tessares.net>

Hi Matt,

On Fri, Oct 29, 2021 at 12:02:47PM +0200, Matthieu Baerts wrote:
> Hi Geliang,
> 
> Thank you for the new version.
> 
> On 29/10/2021 06:40, Geliang Tang wrote:
> > Added the test cases for MP_FAIL, use 'tc' command to trigger the
> > checksum failure.
> > 
> > Suggested-by: Davide Caratti <dcaratti@redhat.com>
> > Suggested-by: Matthieu Baerts <matthieu.baerts@tessares.net>
> > Signed-off-by: Geliang Tang <geliang.tang@suse.com>
> > ---
> >  tools/testing/selftests/net/mptcp/config      |  5 ++
> >  .../testing/selftests/net/mptcp/mptcp_join.sh | 75 +++++++++++++++++--
> >  2 files changed, 72 insertions(+), 8 deletions(-)
> > 
> > diff --git a/tools/testing/selftests/net/mptcp/config b/tools/testing/selftests/net/mptcp/config
> > index 0faaccd21447..f522288b2204 100644
> > --- a/tools/testing/selftests/net/mptcp/config
> > +++ b/tools/testing/selftests/net/mptcp/config
> > @@ -15,3 +15,8 @@ CONFIG_NETFILTER_XTABLES=m
> >  CONFIG_NETFILTER_XT_MATCH_BPF=m
> >  CONFIG_NF_TABLES_IPV4=y
> >  CONFIG_NF_TABLES_IPV6=y
> > +CONFIG_NET_ACT_CSUM=m
> > +CONFIG_NET_ACT_PEDIT=m
> > +CONFIG_NET_CLS_ACT=m
> > +CONFIG_NET_CLS_FLOWER=m
> > +CONFIG_NET_SCH_INGRESS=m
> > diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> > index 2684ef9c0d42..d33cb5ce0ff3 100755
> > --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
> > +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> > @@ -178,6 +178,12 @@ if [ $? -ne 0 ];then
> >  	exit $ksft_skip
> >  fi
> >  
> > +jq -V > /dev/null 2>&1
> > +if [ $? -ne 0 ];then
> > +	echo "SKIP: Could not run all tests without jq tool"
> > +	exit $ksft_skip
> > +fi
> > +
> >  print_file_err()
> >  {
> >  	ls -l "$1" 1>&2
> > @@ -232,6 +238,28 @@ link_failure()
> >  	done
> >  }
> >  
> > +checksum_failure()
> > +{
> > +	i="$1"
> > +
> > +	tc -n $ns2 qdisc add dev ns2eth$i clsact
> > +	tc -n $ns2 filter add dev ns2eth$i egress \
> > +		protocol ip prio 1000 \
> > +		flower ip_proto tcp \
> > +		action pedit munge offset 148 u32 invert \
> > +		pipe csum tcp \
> > +		index 100
> > +
> > +	while true; do
> > +		local pkt=$(tc -n $ns2 -j -s action show action csum index 100 |
> > +				jq '.[1].actions[0].stats.packets')
> > +		if [ $pkt -gt 0 ]; then
> The CI [1] is complaining about that line:
> 
> [09:34:44.063] # RTNETLINK answers: Operation not supported
> [09:34:44.107] # ./mptcp_join.sh: line 256: [: null: integer expression
> expected
> [09:34:44.267] # RTNETLINK answers: Operation not supported
> [09:34:44.332] # ./mptcp_join.sh: line 256: [: null: integer expression
> expected
> (...)
> 
> This is displayed in a loop as it is a "while true".
> 
> But just before the first one, we had this:
> 
> [09:34:43.859] # Error: Cannot find ingress queue for specified device.
> [09:34:43.955] # Error: Parent Qdisc doesn't exists.
> [09:34:43.959] # We have an error talking to the kernel
> 
> I guess the previous "tc" command failed and I also guess you don't have
> that on your side, right?

Yes, it works on my side.

> 
> Maybe a missing kconfig?

I think so. How can I get the kconfig of the CI?

> 
> I guess it is "safer" to abort if one of the tc command fails.

I just sent a squash-to patch to fix this.

Thanks,
-Geliang

> 
> Cheers,
> Matt
> 
> [1] https://cirrus-ci.com/task/6502115922149376
> -- 
> Tessares | Belgium | Hybrid Access Solutions
> www.tessares.net
> 


  reply	other threads:[~2021-10-29 13:22 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-29  4:40 [PATCH mptcp-next v8 0/8] The infinite mapping support Geliang Tang
2021-10-29  4:40 ` [PATCH mptcp-next v8 1/8] mptcp: don't send RST for single subflow Geliang Tang
2021-10-29  4:40 ` [PATCH mptcp-next v8 2/8] mptcp: add the fallback check Geliang Tang
2021-10-29  4:40 ` [PATCH mptcp-next v8 3/8] mptcp: track and update contiguous data status Geliang Tang
2021-10-29  4:40 ` [PATCH mptcp-next v8 4/8] mptcp: infinite mapping sending Geliang Tang
2021-10-29  4:40 ` [PATCH mptcp-next v8 5/8] mptcp: infinite mapping receiving Geliang Tang
2021-10-29  4:40 ` [PATCH mptcp-next v8 6/8] mptcp: add mib for infinite map sending Geliang Tang
2021-10-29  4:40 ` [PATCH mptcp-next v8 7/8] selftests: mptcp: add infinite map mibs check Geliang Tang
2021-10-29  4:40 ` [PATCH mptcp-next v8 8/8] selftests: mptcp: add mp_fail testcases Geliang Tang
2021-10-29 10:02   ` Matthieu Baerts
2021-10-29 13:21     ` Geliang Tang [this message]
2021-10-29 14:43       ` Paolo Abeni
2021-10-29 19:51         ` Matthieu Baerts
2021-11-04  0:43   ` Mat Martineau
2021-11-04  9:14     ` Matthieu Baerts
2021-11-04 10:30       ` Geliang Tang
2021-11-04 11:48         ` Matthieu Baerts
2021-11-04 13:13           ` Geliang Tang
2021-11-04 13:50             ` Matthieu Baerts
2021-10-29  8:17 ` [PATCH mptcp-next v8 0/8] The infinite mapping support Paolo Abeni
2021-10-29 13:23   ` Geliang Tang
2021-11-05 13:05 ` Matthieu Baerts
2022-01-05 15:56 [PATCH mptcp-next v8 0/8] Clarify when options can be used Matthieu Baerts
2022-01-05 15:57 ` [PATCH mptcp-next v8 8/8] selftests: mptcp: add mp_fail testcases Matthieu Baerts

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=20211029132155.GA4144@bogon \
    --to=geliang.tang@suse.com \
    --cc=matthieu.baerts@tessares.net \
    --cc=mptcp@lists.linux.dev \
    /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.