ed346fcc | 24-Nov-2023 |
Pedro Tammela <pctammela@mojatatu.com> |
selftests: tc-testing: remove unused import
Remove this leftover from the times we pre-allocated everything
Signed-off-by: Pedro Tammela <pctammela@mojatatu.com> Acked-by: Jamal Hadi Salim <jhs@moj
selftests: tc-testing: remove unused import
Remove this leftover from the times we pre-allocated everything
Signed-off-by: Pedro Tammela <pctammela@mojatatu.com> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> Link: https://lore.kernel.org/r/20231124154248.315470-6-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
501679f5 | 24-Nov-2023 |
Pedro Tammela <pctammela@mojatatu.com> |
selftests: tc-testing: cleanup on Ctrl-C
Cleanup net namespaces and other resources if we get a SIGINT (Ctrl-C). As user visible resources are allocated on a per test basis, it's only required to ca
selftests: tc-testing: cleanup on Ctrl-C
Cleanup net namespaces and other resources if we get a SIGINT (Ctrl-C). As user visible resources are allocated on a per test basis, it's only required to catch this condition when (possibly) running tests.
So far calling post_suite is enough to free up anything that might linger.
A missing keyword replacement for nsPlugin is also included.
Signed-off-by: Pedro Tammela <pctammela@mojatatu.com> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> Link: https://lore.kernel.org/r/20231124154248.315470-5-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
56e16bc6 | 24-Nov-2023 |
Pedro Tammela <pctammela@mojatatu.com> |
selftests: tc-testing: prefix iproute2 functions with "ipr2"
As suggested by Simon, prefix the functions that operate on iproute2 commands in contrast with the "nl" netlink prefix.
Cc: Simon Horman
selftests: tc-testing: prefix iproute2 functions with "ipr2"
As suggested by Simon, prefix the functions that operate on iproute2 commands in contrast with the "nl" netlink prefix.
Cc: Simon Horman <horms@kernel.org> Signed-off-by: Pedro Tammela <pctammela@mojatatu.com> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> Link: https://lore.kernel.org/r/20231124154248.315470-4-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
4b480cfb | 17-Nov-2023 |
Pedro Tammela <pctammela@mojatatu.com> |
selftests: tc-testing: timeout on unbounded loops
In the spirit of failing early, timeout on unbounded loops that take longer than 20 ticks to complete. Such loops are to ensure that objects created
selftests: tc-testing: timeout on unbounded loops
In the spirit of failing early, timeout on unbounded loops that take longer than 20 ticks to complete. Such loops are to ensure that objects created are already visible so tests can proceed without any issues.
If a test setup takes more than 20 ticks to see an object, there's definetely something wrong.
Signed-off-by: Pedro Tammela <pctammela@mojatatu.com> Reviewed-by: Simon Horman <horms@kernel.org> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> Link: https://lore.kernel.org/r/20231117171208.2066136-6-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
3f2d94a4 | 17-Nov-2023 |
Pedro Tammela <pctammela@mojatatu.com> |
selftests: tc-testing: leverage -all in suite ns teardown
Instead of listing lingering ns pinned files and delete them one by one, leverage '-all' from iproute2 to do it in a single process fork.
S
selftests: tc-testing: leverage -all in suite ns teardown
Instead of listing lingering ns pinned files and delete them one by one, leverage '-all' from iproute2 to do it in a single process fork.
Signed-off-by: Pedro Tammela <pctammela@mojatatu.com> Reviewed-by: Simon Horman <horms@kernel.org> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> Link: https://lore.kernel.org/r/20231117171208.2066136-5-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
3d5026fc | 17-Nov-2023 |
Pedro Tammela <pctammela@mojatatu.com> |
selftests: tc-testing: use netns delete from pyroute2
When pyroute2 is available, use the native netns delete routine instead of calling iproute2 to do it. As forks are expensive with some kernel co
selftests: tc-testing: use netns delete from pyroute2
When pyroute2 is available, use the native netns delete routine instead of calling iproute2 to do it. As forks are expensive with some kernel configs, minimize its usage to avoid kselftests timeouts.
Signed-off-by: Pedro Tammela <pctammela@mojatatu.com> Reviewed-by: Simon Horman <horms@kernel.org> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> Link: https://lore.kernel.org/r/20231117171208.2066136-4-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
fa63d353 | 14-Nov-2023 |
Pedro Tammela <pctammela@mojatatu.com> |
selftests: tc-testing: rework namespaces and devices setup
As mentioned in the TC Workshop 0x17, our recent changes to tdc broke downstream CI systems like tuxsuite. The issue is the classic problem
selftests: tc-testing: rework namespaces and devices setup
As mentioned in the TC Workshop 0x17, our recent changes to tdc broke downstream CI systems like tuxsuite. The issue is the classic problem with rcu/workqueue objects where you can miss them if not enough wall time has passed. The latter is subjective to the system and kernel config, in my machine could be nanoseconds while in another could be microseconds or more.
In order to make the suite deterministic, poll for the existence of the objects in a reasonable manner. Talking netlink directly is the the best solution in order to avoid paying the cost of multiple 'fork()' calls, so introduce a netlink based setup routine using pyroute2. We leave the iproute2 one as a fallback when pyroute2 is not available.
Also rework the iproute2 side to mimic the netlink routine where it creates DEV0 as the peer of DEV1 and moves DEV1 into the net namespace. This way when the namespace is deleted DEV0 is also deleted automatically, leaving no margin for resource leaks.
Another bonus of this change is that our setup time sped up by a factor of 2 when using netlink.
Signed-off-by: Pedro Tammela <pctammela@mojatatu.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
11f04de9 | 22-Jun-2021 |
Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> |
tc-testing: add support for sending various scapy packets
It can be worth sending different scapy packets on a given test, as in the last patch of this series. For that, lets listify the scapy attri
tc-testing: add support for sending various scapy packets
It can be worth sending different scapy packets on a given test, as in the last patch of this series. For that, lets listify the scapy attribute and simply iterate over it.
Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
c25e4736 | 14-Feb-2018 |
Brenda J. Butler <bjb@mojatatu.com> |
tools: tc-testing: valgrindPlugin
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 <bjb@mojatatu.com
tools: tc-testing: valgrindPlugin
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 <bjb@mojatatu.com> Acked-by: Lucas Bates <lucasb@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
a13fedbe | 14-Feb-2018 |
Brenda J. Butler <bjb@mojatatu.com> |
tools: tc-testing: nsPlugin
Move the functionality of creating a namespace before the test suite and destroying it afterwards to a plugin.
Signed-off-by: Brenda J. Butler <bjb@mojatatu.com> Acked-b
tools: tc-testing: nsPlugin
Move the functionality of creating a namespace before the test suite and destroying it afterwards to a plugin.
Signed-off-by: Brenda J. Butler <bjb@mojatatu.com> Acked-by: Lucas Bates <lucasb@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
f6926e85 | 14-Feb-2018 |
Brenda J. Butler <bjb@mojatatu.com> |
tools: tc-testing: rootPlugin
Move the functionality that checks for root permissions into a plugin.
Signed-off-by: Brenda J. Butler <bjb@mojatatu.com> Acked-by: Lucas Bates <lucasb@mojatatu.com> S
tools: tc-testing: rootPlugin
Move the functionality that checks for root permissions into a plugin.
Signed-off-by: Brenda J. Butler <bjb@mojatatu.com> Acked-by: Lucas Bates <lucasb@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|