diff options
author | 2024-11-20 11:11:35 +0100 | |
---|---|---|
committer | 2024-11-22 22:24:37 +0000 | |
commit | d05f16d1247e27695a92b2e3e871ce42e94a08c4 (patch) | |
tree | 784221643c52dee29e9065603205eefd57c00147 /extras/hs-test/README.rst | |
parent | c990aae85a2ec456dad24944978b88f48faa8aa6 (diff) |
hs-test: added multithreaded vpp proxy tests
- if a test is named '...MTTest', 3 cpus will be allocated to vpp
- updated docs
Type: test
Change-Id: I756dfb6cdbff4368d606ca3abbc1a510cd1d6b51
Signed-off-by: Adrian Villin <avillin@cisco.com>
Diffstat (limited to 'extras/hs-test/README.rst')
-rw-r--r-- | extras/hs-test/README.rst | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/extras/hs-test/README.rst b/extras/hs-test/README.rst index c62be5a84aa..25f512ca117 100644 --- a/extras/hs-test/README.rst +++ b/extras/hs-test/README.rst @@ -68,6 +68,10 @@ For adding a new suite, please see `Modifying the framework`_ below. Assumed are two docker containers, each with its own VPP instance running. One VPP then pings the other. This can be put in file ``extras/hs-test/my_test.go`` and run with command ``make test TEST=MyTest``. +To add a multi-worker test, name it ``[name]MTTest``. Doing this, the framework will allocate 3 CPUs to a VPP container, no matter what ``CPUS`` is set to. +Only a single multi-worker VPP container is supported for now. Please register multi-worker tests as Solo tests to avoid reusing the same cores +when running in parallel. + :: package main @@ -77,7 +81,12 @@ This can be put in file ``extras/hs-test/my_test.go`` and run with command ``mak ) func init(){ - RegisterMySuiteTest(MyTest) + RegisterMySuiteTests(MyTest) + RegisterSoloMySuiteTests(MyMTTest) + } + + func MyMTTest(s *MySuite){ + MyTest(s) } func MyTest(s *MySuite) { @@ -86,8 +95,8 @@ This can be put in file ``extras/hs-test/my_test.go`` and run with command ``mak serverVethAddress := s.NetInterfaces["server-iface"].Ip4AddressString() result := clientVpp.Vppctl("ping " + serverVethAddress) - s.Log(result) s.AssertNotNil(result) + s.Log(result) } @@ -100,6 +109,7 @@ The framework allows us to filter test cases in a few different ways, using ``ma * File name * Test name * All of the above as long as they are ordered properly, e.g. ``make test TEST=VethsSuite.http_test.go.HeaderServerTest`` + * Multiple tests/suites: ``make test TEST=HttpClient,LdpSuite`` **Names are case sensitive!** @@ -308,6 +318,12 @@ or a new version incompatibility issue occurs. Debugging a test ---------------- +DRYRUN +^^^^^^ + +``make test TEST=[name] DRYRUN=true`` will setup and start most of the containers, but won't run any tests or start VPP. VPP and interfaces will be +configured automatically once you start VPP with the generated startup.conf file. + GDB ^^^ |