<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/tools/testing/selftests/tc-testing, branch v6.7</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.7</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.7'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2023-10-21T10:46:41Z</updated>
<entry>
<title>selftests: tc-testing: add test for 'rt' upgrade on hfsc</title>
<updated>2023-10-21T10:46:41Z</updated>
<author>
<name>Pedro Tammela</name>
<email>pctammela@mojatatu.com</email>
</author>
<published>2023-10-19T17:29:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ee3d12285471f17239af467eab11f9cb08c18dc4'/>
<id>urn:sha1:ee3d12285471f17239af467eab11f9cb08c18dc4</id>
<content type='text'>
Add a test to check if inner rt curves are upgraded to sc curves.

Signed-off-by: Pedro Tammela &lt;pctammela@mojatatu.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests: tc-testing: move auxiliary scripts to a dedicated folder</title>
<updated>2023-10-19T01:07:51Z</updated>
<author>
<name>Pedro Tammela</name>
<email>pctammela@mojatatu.com</email>
</author>
<published>2023-10-17T15:23:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=35027c790970c40a5093550af7c9f1c77de182b4'/>
<id>urn:sha1:35027c790970c40a5093550af7c9f1c77de182b4</id>
<content type='text'>
Some taprio tests need auxiliary scripts to wait for workqueue events to
process. Move them to a dedicated folder in order to package them for
the kselftests tarball.

Acked-by: Jamal Hadi Salim &lt;jhs@mojatatu.com&gt;
Signed-off-by: Pedro Tammela &lt;pctammela@mojatatu.com&gt;
Link: https://lore.kernel.org/r/20231017152309.3196320-3-pctammela@mojatatu.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: tc-testing: add missing Kconfig options to 'config'</title>
<updated>2023-10-19T01:07:51Z</updated>
<author>
<name>Pedro Tammela</name>
<email>pctammela@mojatatu.com</email>
</author>
<published>2023-10-17T15:23:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f157b73d511416226f70c3cb1750eb6fdfa76a2a'/>
<id>urn:sha1:f157b73d511416226f70c3cb1750eb6fdfa76a2a</id>
<content type='text'>
Make sure CI builds using just tc-testing/config can run all tdc tests.
Some tests were broken because of missing knobs.

Acked-by: Jamal Hadi Salim &lt;jhs@mojatatu.com&gt;
Signed-off-by: Pedro Tammela &lt;pctammela@mojatatu.com&gt;
Link: https://lore.kernel.org/r/20231017152309.3196320-2-pctammela@mojatatu.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/tc-testing: update tdc documentation</title>
<updated>2023-09-28T07:51:07Z</updated>
<author>
<name>Pedro Tammela</name>
<email>pctammela@mojatatu.com</email>
</author>
<published>2023-09-19T13:54:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d3fc4eea9742b89ba9b1609463cf62bba4b9be82'/>
<id>urn:sha1:d3fc4eea9742b89ba9b1609463cf62bba4b9be82</id>
<content type='text'>
Update the documentation to reflect the changes made to tdc with regards
to minimal requirements and test definitions expectations.

Tested-by: Davide Caratti &lt;dcaratti@redhat.com&gt;
Signed-off-by: Pedro Tammela &lt;pctammela@mojatatu.com&gt;
Acked-by: Jamal Hadi Salim &lt;jhs@mojatatu.com&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
<entry>
<title>selftests/tc-testing: implement tdc parallel test run</title>
<updated>2023-09-28T07:51:07Z</updated>
<author>
<name>Pedro Tammela</name>
<email>pctammela@mojatatu.com</email>
</author>
<published>2023-09-19T13:54:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ac9b8293096465914c1a0b778e759333ceac5cd1'/>
<id>urn:sha1:ac9b8293096465914c1a0b778e759333ceac5cd1</id>
<content type='text'>
Use a Python process pool to run the tests in parallel.
Not all tests can run in parallel, for instance tests that are not
namespaced and tests that use netdevsim, as they can conflict with one
another.

The code logic will split the tests into serial and parallel.
For the parallel tests, we build batches of 32 tests and queue each
batch on the process pool. For the serial tests, they are queued as a
whole into the process pool, which in turn executes them concurrently
with the parallel tests.

Even though the tests serialize on rtnl_lock in the kernel, this feature
showed results with a ~3x speedup on the wall time for the entire test suite
running in a VM:
   Before - 4m32.502s
   After - 1m19.202s

Examples:
   In order to run tdc using 4 processes:
      ./tdc.py -J4 &lt;...&gt;
   In order to run tdc using 1 process:
      ./tdc.py -J1 &lt;...&gt; || ./tdc.py &lt;...&gt;

Note that the kernel configuration will affect the speed of the tests,
especially if such configuration slows down process creation and/or
fork().

Tested-by: Davide Caratti &lt;dcaratti@redhat.com&gt;
Signed-off-by: Pedro Tammela &lt;pctammela@mojatatu.com&gt;
Acked-by: Jamal Hadi Salim &lt;jhs@mojatatu.com&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
<entry>
<title>selftests/tc-testing: update test definitions for local resources</title>
<updated>2023-09-28T07:51:07Z</updated>
<author>
<name>Pedro Tammela</name>
<email>pctammela@mojatatu.com</email>
</author>
<published>2023-09-19T13:54:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d227cc0b1ee12560f7489239fc69ba6a10b14607'/>
<id>urn:sha1:d227cc0b1ee12560f7489239fc69ba6a10b14607</id>
<content type='text'>
With resources localized on a per test basis, some tests definitions
either contain redundant commands, were wrong or could be simplified.
Update all of them to match the new requirements.

Tested-by: Davide Caratti &lt;dcaratti@redhat.com&gt;
Signed-off-by: Pedro Tammela &lt;pctammela@mojatatu.com&gt;
Acked-by: Jamal Hadi Salim &lt;jhs@mojatatu.com&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
<entry>
<title>selftests/tc-testing: localize test resources</title>
<updated>2023-09-28T07:51:07Z</updated>
<author>
<name>Pedro Tammela</name>
<email>pctammela@mojatatu.com</email>
</author>
<published>2023-09-19T13:54:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=98cfbe4234a41e4d7baf3f58b95cab5fc50d1492'/>
<id>urn:sha1:98cfbe4234a41e4d7baf3f58b95cab5fc50d1492</id>
<content type='text'>
As of today, the current tdc architecture creates one netns and uses it
to run all tests. This assumption was embedded into the nsPlugin which
carried over as how the tests were written.

The tdc tests are by definition self contained and can,
theoretically, run in parallel. Even though in the kernel they will
serialize over the rtnl lock, we should expect a significant speedup of the
total wall time for the entire test suite, which is hitting close to
1100 tests at this point.

A first step to achieve this goal is to remove sharing of global resources like
veth/dummy interfaces and the netns. In this patch we 'localize' these
resources on a per test basis. Each test gets it's own netns, VETH/dummy interfaces.
The resources are spawned in the pre_suite phase, where tdc will prepare
all netns and interfaces for all tests. This is done in order to avoid
concurrency issues with netns / interfaces spawning and commands using
them. As tdc progresses, the resources are deleted after each test finishes
executing.

Tests that don't use the nsPlugin still run under the root namespace,
but are now required to manage any external resources like interfaces.
These cannot be parallelized as their definition doesn't allow it.
On the other hand, when using the nsPlugin, tests don't need to create
dummy/veth interfaces as these are handled already.

Tested-by: Davide Caratti &lt;dcaratti@redhat.com&gt;
Signed-off-by: Pedro Tammela &lt;pctammela@mojatatu.com&gt;
Acked-by: Jamal Hadi Salim &lt;jhs@mojatatu.com&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
<entry>
<title>selftests/tc-testing: cls_u32: add tests for classid</title>
<updated>2023-09-13T11:38:52Z</updated>
<author>
<name>Pedro Tammela</name>
<email>pctammela@mojatatu.com</email>
</author>
<published>2023-09-11T21:50:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e2f2fb3c352da855da2b9e1b2fd43a07cc1cd009'/>
<id>urn:sha1:e2f2fb3c352da855da2b9e1b2fd43a07cc1cd009</id>
<content type='text'>
As discussed in '3044b16e7c6f', cls_u32 was handling the use of classid
incorrectly. Add a test to check if it's conforming to the correct
behaviour.

Reviewed-by: Victor Nogueira &lt;victor@mojatatu.com&gt;
Signed-off-by: Pedro Tammela &lt;pctammela@mojatatu.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests/tc-testing: cls_route: add tests for classid</title>
<updated>2023-09-13T11:38:52Z</updated>
<author>
<name>Pedro Tammela</name>
<email>pctammela@mojatatu.com</email>
</author>
<published>2023-09-11T21:50:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7c339083616ce803fce1bfe322bf2e20d8d84ab0'/>
<id>urn:sha1:7c339083616ce803fce1bfe322bf2e20d8d84ab0</id>
<content type='text'>
As discussed in 'b80b829e9e2c', cls_route was handling the use of classid
incorrectly. Add a test to check if it's conforming to the correct
behaviour.

Reviewed-by: Victor Nogueira &lt;victor@mojatatu.com&gt;
Signed-off-by: Pedro Tammela &lt;pctammela@mojatatu.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests/tc-testing: cls_fw: add tests for classid</title>
<updated>2023-09-13T11:38:52Z</updated>
<author>
<name>Pedro Tammela</name>
<email>pctammela@mojatatu.com</email>
</author>
<published>2023-09-11T21:50:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=70ad43333cbeaaa173cce9825f3afa63ba7ce88d'/>
<id>urn:sha1:70ad43333cbeaaa173cce9825f3afa63ba7ce88d</id>
<content type='text'>
As discussed in '76e42ae83199', cls_fw was handling the use of classid
incorrectly. Add a few tests to check if it's conforming to the correct
behaviour.

Reviewed-by: Victor Nogueira &lt;victor@mojatatu.com&gt;
Signed-off-by: Pedro Tammela &lt;pctammela@mojatatu.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
