* [LTP] [PATCH 0/2] Add TST_NET_IPV{4,6}_ONLY and use on broken_ip
@ 2021-07-14 14:07 Petr Vorel
2021-07-14 14:07 ` [LTP] [PATCH 1/2] tst_net.sh: Add variable for supported protocol Petr Vorel
` (2 more replies)
0 siblings, 3 replies; 14+ messages in thread
From: Petr Vorel @ 2021-07-14 14:07 UTC (permalink / raw)
To: ltp
Hi Alexey,
https://github.com/linux-test-project/ltp/issues/843
does it make sense to run it on IPv4 and broken_ip-totlen on IPv6?
Both don't break but not in runtest file.
Kind regards,
Petr
Petr Vorel (2):
tst_net.sh: Add variable for supported protocol
broken_ip: TCONF when test run on unsupported protocol
testcases/lib/tst_net.sh | 8 ++++++++
testcases/lib/tst_test.sh | 2 +-
testcases/network/stress/broken_ip/broken_ip-checksum | 3 ++-
testcases/network/stress/broken_ip/broken_ip-fragment | 3 ++-
testcases/network/stress/broken_ip/broken_ip-ihl | 3 ++-
testcases/network/stress/broken_ip/broken_ip-nexthdr | 3 ++-
testcases/network/stress/broken_ip/broken_ip-protcol | 3 ++-
7 files changed, 19 insertions(+), 6 deletions(-)
--
2.32.0
^ permalink raw reply [flat|nested] 14+ messages in thread* [LTP] [PATCH 1/2] tst_net.sh: Add variable for supported protocol 2021-07-14 14:07 [LTP] [PATCH 0/2] Add TST_NET_IPV{4,6}_ONLY and use on broken_ip Petr Vorel @ 2021-07-14 14:07 ` Petr Vorel 2021-07-14 14:07 ` [LTP] [PATCH 2/2] broken_ip: TCONF when test run on unsupported protocol Petr Vorel 2021-07-15 9:38 ` [LTP] [PATCH 0/2] Add TST_NET_IPV{4, 6}_ONLY and use on broken_ip Alexey Kodanev 2 siblings, 0 replies; 14+ messages in thread From: Petr Vorel @ 2021-07-14 14:07 UTC (permalink / raw) To: ltp via TST_NET_IPV{4,6}_ONLY variables. Signed-off-by: Petr Vorel <pvorel@suse.cz> --- testcases/lib/tst_net.sh | 8 ++++++++ testcases/lib/tst_test.sh | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/testcases/lib/tst_net.sh b/testcases/lib/tst_net.sh index 511fb7eb1..b90fd9dfa 100644 --- a/testcases/lib/tst_net.sh +++ b/testcases/lib/tst_net.sh @@ -59,6 +59,14 @@ tst_net_remote_tmpdir() tst_net_setup() { + if [ "$TST_NET_IPV4_ONLY" = 1 -a $TST_IPVER = 6 ]; then + tst_brk TCONF "Test must be run on IPv4 only" + fi + + if [ "$TST_NET_IPV6_ONLY" = 1 -a $TST_IPVER = 4 ]; then + tst_brk TCONF "Test must be run on IPv6 only" + fi + tst_net_remote_tmpdir [ -n "$TST_SETUP_CALLER" ] && $TST_SETUP_CALLER diff --git a/testcases/lib/tst_test.sh b/testcases/lib/tst_test.sh index c6aa2c487..6e64ef0ff 100644 --- a/testcases/lib/tst_test.sh +++ b/testcases/lib/tst_test.sh @@ -577,7 +577,7 @@ tst_run() IPV6|IPV6_FLAG|IPVER|TEST_DATA|TEST_DATA_IFS);; RETRY_FUNC|RETRY_FN_EXP_BACKOFF|TIMEOUT);; NET_DATAROOT|NET_MAX_PKT|NET_RHOST_RUN_DEBUG|NETLOAD_CLN_NUMBER);; - NET_SKIP_VARIABLE_INIT);; + NET_IPV4_ONLY|NET_IPV6_ONLY|NET_SKIP_VARIABLE_INIT);; *) tst_res TWARN "Reserved variable TST_$_tst_i used!";; esac done -- 2.32.0 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* [LTP] [PATCH 2/2] broken_ip: TCONF when test run on unsupported protocol 2021-07-14 14:07 [LTP] [PATCH 0/2] Add TST_NET_IPV{4,6}_ONLY and use on broken_ip Petr Vorel 2021-07-14 14:07 ` [LTP] [PATCH 1/2] tst_net.sh: Add variable for supported protocol Petr Vorel @ 2021-07-14 14:07 ` Petr Vorel 2021-07-15 9:53 ` Alexey Kodanev 2021-07-15 9:38 ` [LTP] [PATCH 0/2] Add TST_NET_IPV{4, 6}_ONLY and use on broken_ip Alexey Kodanev 2 siblings, 1 reply; 14+ messages in thread From: Petr Vorel @ 2021-07-14 14:07 UTC (permalink / raw) To: ltp net_stress.broken_ip runtest file is correct, but some users try to run tests manually. Fixes: #843 Signed-off-by: Petr Vorel <pvorel@suse.cz> --- testcases/network/stress/broken_ip/broken_ip-checksum | 3 ++- testcases/network/stress/broken_ip/broken_ip-fragment | 3 ++- testcases/network/stress/broken_ip/broken_ip-ihl | 3 ++- testcases/network/stress/broken_ip/broken_ip-nexthdr | 3 ++- testcases/network/stress/broken_ip/broken_ip-protcol | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/testcases/network/stress/broken_ip/broken_ip-checksum b/testcases/network/stress/broken_ip/broken_ip-checksum index 78f00ce98..707ffcb29 100644 --- a/testcases/network/stress/broken_ip/broken_ip-checksum +++ b/testcases/network/stress/broken_ip/broken_ip-checksum @@ -1,11 +1,12 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0-or-later -# Copyright (c) 2019 Petr Vorel <pvorel@suse.cz> +# Copyright (c) 2019-2021 Petr Vorel <pvorel@suse.cz> # Copyright (c) 2014-2017 Oracle and/or its affiliates. All Rights Reserved. # Copyright (c) International Business Machines Corp., 2006 # Author: Mitsuru Chinen <mitch@jp.ibm.com> TST_TESTFUNC="do_test" +TST_NET_IPV4_ONLY=1 . tst_net.sh do_test() diff --git a/testcases/network/stress/broken_ip/broken_ip-fragment b/testcases/network/stress/broken_ip/broken_ip-fragment index 1f5e5f713..7356bb523 100644 --- a/testcases/network/stress/broken_ip/broken_ip-fragment +++ b/testcases/network/stress/broken_ip/broken_ip-fragment @@ -1,11 +1,12 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0-or-later -# Copyright (c) 2019 Petr Vorel <pvorel@suse.cz> +# Copyright (c) 2019-2021 Petr Vorel <pvorel@suse.cz> # Copyright (c) 2014-2017 Oracle and/or its affiliates. All Rights Reserved. # Copyright (c) International Business Machines Corp., 2006 # Author: Mitsuru Chinen <mitch@jp.ibm.com> TST_TESTFUNC="do_test" +TST_NET_IPV4_ONLY=1 . tst_net.sh do_test() diff --git a/testcases/network/stress/broken_ip/broken_ip-ihl b/testcases/network/stress/broken_ip/broken_ip-ihl index 9f2a42568..e5e41ee8e 100644 --- a/testcases/network/stress/broken_ip/broken_ip-ihl +++ b/testcases/network/stress/broken_ip/broken_ip-ihl @@ -1,11 +1,12 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0-or-later -# Copyright (c) 2019 Petr Vorel <pvorel@suse.cz> +# Copyright (c) 2019-2021 Petr Vorel <pvorel@suse.cz> # Copyright (c) 2014-2017 Oracle and/or its affiliates. All Rights Reserved. # Copyright (c) International Business Machines Corp., 2006 # Author: Mitsuru Chinen <mitch@jp.ibm.com> TST_TESTFUNC="do_test" +TST_NET_IPV4_ONLY=1 . tst_net.sh do_test() diff --git a/testcases/network/stress/broken_ip/broken_ip-nexthdr b/testcases/network/stress/broken_ip/broken_ip-nexthdr index 475b92b16..2ab0601ac 100644 --- a/testcases/network/stress/broken_ip/broken_ip-nexthdr +++ b/testcases/network/stress/broken_ip/broken_ip-nexthdr @@ -1,11 +1,12 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0-or-later -# Copyright (c) 2019 Petr Vorel <pvorel@suse.cz> +# Copyright (c) 2019-2021 Petr Vorel <pvorel@suse.cz> # Copyright (c) 2014-2017 Oracle and/or its affiliates. All Rights Reserved. # Copyright (c) International Business Machines Corp., 2006 # Author: Mitsuru Chinen <mitch@jp.ibm.com> TST_TESTFUNC="do_test" +TST_NET_IPV6_ONLY=1 . tst_net.sh do_test() diff --git a/testcases/network/stress/broken_ip/broken_ip-protcol b/testcases/network/stress/broken_ip/broken_ip-protcol index a91cdaaeb..9f9275f03 100644 --- a/testcases/network/stress/broken_ip/broken_ip-protcol +++ b/testcases/network/stress/broken_ip/broken_ip-protcol @@ -1,11 +1,12 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0-or-later -# Copyright (c) 2019 Petr Vorel <pvorel@suse.cz> +# Copyright (c) 2019-2021 Petr Vorel <pvorel@suse.cz> # Copyright (c) 2014-2017 Oracle and/or its affiliates. All Rights Reserved. # Copyright (c) International Business Machines Corp., 2006 # Author: Mitsuru Chinen <mitch@jp.ibm.com> TST_TESTFUNC="do_test" +TST_NET_IPV4_ONLY=1 . tst_net.sh do_test() -- 2.32.0 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* [LTP] [PATCH 2/2] broken_ip: TCONF when test run on unsupported protocol 2021-07-14 14:07 ` [LTP] [PATCH 2/2] broken_ip: TCONF when test run on unsupported protocol Petr Vorel @ 2021-07-15 9:53 ` Alexey Kodanev 2021-07-15 12:07 ` Petr Vorel 2021-07-27 17:35 ` Petr Vorel 0 siblings, 2 replies; 14+ messages in thread From: Alexey Kodanev @ 2021-07-15 9:53 UTC (permalink / raw) To: ltp On 14.07.2021 17:07, Petr Vorel wrote: > net_stress.broken_ip runtest file is correct, but some users try to run > tests manually. > > Fixes: #843 > > Signed-off-by: Petr Vorel <pvorel@suse.cz> > --- > testcases/network/stress/broken_ip/broken_ip-checksum | 3 ++- > testcases/network/stress/broken_ip/broken_ip-fragment | 3 ++- > testcases/network/stress/broken_ip/broken_ip-ihl | 3 ++- > testcases/network/stress/broken_ip/broken_ip-nexthdr | 3 ++- > testcases/network/stress/broken_ip/broken_ip-protcol | 3 ++- > 5 files changed, 10 insertions(+), 5 deletions(-) > > diff --git a/testcases/network/stress/broken_ip/broken_ip-checksum b/testcases/network/stress/broken_ip/broken_ip-checksum > index 78f00ce98..707ffcb29 100644 > --- a/testcases/network/stress/broken_ip/broken_ip-checksum > +++ b/testcases/network/stress/broken_ip/broken_ip-checksum > @@ -1,11 +1,12 @@ > #!/bin/sh > # SPDX-License-Identifier: GPL-2.0-or-later > -# Copyright (c) 2019 Petr Vorel <pvorel@suse.cz> > +# Copyright (c) 2019-2021 Petr Vorel <pvorel@suse.cz> > # Copyright (c) 2014-2017 Oracle and/or its affiliates. All Rights Reserved. > # Copyright (c) International Business Machines Corp., 2006 > # Author: Mitsuru Chinen <mitch@jp.ibm.com> > > TST_TESTFUNC="do_test" > +TST_NET_IPV4_ONLY=1 > . tst_net.sh > > do_test() > diff --git a/testcases/network/stress/broken_ip/broken_ip-fragment b/testcases/network/stress/broken_ip/broken_ip-fragment > index 1f5e5f713..7356bb523 100644 > --- a/testcases/network/stress/broken_ip/broken_ip-fragment > +++ b/testcases/network/stress/broken_ip/broken_ip-fragment > @@ -1,11 +1,12 @@ > #!/bin/sh > # SPDX-License-Identifier: GPL-2.0-or-later > -# Copyright (c) 2019 Petr Vorel <pvorel@suse.cz> > +# Copyright (c) 2019-2021 Petr Vorel <pvorel@suse.cz> > # Copyright (c) 2014-2017 Oracle and/or its affiliates. All Rights Reserved. > # Copyright (c) International Business Machines Corp., 2006 > # Author: Mitsuru Chinen <mitch@jp.ibm.com> > > TST_TESTFUNC="do_test" > +TST_NET_IPV4_ONLY=1 > . tst_net.sh > > do_test() > diff --git a/testcases/network/stress/broken_ip/broken_ip-ihl b/testcases/network/stress/broken_ip/broken_ip-ihl > index 9f2a42568..e5e41ee8e 100644 > --- a/testcases/network/stress/broken_ip/broken_ip-ihl > +++ b/testcases/network/stress/broken_ip/broken_ip-ihl > @@ -1,11 +1,12 @@ > #!/bin/sh > # SPDX-License-Identifier: GPL-2.0-or-later > -# Copyright (c) 2019 Petr Vorel <pvorel@suse.cz> > +# Copyright (c) 2019-2021 Petr Vorel <pvorel@suse.cz> > # Copyright (c) 2014-2017 Oracle and/or its affiliates. All Rights Reserved. > # Copyright (c) International Business Machines Corp., 2006 > # Author: Mitsuru Chinen <mitch@jp.ibm.com> > > TST_TESTFUNC="do_test" > +TST_NET_IPV4_ONLY=1 > . tst_net.sh > > do_test() > diff --git a/testcases/network/stress/broken_ip/broken_ip-nexthdr b/testcases/network/stress/broken_ip/broken_ip-nexthdr > index 475b92b16..2ab0601ac 100644 > --- a/testcases/network/stress/broken_ip/broken_ip-nexthdr > +++ b/testcases/network/stress/broken_ip/broken_ip-nexthdr > @@ -1,11 +1,12 @@ > #!/bin/sh > # SPDX-License-Identifier: GPL-2.0-or-later > -# Copyright (c) 2019 Petr Vorel <pvorel@suse.cz> > +# Copyright (c) 2019-2021 Petr Vorel <pvorel@suse.cz> > # Copyright (c) 2014-2017 Oracle and/or its affiliates. All Rights Reserved. > # Copyright (c) International Business Machines Corp., 2006 > # Author: Mitsuru Chinen <mitch@jp.ibm.com> > > TST_TESTFUNC="do_test" > +TST_NET_IPV6_ONLY=1 +TST_IPV6=6 won't work to fix #843? > . tst_net.sh > > do_test() > diff --git a/testcases/network/stress/broken_ip/broken_ip-protcol b/testcases/network/stress/broken_ip/broken_ip-protcol > index a91cdaaeb..9f9275f03 100644 > --- a/testcases/network/stress/broken_ip/broken_ip-protcol > +++ b/testcases/network/stress/broken_ip/broken_ip-protcol > @@ -1,11 +1,12 @@ > #!/bin/sh > # SPDX-License-Identifier: GPL-2.0-or-later > -# Copyright (c) 2019 Petr Vorel <pvorel@suse.cz> > +# Copyright (c) 2019-2021 Petr Vorel <pvorel@suse.cz> > # Copyright (c) 2014-2017 Oracle and/or its affiliates. All Rights Reserved. > # Copyright (c) International Business Machines Corp., 2006 > # Author: Mitsuru Chinen <mitch@jp.ibm.com> > > TST_TESTFUNC="do_test" > +TST_NET_IPV4_ONLY=1 > . tst_net.sh > > do_test() > The generic version looks fine: Reviewed-by: Alexey Kodanev <aleksei.kodanev@bell-sw.com> ^ permalink raw reply [flat|nested] 14+ messages in thread
* [LTP] [PATCH 2/2] broken_ip: TCONF when test run on unsupported protocol 2021-07-15 9:53 ` Alexey Kodanev @ 2021-07-15 12:07 ` Petr Vorel 2021-07-27 17:35 ` Petr Vorel 1 sibling, 0 replies; 14+ messages in thread From: Petr Vorel @ 2021-07-15 12:07 UTC (permalink / raw) To: ltp Hi Alexey, ... > > TST_TESTFUNC="do_test" > > +TST_NET_IPV6_ONLY=1 > +TST_IPV6=6 won't work to fix #843? Sure, it'd fix it. And TST_IPV6= for broken_ip-ihl. That's a simple way to fix it. But I thought having TST_NET_IPV{4,6}_ONLY=1 would be self descriptive + it could be later processed with docparse metadata documentation (I plan to implement docparse for shell). So it's more a question whether we want to manifest this info. Kind regards, Petr ... > > TST_TESTFUNC="do_test" > > +TST_NET_IPV4_ONLY=1 > > . tst_net.sh > > do_test() > The generic version looks fine: > Reviewed-by: Alexey Kodanev <aleksei.kodanev@bell-sw.com> ^ permalink raw reply [flat|nested] 14+ messages in thread
* [LTP] [PATCH 2/2] broken_ip: TCONF when test run on unsupported protocol 2021-07-15 9:53 ` Alexey Kodanev 2021-07-15 12:07 ` Petr Vorel @ 2021-07-27 17:35 ` Petr Vorel 2021-07-28 11:20 ` Alexey Kodanev 1 sibling, 1 reply; 14+ messages in thread From: Petr Vorel @ 2021-07-27 17:35 UTC (permalink / raw) To: ltp Hi Alexey, > On 14.07.2021 17:07, Petr Vorel wrote: > > net_stress.broken_ip runtest file is correct, but some users try to run > > tests manually. > > Fixes: #843 > > Signed-off-by: Petr Vorel <pvorel@suse.cz> > > --- > > testcases/network/stress/broken_ip/broken_ip-checksum | 3 ++- > > testcases/network/stress/broken_ip/broken_ip-fragment | 3 ++- > > testcases/network/stress/broken_ip/broken_ip-ihl | 3 ++- > > testcases/network/stress/broken_ip/broken_ip-nexthdr | 3 ++- > > testcases/network/stress/broken_ip/broken_ip-protcol | 3 ++- > > 5 files changed, 10 insertions(+), 5 deletions(-) > > diff --git a/testcases/network/stress/broken_ip/broken_ip-checksum b/testcases/network/stress/broken_ip/broken_ip-checksum > > index 78f00ce98..707ffcb29 100644 > > --- a/testcases/network/stress/broken_ip/broken_ip-checksum > > +++ b/testcases/network/stress/broken_ip/broken_ip-checksum > > @@ -1,11 +1,12 @@ > > #!/bin/sh > > # SPDX-License-Identifier: GPL-2.0-or-later > > -# Copyright (c) 2019 Petr Vorel <pvorel@suse.cz> > > +# Copyright (c) 2019-2021 Petr Vorel <pvorel@suse.cz> > > # Copyright (c) 2014-2017 Oracle and/or its affiliates. All Rights Reserved. > > # Copyright (c) International Business Machines Corp., 2006 > > # Author: Mitsuru Chinen <mitch@jp.ibm.com> > > TST_TESTFUNC="do_test" > > +TST_NET_IPV4_ONLY=1 > > . tst_net.sh > > do_test() > > diff --git a/testcases/network/stress/broken_ip/broken_ip-fragment b/testcases/network/stress/broken_ip/broken_ip-fragment > > index 1f5e5f713..7356bb523 100644 > > --- a/testcases/network/stress/broken_ip/broken_ip-fragment > > +++ b/testcases/network/stress/broken_ip/broken_ip-fragment > > @@ -1,11 +1,12 @@ > > #!/bin/sh > > # SPDX-License-Identifier: GPL-2.0-or-later > > -# Copyright (c) 2019 Petr Vorel <pvorel@suse.cz> > > +# Copyright (c) 2019-2021 Petr Vorel <pvorel@suse.cz> > > # Copyright (c) 2014-2017 Oracle and/or its affiliates. All Rights Reserved. > > # Copyright (c) International Business Machines Corp., 2006 > > # Author: Mitsuru Chinen <mitch@jp.ibm.com> > > TST_TESTFUNC="do_test" > > +TST_NET_IPV4_ONLY=1 > > . tst_net.sh > > do_test() > > diff --git a/testcases/network/stress/broken_ip/broken_ip-ihl b/testcases/network/stress/broken_ip/broken_ip-ihl > > index 9f2a42568..e5e41ee8e 100644 > > --- a/testcases/network/stress/broken_ip/broken_ip-ihl > > +++ b/testcases/network/stress/broken_ip/broken_ip-ihl > > @@ -1,11 +1,12 @@ > > #!/bin/sh > > # SPDX-License-Identifier: GPL-2.0-or-later > > -# Copyright (c) 2019 Petr Vorel <pvorel@suse.cz> > > +# Copyright (c) 2019-2021 Petr Vorel <pvorel@suse.cz> > > # Copyright (c) 2014-2017 Oracle and/or its affiliates. All Rights Reserved. > > # Copyright (c) International Business Machines Corp., 2006 > > # Author: Mitsuru Chinen <mitch@jp.ibm.com> > > TST_TESTFUNC="do_test" > > +TST_NET_IPV4_ONLY=1 > > . tst_net.sh > > do_test() > > diff --git a/testcases/network/stress/broken_ip/broken_ip-nexthdr b/testcases/network/stress/broken_ip/broken_ip-nexthdr > > index 475b92b16..2ab0601ac 100644 > > --- a/testcases/network/stress/broken_ip/broken_ip-nexthdr > > +++ b/testcases/network/stress/broken_ip/broken_ip-nexthdr > > @@ -1,11 +1,12 @@ > > #!/bin/sh > > # SPDX-License-Identifier: GPL-2.0-or-later > > -# Copyright (c) 2019 Petr Vorel <pvorel@suse.cz> > > +# Copyright (c) 2019-2021 Petr Vorel <pvorel@suse.cz> > > # Copyright (c) 2014-2017 Oracle and/or its affiliates. All Rights Reserved. > > # Copyright (c) International Business Machines Corp., 2006 > > # Author: Mitsuru Chinen <mitch@jp.ibm.com> > > TST_TESTFUNC="do_test" > > +TST_NET_IPV6_ONLY=1 > +TST_IPV6=6 won't work to fix #843? > > . tst_net.sh > > do_test() > > diff --git a/testcases/network/stress/broken_ip/broken_ip-protcol b/testcases/network/stress/broken_ip/broken_ip-protcol > > index a91cdaaeb..9f9275f03 100644 > > --- a/testcases/network/stress/broken_ip/broken_ip-protcol > > +++ b/testcases/network/stress/broken_ip/broken_ip-protcol > > @@ -1,11 +1,12 @@ > > #!/bin/sh > > # SPDX-License-Identifier: GPL-2.0-or-later > > -# Copyright (c) 2019 Petr Vorel <pvorel@suse.cz> > > +# Copyright (c) 2019-2021 Petr Vorel <pvorel@suse.cz> > > # Copyright (c) 2014-2017 Oracle and/or its affiliates. All Rights Reserved. > > # Copyright (c) International Business Machines Corp., 2006 > > # Author: Mitsuru Chinen <mitch@jp.ibm.com> > > TST_TESTFUNC="do_test" > > +TST_NET_IPV4_ONLY=1 > > . tst_net.sh > > do_test() > The generic version looks fine: > Reviewed-by: Alexey Kodanev <aleksei.kodanev@bell-sw.com> I didn't understand whether you'd prefer to add TST_IPV6=6 (or TST_IPV6=) where needed or accept this patchset. Both would work. Kind regards, Petr ^ permalink raw reply [flat|nested] 14+ messages in thread
* [LTP] [PATCH 2/2] broken_ip: TCONF when test run on unsupported protocol 2021-07-27 17:35 ` Petr Vorel @ 2021-07-28 11:20 ` Alexey Kodanev 2021-07-28 13:08 ` Petr Vorel 2021-08-02 18:06 ` Petr Vorel 0 siblings, 2 replies; 14+ messages in thread From: Alexey Kodanev @ 2021-07-28 11:20 UTC (permalink / raw) To: ltp Hi Petr, On 27.07.2021 20:35, Petr Vorel wrote: > Hi Alexey, > >> On 14.07.2021 17:07, Petr Vorel wrote: >>> net_stress.broken_ip runtest file is correct, but some users try to run >>> tests manually. > >>> Fixes: #843 > ... >>> do_test() > >> The generic version looks fine: > >> Reviewed-by: Alexey Kodanev <aleksei.kodanev@bell-sw.com> > > I didn't understand whether you'd prefer to add TST_IPV6=6 (or TST_IPV6=) where > needed or accept this patchset. Both would work. I think for manual runs it is better to set TST_IPV6=6 in the test so it will run the test rather the require passing some options. > Kind regards, > Petr > ^ permalink raw reply [flat|nested] 14+ messages in thread
* [LTP] [PATCH 2/2] broken_ip: TCONF when test run on unsupported protocol 2021-07-28 11:20 ` Alexey Kodanev @ 2021-07-28 13:08 ` Petr Vorel 2021-08-02 18:06 ` Petr Vorel 1 sibling, 0 replies; 14+ messages in thread From: Petr Vorel @ 2021-07-28 13:08 UTC (permalink / raw) To: ltp > Hi Petr, > On 27.07.2021 20:35, Petr Vorel wrote: > > Hi Alexey, > >> On 14.07.2021 17:07, Petr Vorel wrote: > >>> net_stress.broken_ip runtest file is correct, but some users try to run > >>> tests manually. > >>> Fixes: #843 > ... > >>> do_test() > >> The generic version looks fine: > >> Reviewed-by: Alexey Kodanev <aleksei.kodanev@bell-sw.com> > > I didn't understand whether you'd prefer to add TST_IPV6=6 (or TST_IPV6=) where > > needed or accept this patchset. Both would work. > I think for manual runs it is better to set TST_IPV6=6 in the test > so it will run the test rather the require passing some options. +1. Kind regards, Petr > > Kind regards, > > Petr ^ permalink raw reply [flat|nested] 14+ messages in thread
* [LTP] [PATCH 2/2] broken_ip: TCONF when test run on unsupported protocol 2021-07-28 11:20 ` Alexey Kodanev 2021-07-28 13:08 ` Petr Vorel @ 2021-08-02 18:06 ` Petr Vorel 2021-08-03 10:31 ` Alexey Kodanev 1 sibling, 1 reply; 14+ messages in thread From: Petr Vorel @ 2021-08-02 18:06 UTC (permalink / raw) To: ltp Hi Alexey, > Hi Petr, > On 27.07.2021 20:35, Petr Vorel wrote: > > Hi Alexey, > >> On 14.07.2021 17:07, Petr Vorel wrote: > >>> net_stress.broken_ip runtest file is correct, but some users try to run > >>> tests manually. > >>> Fixes: #843 > ... > >>> do_test() > >> The generic version looks fine: > >> Reviewed-by: Alexey Kodanev <aleksei.kodanev@bell-sw.com> > > I didn't understand whether you'd prefer to add TST_IPV6=6 (or TST_IPV6=) where > > needed or accept this patchset. Both would work. > I think for manual runs it is better to set TST_IPV6=6 in the test > so it will run the test rather the require passing some options. It looks like specifying TST_IPV6=6 is not enough, because tests are using $NS_ICMP_SENDER_DATA_MAXSIZE which is defined in tst_net.sh according to TST_IPV6. We can 1) overwrite NS_ICMP_SENDER_DATA_MAXSIZE="$NS_ICMPV6_SENDER_DATA_MAXSIZE" 2) check TST_IPV6 before running tst_net_parse_args and if set overwrite -6 flag But both are quite ugly, thus unless you have better idea I merge this patchset. Kind regards, Petr > > Kind regards, > > Petr ^ permalink raw reply [flat|nested] 14+ messages in thread
* [LTP] [PATCH 2/2] broken_ip: TCONF when test run on unsupported protocol 2021-08-02 18:06 ` Petr Vorel @ 2021-08-03 10:31 ` Alexey Kodanev 2021-08-03 15:37 ` Petr Vorel 0 siblings, 1 reply; 14+ messages in thread From: Alexey Kodanev @ 2021-08-03 10:31 UTC (permalink / raw) To: ltp Hi Petr, On 02.08.2021 21:06, Petr Vorel wrote: > Hi Alexey, > >> Hi Petr, >> On 27.07.2021 20:35, Petr Vorel wrote: >>> Hi Alexey, > >>>> On 14.07.2021 17:07, Petr Vorel wrote: >>>>> net_stress.broken_ip runtest file is correct, but some users try to run >>>>> tests manually. > >>>>> Fixes: #843 > >> ... >>>>> do_test() > >>>> The generic version looks fine: > >>>> Reviewed-by: Alexey Kodanev <aleksei.kodanev@bell-sw.com> > >>> I didn't understand whether you'd prefer to add TST_IPV6=6 (or TST_IPV6=) where >>> needed or accept this patchset. Both would work. > >> I think for manual runs it is better to set TST_IPV6=6 in the test >> so it will run the test rather the require passing some options. > It looks like specifying TST_IPV6=6 is not enough, because tests are using > $NS_ICMP_SENDER_DATA_MAXSIZE which is defined in tst_net.sh according to > TST_IPV6. We can > > 1) overwrite NS_ICMP_SENDER_DATA_MAXSIZE="$NS_ICMPV6_SENDER_DATA_MAXSIZE" > 2) check TST_IPV6 before running tst_net_parse_args and if set overwrite -6 flag > > But both are quite ugly, thus unless you have better idea I merge this patchset. Are you sure that you are getting the wrong maxsize? if TST_IPV6=6 is set before the setup, in the test, why tst_net_setup() is setting the IPv4 value? > > Kind regards, > Petr > >>> Kind regards, >>> Petr > > ^ permalink raw reply [flat|nested] 14+ messages in thread
* [LTP] [PATCH 2/2] broken_ip: TCONF when test run on unsupported protocol 2021-08-03 10:31 ` Alexey Kodanev @ 2021-08-03 15:37 ` Petr Vorel 2021-08-03 16:22 ` Petr Vorel 0 siblings, 1 reply; 14+ messages in thread From: Petr Vorel @ 2021-08-03 15:37 UTC (permalink / raw) To: ltp Hi Alexey, > Hi Petr, > On 02.08.2021 21:06, Petr Vorel wrote: > > Hi Alexey, > >> Hi Petr, > >> On 27.07.2021 20:35, Petr Vorel wrote: > >>> Hi Alexey, > >>>> On 14.07.2021 17:07, Petr Vorel wrote: > >>>>> net_stress.broken_ip runtest file is correct, but some users try to run > >>>>> tests manually. > >>>>> Fixes: #843 > >> ... > >>>>> do_test() > >>>> The generic version looks fine: > >>>> Reviewed-by: Alexey Kodanev <aleksei.kodanev@bell-sw.com> > >>> I didn't understand whether you'd prefer to add TST_IPV6=6 (or TST_IPV6=) where > >>> needed or accept this patchset. Both would work. > >> I think for manual runs it is better to set TST_IPV6=6 in the test > >> so it will run the test rather the require passing some options. > > It looks like specifying TST_IPV6=6 is not enough, because tests are using > > $NS_ICMP_SENDER_DATA_MAXSIZE which is defined in tst_net.sh according to > > TST_IPV6. We can > > 1) overwrite NS_ICMP_SENDER_DATA_MAXSIZE="$NS_ICMPV6_SENDER_DATA_MAXSIZE" > > 2) check TST_IPV6 before running tst_net_parse_args and if set overwrite -6 flag > > But both are quite ugly, thus unless you have better idea I merge this patchset. > Are you sure that you are getting the wrong maxsize? if TST_IPV6=6 > is set before the setup, in the test, why tst_net_setup() is setting > the IPv4 value? The problem is actually in IPv6, ns-icmpv6_sender does not support -c. IPv6 only is only broken_ip-ihl tests, the other 4 are IPv4 only. I tested variables after loading tst_net.sh, but that was later overwritten with getopt -6. But setting it in the test function works (you probably meant this). I still don't like having to specify 2 variables (yes both are needed), but it's not a big deal thus I'll merge this version. Kind regards, Petr --- testcases/network/stress/broken_ip/broken_ip-checksum +++ testcases/network/stress/broken_ip/broken_ip-checksum @@ -10,7 +10,10 @@ TST_TESTFUNC="do_test" do_test() { - tst_res TINFO "Sending ICMPv$TST_IPVER with wrong chksum field for $NS_DURATION sec" + TST_IPV6= + TST_IPVER=4 + + tst_res TINFO "Sending ICMPv4 with wrong chksum field for $NS_DURATION sec" tst_icmp -t $NS_DURATION -s "0 100 500 1000 $NS_ICMP_SENDER_DATA_MAXSIZE" -c tst_ping } > > Kind regards, > > Petr > >>> Kind regards, > >>> Petr ^ permalink raw reply [flat|nested] 14+ messages in thread
* [LTP] [PATCH 2/2] broken_ip: TCONF when test run on unsupported protocol 2021-08-03 15:37 ` Petr Vorel @ 2021-08-03 16:22 ` Petr Vorel 0 siblings, 0 replies; 14+ messages in thread From: Petr Vorel @ 2021-08-03 16:22 UTC (permalink / raw) To: ltp Hi Alexey, > --- testcases/network/stress/broken_ip/broken_ip-checksum > +++ testcases/network/stress/broken_ip/broken_ip-checksum > @@ -10,7 +10,10 @@ TST_TESTFUNC="do_test" > do_test() > { > - tst_res TINFO "Sending ICMPv$TST_IPVER with wrong chksum field for $NS_DURATION sec" > + TST_IPV6= > + TST_IPVER=4 > + > + tst_res TINFO "Sending ICMPv4 with wrong chksum field for $NS_DURATION sec" > tst_icmp -t $NS_DURATION -s "0 100 500 1000 $NS_ICMP_SENDER_DATA_MAXSIZE" -c > tst_ping > } FYI merged commit which implements this. Kind regards, Petr ^ permalink raw reply [flat|nested] 14+ messages in thread
* [LTP] [PATCH 0/2] Add TST_NET_IPV{4, 6}_ONLY and use on broken_ip 2021-07-14 14:07 [LTP] [PATCH 0/2] Add TST_NET_IPV{4,6}_ONLY and use on broken_ip Petr Vorel 2021-07-14 14:07 ` [LTP] [PATCH 1/2] tst_net.sh: Add variable for supported protocol Petr Vorel 2021-07-14 14:07 ` [LTP] [PATCH 2/2] broken_ip: TCONF when test run on unsupported protocol Petr Vorel @ 2021-07-15 9:38 ` Alexey Kodanev 2021-07-15 11:58 ` Petr Vorel 2 siblings, 1 reply; 14+ messages in thread From: Alexey Kodanev @ 2021-07-15 9:38 UTC (permalink / raw) To: ltp On 14.07.2021 17:07, Petr Vorel wrote: > Hi Alexey, > > https://github.com/linux-test-project/ltp/issues/843 > > does it make sense to run it on IPv4 and broken_ip-totlen on IPv6? > Both don't break but not in runtest file. Hi Petr, Yes it should work with the -L option, but these tests are the same (differs the descriptions for IPv4/IPv6): diff -u broken_ip-plen broken_ip-totlen --- broken_ip-plen 2020-10-08 22:23:52.000000000 +0300 +++ broken_ip-totlen 2020-10-08 22:23:52.000000000 +0300 @@ -10,7 +10,7 @@ do_test() { - tst_res TINFO "Sending ICMPv$TST_IPVER with wrong payload len for $NS_DURATION sec" + tst_res TINFO "Sending ICMPv$TST_IPVER with wrong total len field for $NS_DURATION sec" tst_icmp -t $NS_DURATION -s "0 100 500 1000 $NS_ICMP_SENDER_DATA_MAXSIZE" -L tst_ping } So broken_ip-totlen should be just removed. > > Kind regards, > Petr > > Petr Vorel (2): > tst_net.sh: Add variable for supported protocol > broken_ip: TCONF when test run on unsupported protocol > > testcases/lib/tst_net.sh | 8 ++++++++ > testcases/lib/tst_test.sh | 2 +- > testcases/network/stress/broken_ip/broken_ip-checksum | 3 ++- > testcases/network/stress/broken_ip/broken_ip-fragment | 3 ++- > testcases/network/stress/broken_ip/broken_ip-ihl | 3 ++- > testcases/network/stress/broken_ip/broken_ip-nexthdr | 3 ++- > testcases/network/stress/broken_ip/broken_ip-protcol | 3 ++- > 7 files changed, 19 insertions(+), 6 deletions(-) > ^ permalink raw reply [flat|nested] 14+ messages in thread
* [LTP] [PATCH 0/2] Add TST_NET_IPV{4, 6}_ONLY and use on broken_ip 2021-07-15 9:38 ` [LTP] [PATCH 0/2] Add TST_NET_IPV{4, 6}_ONLY and use on broken_ip Alexey Kodanev @ 2021-07-15 11:58 ` Petr Vorel 0 siblings, 0 replies; 14+ messages in thread From: Petr Vorel @ 2021-07-15 11:58 UTC (permalink / raw) To: ltp > On 14.07.2021 17:07, Petr Vorel wrote: > > Hi Alexey, > > https://github.com/linux-test-project/ltp/issues/843 > > does it make sense to run it on IPv4 and broken_ip-totlen on IPv6? > > Both don't break but not in runtest file. > Hi Petr, > Yes it should work with the -L option, but these tests are the same > (differs the descriptions for IPv4/IPv6): > diff -u broken_ip-plen broken_ip-totlen > --- broken_ip-plen 2020-10-08 22:23:52.000000000 +0300 > +++ broken_ip-totlen 2020-10-08 22:23:52.000000000 +0300 > @@ -10,7 +10,7 @@ > do_test() > { > - tst_res TINFO "Sending ICMPv$TST_IPVER with wrong payload len for $NS_DURATION sec" > + tst_res TINFO "Sending ICMPv$TST_IPVER with wrong total len field for $NS_DURATION sec" > tst_icmp -t $NS_DURATION -s "0 100 500 1000 $NS_ICMP_SENDER_DATA_MAXSIZE" -L > tst_ping > } Good catch, thanks! > So broken_ip-totlen should be just removed. I merged commit which implements this. Kind regards, Petr ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2021-08-03 16:22 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-14 14:07 [LTP] [PATCH 0/2] Add TST_NET_IPV{4,6}_ONLY and use on broken_ip Petr Vorel
2021-07-14 14:07 ` [LTP] [PATCH 1/2] tst_net.sh: Add variable for supported protocol Petr Vorel
2021-07-14 14:07 ` [LTP] [PATCH 2/2] broken_ip: TCONF when test run on unsupported protocol Petr Vorel
2021-07-15 9:53 ` Alexey Kodanev
2021-07-15 12:07 ` Petr Vorel
2021-07-27 17:35 ` Petr Vorel
2021-07-28 11:20 ` Alexey Kodanev
2021-07-28 13:08 ` Petr Vorel
2021-08-02 18:06 ` Petr Vorel
2021-08-03 10:31 ` Alexey Kodanev
2021-08-03 15:37 ` Petr Vorel
2021-08-03 16:22 ` Petr Vorel
2021-07-15 9:38 ` [LTP] [PATCH 0/2] Add TST_NET_IPV{4, 6}_ONLY and use on broken_ip Alexey Kodanev
2021-07-15 11:58 ` Petr Vorel
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox