Signed-off-by: Lucas Bates <luc...@mojatatu.com>
Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com>
Signed-off-by: Roman Mashak <m...@mojatatu.com>
---
man/man8/Makefile| 2 +-
man/man8/tc-skbmod.8 | 137 +++
2 files chang
This page is to highlight all operations and options that are
applicable to all tc actions.
Signed-off-by: Lucas Bates <luc...@mojatatu.com>
Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com>
---
man/man8/tc-actions.8 | 221 ++
1 file
welcome; see the creating-testcases subdirectory for help
in creating them.
Signed-off-by: Lucas Bates <luc...@mojatatu.com>
Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com>
---
tools/testing/selftests/tc-testing/.gitignore |1 +
tools/testing/selftests/tc-te
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
tools/testing
hw
> -s, --share_actionall filters share the same action
> -p, --prioall filters have different prio
>
> Signed-off-by: Chris Mi <chr...@mellanox.com>
> Acked-by: Jamal Hadi Salim <j...@mojatatu.com>
Acked-by: Lucas Bates <luc..
un.
Even the namespace creation I put in to the original version is 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 <luc...@mojatatu.com>
> ---
> .../tc-testing/tc-tests/filters/te
Add basic unit tests for police and skbmod actions in tc.
Signed-off-by: Lucas Bates <luc...@mojatatu.com>
Acked-by: Jamal Hadi Salim <j...@mojatatu.com>
---
.../tc-testing/tc-tests/actions/police.json| 527 +
.../tc-testing/tc-tests/actions/skbmod.json
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 tdc.py
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 <luc...@mojatatu.com>
Acked-by: Jamal Hadi Salim <j...@mojatatu.com>
---
tools/testing/
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 <luc...@mojatatu.
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 <luc...@mojatatu.com>
Acked-by: Jamal Hadi Salim <j...@mojatatu.com>
---
.../tc-testing/tc-tests/action
Add basic unit tests for police and skbmod actions in tc.
Signed-off-by: Lucas Bates <luc...@mojatatu.com>
Acked-by: Jamal Hadi Salim <j...@mojatatu.com>
---
.../tc-testing/tc-tests/actions/police.json| 527 +
.../tc-testing/tc-tests/actions/skbmod.json
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 | 469
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 <luc...@mojatatu.com>
Acked-by: Jamal Hadi Salim <j...@mojatatu.com>
---
.../tc-testing/tc-tests/action
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 <luc...@mojatatu.
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 <luc...@mojatatu.com>
Acked-by: Jamal Hadi Salim <j...@mojatatu.com>
---
tools/testing/
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.
>>
>
>
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
f simple test, no need for verify
> ok 3 3f simple test, no need for setup or teardown (or verify)
>
> $
>
> Signed-off-by: Brenda J. Butler <b...@mojatatu.com>
Acked-by: Lucas Bates <luc...@mojatatu.com>
; arguments.
>
> It is 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 <b...@mojatatu.com>
Acked-by: Lucas Bates <luc...@mojatatu.com>
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
egorized_testlist(alltests, ucat):
>
>
> 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 <luc...@mojatatu.com>
gned-off-by: Brenda J. Butler <b...@mojatatu.com>
Acked-by: Lucas Bates <luc...@mojatatu.com>
lements list, instead of being an actual list. In that
> case, this code will not have to change.
>
> Signed-off-by: Brenda J. Butler <b...@mojatatu.com>
Acked-by: Lucas Bates <luc...@mojatatu.com>
On Tue, Oct 31, 2017 at 2:26 PM, Brenda J. Butler <b...@mojatatu.com> 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 <b...@mojatatu.
and
> line number, then that file will be ignored and the rest of the tests
> will be processed.
>
> Signed-off-by: Brenda J. Butler <b...@mojatatu.com>
With great pleasure:
Acked-by: Lucas Bates <luc...@mojatatu.com>
On Tue, Oct 31, 2017 at 2:55 PM, Lucas Bates <luc...@mojatatu.com> wrote:
> On Tue, Oct 31, 2017 at 7:00 AM, Jamal Hadi Salim <j...@mojatatu.com> wrote:
>> On 17-10-31 01:44 AM, Cong Wang wrote:
>>>
>>> Can you try this patch? From your stack trace it is n
On Mon, Oct 30, 2017 at 7:12 PM, Cong Wang <xiyou.wangc...@gmail.com> wrote:
> On Mon, Oct 30, 2017 at 3:39 PM, Lucas Bates <luc...@mojatatu.com> wrote:
>> e.On Thu, Oct 26, 2017 at 9:24 PM, Cong Wang <xiyou.wangc...@gmail.com>
>> wrote:
>>> Recently, t
;
> Signed-off-by: Brenda J. Butler <b...@mojatatu.com>
Acked-by: Lucas Bates <luc...@mojatatu.com>
t;: "$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 <luc...@mojatatu.com>
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
On Tue, May 15, 2018 at 6:03 PM, Lucas Bates <luc...@mojatatu.com> wrote:
> On Tue, May 15, 2018 at 5:49 PM, Jamal Hadi Salim <j...@mojatatu.com> wrote:
>>> Test 7d50: Add skbmod action to set destination mac
>>> exit: 255 0
>>> dst MAC address
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
>>
nd run tdc.py. It will notice the plugins and use them.
>
> Signed-off-by: Brenda J. Butler <b...@mojatatu.com>
Acked-by: Lucas Bates <luc...@mojatatu.com>
> ---
> tools/testing/selftests/tc-testing/TdcPlugin.py| 74 +++
> .../tc-testing/creating-plugins/AddingPl
On Wed, Feb 14, 2018 at 2:09 PM, Brenda J. Butler <b...@mojatatu.com> wrote:
> Move the functionality that checks for root permissions into a plugin.
>
> Signed-off-by: Brenda J. Butler <b...@mojatatu.com>
Acked-by: Lucas Bates <luc...@mojatatu.com>
> ---
> ..
p going (and flush a bunch
> of tap results for the skipped tests).
>
> Signed-off-by: Brenda J. Butler <b...@mojatatu.com>
Acked-by: Lucas Bates <luc...@mojatatu.com>
> ---
> tools/testing/selftests/tc-testing/tdc.py | 81
> ---
&
s another
> selection mechanism. 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 <b...@mojatatu.com>
Acked-by: Lucas Bates
On Wed, Feb 14, 2018 at 2:09 PM, Brenda J. Butler <b...@mojatatu.com> wrote:
> Signed-off-by: Brenda J. Butler <b...@mojatatu.com>
Acked-by: Lucas Bates <luc...@mojatatu.com>
> ---
> tools/testing/selftests/tc-testing/README | 173
> +---
On Wed, Feb 14, 2018 at 2:09 PM, Brenda J. Butler <b...@mojatatu.com> 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 <b...@mojatatu.com>
Acked-by: Lucas Ba
On Wed, Feb 14, 2018 at 2:09 PM, Brenda J. Butler <b...@mojatatu.com> 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 <b...@mojatatu.com>
Acked-by: Lucas Ba
>
> Signed-off-by: Pieter Jansen van Vuuren
Acked-by: 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:
a5
> 8b 61 00 0f 1f 44 00 00 0f 1f 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}
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 <luc...@mojatatu.com>
---
tools/testing/selftests/tc-t
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 <luc...@mojatatu.com>
---
tools/testing/selftests/tc-testing/tc-tests/actions/gact.json | 1
On Thu, Mar 22, 2018 at 2:48 PM, David Miller <da...@davemloft.net> wrote:
> From: Lucas Bates <luc...@mojatatu.com>
> Date: Wed, 21 Mar 2018 11:49:40 -0400
>
>> }
>> -]
>> \ No newline at end of file
>> +]
>> --
>> 2.7.4
>
>
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 <luc...@mojatatu.com>
---
tools/testing/selftests/tc-testing/tc-tests/actions/gact.json | 1
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
>
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 insertions
in 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
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
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
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 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
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
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
56 matches
Mail list logo