[PATCH v2 net-next 1/1] tc-testing: Clarify the use of tdc's -d option

2019-07-29 Thread Lucas Bates
: Lucas Bates --- tools/testing/selftests/tc-testing/README | 4 +++- tools/testing/selftests/tc-testing/tdc.py | 12 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/tools/testing/selftests/tc-testing/README b/tools/testing/selftests/tc-testing/README index 22e5da9

[PATCH net-next 2/2] tc-testing: introduce scapyPlugin for basic traffic

2019-07-08 Thread Lucas Bates
capy functionality, since the plugin blindly sends the packet as defined in the test case data. See creating-testcases/scapy-example.json for sample test cases; the first test is intended to pass while the second is intended to fail. Signed-off-by: Lucas Bates --- .../creating-testcases/scapy-example.js

[PATCH net-next 1/2] tc-testing: Allow tdc plugins to see test case data

2019-07-08 Thread Lucas Bates
Instead of only passing the test case name and ID, pass the entire current test case down to the plugins. This change allows plugins to start accepting commands and directives from the test cases themselves, for greater flexibility in testing. Signed-off-by: Lucas Bates --- tools/testing

[PATCH net-next 0/2] tc-testing: Add plugin for simple traffic generation

2019-07-08 Thread Lucas Bates
block works in the test cases. Lucas Bates (2): tc-testing: Allow tdc plugins to see test case data tc-testing: introduce scapyPlugin for basic traffic tools/testing/selftests/tc-testing/TdcPlugin.py| 5 +- .../creating-testcases/scapy-example.json | 98

Re: [PATCH v2 net-next 3/3] tc-testing: introduce scapyPlugin for basic traffic

2019-07-08 Thread Lucas Bates
Sorry Alex, I completely forgot about this email. On Thu, Jul 4, 2019 at 4:29 PM Alexander Aring wrote: > > Hi, > > On Wed, Jul 03, 2019 at 08:45:02PM -0400, Lucas Bates wrote: > > The scapyPlugin allows for simple traffic generation in tdc to > > test various tc feat

Re: [PATCH v2 net-next 1/3] tc-testing: Add JSON verification to tdc

2019-07-08 Thread Lucas Bates
On Mon, Jul 8, 2019 at 1:25 PM Alexander Aring wrote: > > Unless I'm off-base here? > > yes you need to know some python, complex code can be hidden by some > helper functionality I guess. > > I have no problem to let this patch in, it will not harm anything... I think I'm going to pull it for the

Re: [PATCH v2 net-next 1/3] tc-testing: Add JSON verification to tdc

2019-07-08 Thread Lucas Bates
On Thu, Jul 4, 2019 at 4:21 PM Alexander Aring wrote: > why you just use eval() as pattern matching operation and let the user > define how to declare a matching mechanism instead you introduce another > static matching scheme based on a json description? > > Whereas in eval() you could directly

[PATCH v2 net-next 1/3] tc-testing: Add JSON verification to tdc

2019-07-03 Thread Lucas Bates
", 0, "control action", "type" ], "value": "gact" }, { "path": [ 0, "actions", 0, "index" ],

[PATCH v2 net-next 0/3] tc-testing: Add JSON verification and simple traffic generation

2019-07-03 Thread Lucas Bates
test case file to demonstrate how the scapy block works. Lucas Bates (3): tc-testing: Add JSON verification to tdc tc-testing: Allow tdc plugins to see test case data tc-testing: introduce scapyPlugin for basic traffic tools/testing/selftests/tc-testing/TdcPlugin.py| 5

[PATCH v2 net-next 2/3] tc-testing: Allow tdc plugins to see test case data

2019-07-03 Thread Lucas Bates
Instead of only passing the test case name and ID, pass the entire current test case down to the plugins. This change allows plugins to start accepting commands and directives from the test cases themselves, for greater flexibility in testing. Signed-off-by: Lucas Bates --- tools/testing

[PATCH v2 net-next 3/3] tc-testing: introduce scapyPlugin for basic traffic

2019-07-03 Thread Lucas Bates
capy functionality, since the plugin blindly sends the packet as defined in the test case data. See creating-testcases/scapy-example.json for sample test cases; the first test is intended to pass while the second is intended to fail. Consider using the matchJSON functionality

[PATCH net-next 0/3] tc-testing: Add JSON verification and simple traffic generation

2019-07-02 Thread Lucas Bates
tdc plugins to examine the test case currently being executed, such that plugins can play a more active role in testing. This feature is needed for the new plugin. The third patch adds the scapyPlugin itself, and an example test case file to demonstrate how the scapy block works. Lucas Bates (3

[PATCH net-next 3/3] tc-testing: introduce scapyPlugin for basic traffic

2019-07-02 Thread Lucas Bates
The scapyPlugin allows for simple traffic generation in tdc to test various tc features. It was tested with scapy v2.4.2, but should work with any successive version. In order to use the plugin's functionality, scapy must be installed. This can be done with: pip3 install scapy or to install 2.

[PATCH net-next 2/3] tc-testing: Allow tdc plugins to see test case data

2019-07-02 Thread Lucas Bates
Instead of only passing the test case name and ID, pass the entire current test case down to the plugins. This change allows plugins to start accepting commands and directives from the test cases themselves, for greater flexibility in testing. --- tools/testing/selftests/tc-testing/TdcPlugin.py |

[PATCH net-next 1/3] tc-testing: Add JSON verification to tdc

2019-07-02 Thread Lucas Bates
This patch allows tdc to process JSON output to perform secondary verification of the command under test. If the verifyCmd generates JSON, one can provide the 'matchJSON' key to process it instead of a regex. matchJSON has two elements: 'path' and 'value'. The 'path' key is a list of integers and

[PATCH net-next 1/1] tc-testing: Restore original behaviour for namespaces in tdc

2019-06-24 Thread Lucas Bates
than one required plugin: a list can be inserted as the value for 'requires'. Signed-off-by: Lucas Bates --- tools/testing/selftests/tc-testing/README | 22 ++- .../tc-testing/plugin-lib/buildebpfPlugin.py | 5 +- .../selftests/tc-testing/plugin-lib/nsPlugin.py|

Re: [RFC PATCH net-next 1/1] tc-testing: Restore original behaviour for namespaces in tdc

2019-06-20 Thread Lucas Bates
On Tue, Jun 18, 2019 at 4:52 AM Nicolas Dichtel wrote: > >> From my point of view, if all tests are not successful by default, it > >> scares > >> users and prevent them to use those tests suite to validate their patches. > > > > For me, explicitly telling the user that a test was skipped, and /w

Re: [RFC PATCH net-next 1/1] tc-testing: Restore original behaviour for namespaces in tdc

2019-06-16 Thread Lucas Bates
On Fri, Jun 14, 2019 at 5:37 AM Nicolas Dichtel wrote: > > Le 05/06/2019 à 23:08, Lucas Bates a écrit : > > Apologies for the delay in getting this out. I've been busy > > with other things and this change was a little trickier than > > I expected. > > &

[RFC PATCH net-next 1/1] tc-testing: Scapy plugin and JSON verification for tdc

2019-06-09 Thread Lucas Bates
ndency for tdc. To try the sample tests in this patch: 1) Ensure nsPlugin and scapyPlugin are linked in the plugins/ subdirectory 2) Run: sudo ./tdc.py -f tc-tests/actions/scapy-example.json -n The second test is designed to fail. Comments and discussion are encouraged! Signed-off-by: L

Re: [RFC PATCH net-next 1/1] tc-testing: Restore original behaviour for namespaces in tdc

2019-06-07 Thread Lucas Bates
On Fri, Jun 7, 2019 at 8:18 AM Davide Caratti wrote: > From what I see, it is a fix for the reported problem (e.g. tests failing > because of 'nsPlugin' uninstalled). And, I want to followup fixing the > bpf.json in tc-actions, so that > > # ./tdc.py -l -c bpf | grep eBPF > e939: (actions, bpf)

[RFC PATCH net-next 1/1] tc-testing: Restore original behaviour for namespaces in tdc

2019-06-05 Thread Lucas Bates
Apologies for the delay in getting this out. I've been busy with other things and this change was a little trickier than I expected. This patch restores the original behaviour for tdc prior to the introduction of the plugin system, where the network namespace functionality was split from the main

Re: [RFC net-next 1/1] tdc.py: Introduce required plugins

2019-04-16 Thread Lucas Bates
On Fri, Apr 12, 2019 at 7:37 PM Nicolas Dichtel wrote: > > Le 12/04/2019 à 18:07, Lucas Bates a écrit : > [snip] > > So something like this? Note the usage of the keyword "requires", > > > > { > > "id": "901f",

Re: [RFC net-next 1/1] tdc.py: Introduce required plugins

2019-04-12 Thread Lucas Bates
On Fri, Apr 12, 2019 at 11:42 AM Nicolas Dichtel wrote: > > Le 12/04/2019 à 17:21, Lucas Bates a écrit : > > On Fri, Apr 12, 2019 at 4:31 AM Nicolas Dichtel > > wrote: > >>> in our tri-weekly tc test meeting and the general consensus to address > >>>

Re: [RFC net-next 1/1] tdc.py: Introduce required plugins

2019-04-12 Thread Lucas Bates
On Fri, Apr 12, 2019 at 4:31 AM Nicolas Dichtel wrote: > > in our tri-weekly tc test meeting and the general consensus to address > > what you brought up is leaning towards the following: > > > > - adding a symlink to nsPlugin > I don't understand why a symlink is needed. Just load it by default a

Re: [RFC net-next 1/1] tdc.py: Introduce required plugins

2019-04-11 Thread Lucas Bates
On Wed, Apr 10, 2019 at 10:33 AM Nicolas Dichtel wrote: > > Le 09/04/2019 à 23:44, Lucas Bates a écrit : > > Some of the testcases (for example, all of the fw tests) in tdc > > require activating the nsplugin. This RFC introduces a feature which > > tags one such test wi

[RFC net-next 1/1] tdc.py: Introduce required plugins

2019-04-09 Thread Lucas Bates
use plugin- specific options may exist and need to be parsed at startup) Please provide feedback. If this is amenable to all, I will proceed to submit for the rest. Signed-off-by: Lucas Bates --- tools/testing/selftests/tc-testing/README | 28 ++- .../selftests/tc-testing/tc-tes

Re: [PATCH net] selftests: add a tc matchall test case

2019-04-08 Thread Lucas Bates
On Sun, Apr 7, 2019 at 10:32 PM David Miller wrote: > > I'm not sure to understand the goal of this series: > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?h=45b3a3762721 > > > > But after it, tc selftests are not intuitive anymore. When naively running > > them > > (.

Re: [RFC PATCH net-next] selftests: tc-testing: Add pedit tests

2019-03-20 Thread Lucas Bates
On Fri, Mar 1, 2019 at 7:33 AM Dmytro Linkin wrote: > > Add 36 pedit action tests to check pedit options described in tc-pedit(8) > man page. Test cases can be specified by categories: actions, pedit, > raw_op, layered_op. RAW_OP cases check offset option for u8, u16 and u32 > offset size. LAYERED

[PATCH net-next] tc-testing: Allow test cases to be skipped

2019-02-28 Thread Lucas Bates
tests in each run. However, the test will be marked as skipped. This support for skipping extends to any plugins that may generate additional results for each executed test. Signed-off-by: Lucas Bates --- tools/testing/selftests/tc-testing/TdcPlugin.py | 4 ++-- .../tc-testing

Re: [Patch net] net_sched: refetch skb protocol for each filter

2019-01-14 Thread Lucas Bates
On Sat, Jan 12, 2019 at 7:23 AM Jamal Hadi Salim wrote: > > On 2019-01-11 9:55 p.m., Cong Wang wrote: > > Martin reported a set of filters don't work after changing > > from reclassify to continue. Looking into the code, it > > looks like skb protocol is not always fetched for each > > iteration o

[PATCH net-next 1/4] tc-testing: Add command timeout feature to tdc

2018-12-06 Thread Lucas Bates
Using an attribute set in the tdc_config.py file, limit the amount of time tdc will wait for an executed command to complete and prevent the script from hanging entirely. This timeout will be applied to all executed commands. Signed-off-by: Lucas Bates --- tools/testing/selftests/tc-testing

[PATCH net-next 3/4] tc-testing: Implement the TdcResults module in tdc

2018-12-06 Thread Lucas Bates
In tdc and the valgrind plugin, begin using the TdcResults module to track executed test cases. Signed-off-by: Lucas Bates --- tools/testing/selftests/tc-testing/TdcPlugin.py| 3 +- .../tc-testing/plugin-lib/valgrindPlugin.py| 22 +++- tools/testing/selftests/tc-testing/tdc.py

[PATCH net-next 2/4] tc-testing: Add new TdcResults module

2018-12-06 Thread Lucas Bates
This module includes new classes for tdc to use in keeping track of test case results, instead of generating and tracking a lengthy string. The new module can be extended to support multiple formal test result formats to be friendlier to automation. Signed-off-by: Lucas Bates --- tools/testing

[PATCH net-next 0/4] tc-testing: implement command timeouts and better results tracking

2018-12-06 Thread Lucas Bates
Patch 1 adds a timeout feature for any command tdc launches in a subshell. This prevents tdc from hanging indefinitely. Patches 2-4 introduce a new method for tracking and generating test case results, and implements it across the core script and all applicable plugins. Lucas Bates (4): tc

[PATCH net-next 4/4] tc-testing: gitignore, ignore generated test results

2018-12-06 Thread Lucas Bates
Ignore any .tap or .xml test result files generated by tdc. Additionally, ignore plugin symlinks. Signed-off-by: Lucas Bates --- tools/testing/selftests/tc-testing/.gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/testing/selftests/tc-testing/.gitignore b/tools/testing

[PATCH net 1/2] tc-testing: tdc.py: ignore errors when decoding stdout/stderr

2018-11-16 Thread Lucas Bates
Prevent exceptions from being raised while decoding output from an executed command. There is no impact on tdc's execution and the verify command phase would fail the pattern match. Signed-off-by: Lucas Bates --- tools/testing/selftests/tc-testing/tdc.py | 4 ++-- 1 file changed, 2 inser

[PATCH net 0/2] Prevent uncaught exceptions in tdc

2018-11-16 Thread Lucas Bates
executed command Lucas Bates (1): tc-testing: tdc.py: ignore errors when decoding stdout/stderr tools/testing/selftests/tc-testing/tdc.py | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) -- 2.7.4

[PATCH net 2/2] tc-testing: tdc.py: Guard against lack of returncode in executed command

2018-11-16 Thread Lucas Bates
From: "Brenda J. Butler" Add some defensive coding in case one of the subprocesses created by tdc returns nothing. If no object is returned from exec_cmd, then tdc will halt with an unhandled exception. Signed-off-by: Brenda J. Butler Signed-off-by: Lucas Bates --- tools/testing/se

Re: Some suggestions for tc-tests

2018-10-22 Thread Lucas Bates
Hi Cong, > > 1. Create veth pair devices by its own. The most important thing for > tc-tests is to automate everything, it is not friendly for users to > create their own veth pair named v0p0 to just run the tests. tc-tests > should be able to create a veth pair with random names and clean up > th

Re: [PATCH net-next] tc-testing: add geneve options in tunnel_key unit tests

2018-07-11 Thread Lucas Bates
t; > Signed-off-by: Pieter Jansen van Vuuren Acked-by: Lucas Bates

Re: [PATCH net-next 1/1] tc-testing: initial version of tunnel_key unit tests

2018-06-27 Thread Lucas Bates
On Tue, Jun 26, 2018 at 10:51 AM, Davide Caratti wrote: > On Tue, 2018-06-26 at 09:17 -0400, Keara Leibovitz wrote: >> Create unittests for the tc tunnel_key action. >> >> >> Signed-off-by: Keara Leibovitz >> --- >> .../tc-testing/tc-tests/actions/tunnel_key.json| 676 >> +++

Re: [PATCH 00/14] Modify action API for implementing lockless actions

2018-05-15 Thread Lucas Bates
On Tue, May 15, 2018 at 6:03 PM, Lucas Bates wrote: > On Tue, May 15, 2018 at 5:49 PM, Jamal Hadi Salim wrote: >>> Test 7d50: Add skbmod action to set destination mac >>> exit: 255 0 >>> dst MAC address <11:22:33:44:55:66> >>> RTNETLINK answers: N

Re: [PATCH 00/14] Modify action API for implementing lockless actions

2018-05-15 Thread Lucas Bates
On Tue, May 15, 2018 at 5:49 PM, Jamal Hadi Salim wrote: >> Test 7d50: Add skbmod action to set destination mac >> exit: 255 0 >> dst MAC address <11:22:33:44:55:66> >> RTNETLINK answers: No such file or directory >> We have an error talking to the kernel >> > > You may actually have broken someth

Re: [PATCH net] tc-testing: fix tdc tests for 'bpf' action

2018-05-09 Thread Lucas Bates
;verifyCmd": "$TC action get action bpf index 667", > -"matchPattern": "action order [0-9]*: bpf _b.o:\\[action\\] id > [0-9].*index 667 ref", > +"matchPattern": "action order [0-9]*: bpf _c.o:\\[action\\] id > [0-9].*index 667 ref", > "matchCount": "0", > "teardown": [ > -"$TC action flush action bpf", > +[ > +"$TC action flush action bpf", > +0, > +1, > +255 > +], > "rm -f _c.o" > ] > }, > -- > 2.14.3 > Acked-by: Lucas Bates

Re: [PATCH net] net/sched: fix NULL dereference in the error path of tcf_bpf_init()

2018-04-06 Thread Lucas Bates
f 44 00 00 41 54 55 48 89 fd 53 <48> 8b 47 20 f0 > ff 08 74 05 5b 5d 41 5c c3 41 89 f4 0f 1f 44 00 > RIP: __bpf_prog_put+0xc/0xc0 RSP: 9594003ef728 > CR2: 0020 > > Fix it in tcf_bpf_cfg_cleanup(), ensuring that bpf_prog_{put,destroy}(f) > is called only whe

Kernel bug from adding bpf actions in tc

2018-04-05 Thread Lucas Bates
Hi Davide, Our overnight tc test runs of net-next revealed a kernel bug on one of the BPF tests you submitted, d959. The add action completes successfully, but the bug occurs on the verify when tdc does a get of the action that was just added. Here's the text of the dump: [ 61.973632] BUG: un

[PATCH net-next] tc-testing: Add newline when writing test case files

2018-03-29 Thread Lucas Bates
When using the -i feature to generate random ID numbers for test cases in tdc, the function that writes the JSON to file doesn't add a newline character to the end of the file, so we have to add our own. Signed-off-by: Lucas Bates --- tools/testing/selftests/tc-testing/tdc.py | 1 + 1

[PATCH net-next 1/1] tc-testing: Correct compound statements for namespace execution

2018-03-26 Thread Lucas Bates
namespace execution. Enclosing these compound statements inside a bash invocation with proper escape characters resolves the problem by creating a subshell inside the namespace. Signed-off-by: Lucas Bates --- tools/testing/selftests/tc-testing/tc-tests/actions/gact.json | 10 +- 1 file

Re: [PATCH net-next 1/1] tc-testing: Correct compound statements for namespace execution

2018-03-22 Thread Lucas Bates
On Thu, Mar 22, 2018 at 2:48 PM, David Miller wrote: > From: Lucas Bates > Date: Wed, 21 Mar 2018 11:49:40 -0400 > >> } >> -] >> \ No newline at end of file >> +] >> -- >> 2.7.4 > > Please fix this. This patch fixes the gact.json file that had no newline on the end.

[PATCH net-next 1/1] tc-testing: Correct compound statements for namespace execution

2018-03-21 Thread Lucas Bates
namespace execution. Enclosing these compound statements inside a bash invocation with proper escape characters resolves the problem by creating a subshell inside the namespace. Signed-off-by: Lucas Bates --- tools/testing/selftests/tc-testing/tc-tests/actions/gact.json | 10 +- 1 file

Re: [PATCH net-next 7/7] tools: tc-testing: Update README and TODO

2018-02-14 Thread Lucas Bates
On Wed, Feb 14, 2018 at 2:09 PM, Brenda J. Butler wrote: > Signed-off-by: Brenda J. Butler Acked-by: Lucas Bates > --- > tools/testing/selftests/tc-testing/README | 173 > +--- > tools/testing/selftests/tc-testing/TODO.txt | 25 +++- > 2

Re: [PATCH net-next 6/7] tools: tc-testing: valgrindPlugin

2018-02-14 Thread Lucas Bates
On Wed, Feb 14, 2018 at 2:09 PM, Brenda J. Butler wrote: > Run the command under test under valgrind. Produce an extra set of > tap output for the memory check on each test. > > Signed-off-by: Brenda J. Butler Acked-by: Lucas Bates > --- > .../tc-testing/plugin-lib

Re: [PATCH net-next 5/7] tools: tc-testing: nsPlugin

2018-02-14 Thread Lucas Bates
On Wed, Feb 14, 2018 at 2:09 PM, Brenda J. Butler wrote: > Move the functionality of creating a namespace before the test suite > and destroying it afterwards to a plugin. > > Signed-off-by: Brenda J. Butler Acked-by: Lucas Bates > --- > .../selftests/tc-testing/plug

Re: [PATCH net-next 3/7] tools: tc-testing: Introduce plugin architecture

2018-02-14 Thread Lucas Bates
just_command" hook. This makes the test suite quite > flexible. > > Future patches will take some functionality out of the tdc.py script and > place it in plugins. > > To use the plugins, place the implementation in the plugins directory > and run tdc.py. It will notice t

Re: [PATCH net-next 4/7] tools: tc-testing: rootPlugin

2018-02-14 Thread Lucas Bates
On Wed, Feb 14, 2018 at 2:09 PM, Brenda J. Butler wrote: > Move the functionality that checks for root permissions into a plugin. > > Signed-off-by: Brenda J. Butler Acked-by: Lucas Bates > --- > .../selftests/tc-testing/plugin-lib/rootPlugin.py | 19 > ++

Re: [PATCH net-next 2/7] tools: tc-testing: Refactor test-runner

2018-02-14 Thread Lucas Bates
nch > of tap results for the skipped tests). > > Signed-off-by: Brenda J. Butler Acked-by: Lucas Bates > --- > tools/testing/selftests/tc-testing/tdc.py | 81 > --- > 1 file changed, 52 insertions(+), 29 deletions(-) > > diff --git a/tools/t

Re: [PATCH net-next 1/7] tools: tc-testing: Command line parms

2018-02-14 Thread Lucas Bates
echanism. We can accumulate a number of tests by directory, > file, category, or even by test id, instead of being constrained to > run all tests in one collection or just one test. > > Signed-off-by: Brenda J. Butler Acked-by: Lucas Bates > --- > .../cr

Re: [Patch net 00/16] net_sched: fix races with RCU callbacks

2017-11-01 Thread Lucas Bates
On Tue, Oct 31, 2017 at 7:02 PM, Cong Wang wrote: > On Tue, Oct 31, 2017 at 3:09 PM, Cong Wang wrote: >> >> This almost rules out the guilty of this patchset. >> >> I will provide a patch for you to test, since I can't reproduce it here. >> > > Lucas, please test the attached patch, it applies to

Re: [Patch net 00/16] net_sched: fix races with RCU callbacks

2017-10-31 Thread Lucas Bates
On Tue, Oct 31, 2017 at 2:55 PM, Lucas Bates wrote: > On Tue, Oct 31, 2017 at 7:00 AM, Jamal Hadi Salim wrote: >> On 17-10-31 01:44 AM, Cong Wang wrote: >>> >>> Can you try this patch? From your stack trace it is not clear where >>> the cause

Re: [Patch net 00/16] net_sched: fix races with RCU callbacks

2017-10-31 Thread Lucas Bates
On Tue, Oct 31, 2017 at 7:00 AM, Jamal Hadi Salim wrote: > On 17-10-31 01:44 AM, Cong Wang wrote: >> >> Can you try this patch? From your stack trace it is not clear where >> the cause is, but we know that the crash is in __tcf_idr_release(), >> this is how I came up with the following patch: >> >

Re: [PATCH net-next] tc-testing: better test case file error reporting

2017-10-31 Thread Lucas Bates
that file will be ignored and the rest of the tests > will be processed. > > Signed-off-by: Brenda J. Butler With great pleasure: Acked-by: Lucas Bates

Re: [PATCH net-next] tc-testing: "show" action shows all selected tests

2017-10-31 Thread Lucas Bates
s still possible to output a single test, by using the -e > option, but now more than one test can be displayed with > one command. > > Signed-off-by: Brenda J. Butler Acked-by: Lucas Bates

Re: [PATCH net-next] tc-testing: better check if thing is list

2017-10-31 Thread Lucas Bates
an actual list. In that > case, this code will not have to change. > > Signed-off-by: Brenda J. Butler Acked-by: Lucas Bates

Re: [PATCH net-next] tc-testing: correction to docstring in get_unique_item

2017-10-31 Thread Lucas Bates
def get_unique_item(lst): > -""" For a list, return a set of the unique items in the list. """ > +""" For a list, return a list of the unique items in the list. """ > return list(set(lst)) > > > -- > 2.15.0.rc0 > Acked-by: Lucas Bates

Re: [PATCH net-next] tc-testing: split config file

2017-10-31 Thread Lucas Bates
tomization file. > > In addition, this makes it easy to revert to a stock > tdc environment for testing the test framework and/or > the core tests. > > Also it makes it harder for any custom config to be > submitted back to the kernel tdc. > > Signed-off-by: Brenda J. Butler Acked-by: Lucas Bates

Re: [PATCH net-next] tc-testing: gitignore, ignore standard python artifacts

2017-10-31 Thread Lucas Bates
On Tue, Oct 31, 2017 at 2:26 PM, Brenda J. Butler wrote: > Ignore .pyc files, "python compiled" files, that get created > when a python script is run. They should never be committed. > > Signed-off-by: Brenda J. Butler Acked-by: Lucas Bates

Re: [PATCH net-next] tc-testing: very simple example test cases

2017-10-31 Thread Lucas Bates
for verify > ok 3 3f simple test, no need for setup or teardown (or verify) > > $ > > Signed-off-by: Brenda J. Butler Acked-by: Lucas Bates

Re: [PATCH net-next] tc-testing: correction to docstring in get_unique_item

2017-10-30 Thread Lucas Bates
On Mon, Oct 30, 2017 at 8:37 PM, Brenda J. Butler wrote: > The docstring says the function returns a "set" but it returns > a "list". These are both python data types, so we should refer to > the right one that is being returned. > > Signed-off-by: Brenda J. Butler Acked-by: Lucas Bates

Re: [Patch net 00/16] net_sched: fix races with RCU callbacks

2017-10-30 Thread Lucas Bates
On Mon, Oct 30, 2017 at 7:12 PM, Cong Wang wrote: > On Mon, Oct 30, 2017 at 3:39 PM, Lucas Bates wrote: >> e.On Thu, Oct 26, 2017 at 9:24 PM, Cong Wang >> wrote: >>> Recently, the RCU callbacks used in TC filters and TC actions keep >>> drawing my attentio

Re: [Patch net 00/16] net_sched: fix races with RCU callbacks

2017-10-30 Thread Lucas Bates
e.On Thu, Oct 26, 2017 at 9:24 PM, Cong Wang wrote: > Recently, the RCU callbacks used in TC filters and TC actions keep > drawing my attention, they introduce at least 4 race condition bugs: > As suggested by Paul, we could defer the work to a workqueue and > gain the permission of holding RTNL

Re: [patch net v2 4/4] selftests: Introduce a new test case to tc testsuite

2017-10-16 Thread Lucas Bates
too specific and limiting. There are some upcoming changes to tdc to help address these particular issues. I'll ack this for now, thanks. Acked-by: Lucas Bates > --- > .../tc-testing/tc-tests/filters/tests.json | 23 > +- > tools/testing/

Re: [patch net v2 3/4] selftests: Introduce a new script to generate tc batch file

2017-10-16 Thread Lucas Bates
all filters share the same action > -p, --prioall filters have different prio > > Signed-off-by: Chris Mi > Acked-by: Jamal Hadi Salim Acked-by: Lucas Bates > --- > tools/testing/selftests/tc-testing/tdc_batch.py | 62 > + >

[PATCH net-next v2 0/4] tc-testing: Test suite updates

2017-10-13 Thread Lucas Bates
he -l argument v2: fix the lack of final newlines in two new files (thanks David) Lucas Bates (4): tc-testing: Add test cases for flushing actions tc-testing: Split test case files into smaller chunks tc-testing: Add test cases for police and skbmod tc-testing: fix the -l argument bug in t

[PATCH net-next v2 4/4] tc-testing: fix the -l argument bug in tdc.py

2017-10-13 Thread Lucas Bates
This patch fixes a bug in the tdc script, where executing tdc with the -l argument would cause the tests to start running as opposed to listing all the known test cases. Signed-off-by: Lucas Bates Acked-by: Jamal Hadi Salim --- tools/testing/selftests/tc-testing/tdc.py | 8 1 file

[PATCH net-next v2 2/4] tc-testing: Split test case files into smaller chunks

2017-10-13 Thread Lucas Bates
The original submission had the test cases stored in one monolithic file. This can be unwieldy to edit, especially as more test cases are added. This patch removes the original tests.json file in favour of individual ones broken down by category. Signed-off-by: Lucas Bates Acked-by: Jamal Hadi

[PATCH net-next v2 3/4] tc-testing: Add test cases for police and skbmod

2017-10-13 Thread Lucas Bates
Add basic unit tests for police and skbmod actions in tc. Signed-off-by: Lucas Bates Acked-by: Jamal Hadi Salim --- .../tc-testing/tc-tests/actions/police.json| 527 + .../tc-testing/tc-tests/actions/skbmod.json| 372 +++ 2 files changed, 899

[PATCH net-next v2 1/4] tc-testing: Add test cases for flushing actions

2017-10-13 Thread Lucas Bates
Tests for flushing gact and mirred were missing. This patch adds test cases to explicitly test the flush of any installed gact/mirred actions. Signed-off-by: Lucas Bates Acked-by: Jamal Hadi Salim --- .../tc-testing/tc-tests/actions/tests.json | 49 +- 1 file

[PATCH net-next 0/4] tc-testing: Test suite updates

2017-10-11 Thread Lucas Bates
he -l argument Lucas Bates (4): tc-testing: Add test cases for flushing actions tc-testing: Split test case files into smaller chunks tc-testing: Add test cases for police and skbmod tc-testing: fix the -l argument bug in tdc.py script .../tc-testing/tc-tests/actions/gact.json |

[PATCH net-next 1/4] tc-testing: Add test cases for flushing actions

2017-10-11 Thread Lucas Bates
Tests for flushing gact and mirred were missing. This patch adds test cases to explicitly test the flush of any installed gact/mirred actions. Signed-off-by: Lucas Bates Acked-by: Jamal Hadi Salim --- .../tc-testing/tc-tests/actions/tests.json | 49 +- 1 file

[PATCH net-next 2/4] tc-testing: Split test case files into smaller chunks

2017-10-11 Thread Lucas Bates
The original submission had the test cases stored in one monolithic file. This can be unwieldy to edit, especially as more test cases are added. This patch removes the original tests.json file in favour of individual ones broken down by category. Signed-off-by: Lucas Bates Acked-by: Jamal Hadi

[PATCH net-next 3/4] tc-testing: Add test cases for police and skbmod

2017-10-11 Thread Lucas Bates
Add basic unit tests for police and skbmod actions in tc. Signed-off-by: Lucas Bates Acked-by: Jamal Hadi Salim --- .../tc-testing/tc-tests/actions/police.json| 527 + .../tc-testing/tc-tests/actions/skbmod.json| 372 +++ 2 files changed, 899

[PATCH net-next 4/4] tc-testing: fix the -l argument bug in tdc.py script

2017-10-11 Thread Lucas Bates
This patch fixes a bug in the tdc script, where executing tdc with the -l argument would cause the tests to start running as opposed to listing all the known test cases. Signed-off-by: Lucas Bates Acked-by: Jamal Hadi Salim --- tools/testing/selftests/tc-testing/tdc.py | 8 1 file

[PATCH iproute2 1/1] Add new man page for tc actions.

2017-07-04 Thread Lucas Bates
This page is to highlight all operations and options that are applicable to all tc actions. Signed-off-by: Lucas Bates Signed-off-by: Jamal Hadi Salim --- man/man8/tc-actions.8 | 221 ++ 1 file changed, 221 insertions(+) create mode 100644 man

[PATCH net-next 1/1] selftests: Introduce tc testsuite

2017-06-16 Thread Lucas Bates
ions. Test cases are most welcome; see the creating-testcases subdirectory for help in creating them. Signed-off-by: Lucas Bates Signed-off-by: Jamal Hadi Salim --- tools/testing/selftests/tc-testing/.gitignore |1 + tools/testing/selftests/tc-testing/README | 102 ++ t

[PATCH net-next 0/1] Introduction of the tc tests

2017-06-16 Thread Lucas Bates
Apologies for sending this as one big patch. I've been sitting on this a little too long, but it's ready and I wanted to get it out. There are a limited number of tests to start - I plan to add more on a regular basis. Lucas Bates (1): selftests: Introduce tc testsuite too

[PATCH iproute2 1/1] man page: add page for skbmod action

2017-02-10 Thread Lucas Bates
Signed-off-by: Lucas Bates Signed-off-by: Jamal Hadi Salim Signed-off-by: Roman Mashak --- man/man8/Makefile| 2 +- man/man8/tc-skbmod.8 | 137 +++ 2 files changed, 138 insertions(+), 1 deletion(-) create mode 100644 man/man8/tc-skbmod.8