Age | Commit message (Collapse) | Author | Files | Lines |
|
Add a clib_time_t * argument to clib_timebase_init(...), to encourage
client code to share the vlib_main_t's clib_time_t object.
Display the current day / date in GMT via the "show time" debug CLI.
Fix the test framework so it processes the new "show time" output format.
Type: refactor
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I5e52d57eb164b7cdb6355362d520df6928491711
|
|
Mark a few code coverage tests appropriately:
@unittest.skipUnless(running_gcov_tests, "part of code coverage tests")
def test_my_coverage_unittest(self):
<etc>
Almost exactly like "make EXTENDED_TESTS=yes test".
Type: feature
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Ic6d0a097a608ba93442b3d88252f66f8e6805b97
|
|
Make test framework python3 version independence.
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I1ef1eb77b6c1f422ebc4dad0818f87c8e587b34b
|
|
from threading.thread __init__:
This constructor should always be called with keyword arguments.
If a subclass overrides the constructor, it must make sure to invoke
the base class constructor (Thread.__init__()) before doing anything
else to the thread.
Type: test
Change-Id: Ifa89202e97053a4baf19e9a0ca0913430d5087a3
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
Absolutely nothing good happens when we force the kernel to briefly
map and then unmap 16gb as vpp starts. Effect exacerbated when
TEST_JOBS = 20...40, and so forth.
Type: test
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Id8e3ce1763cad3a0891d5d6c8d2c1e3e610682d7
|
|
Type: fix
Change-Id: I5cb9a3845ddbc5f4de4eb4e9c481f606fe5cec9a
Signed-off-by: Neale Ranns <nranns@cisco.com>
|
|
Type: test
Change-Id: I4c54121b76b341381a819cee928c3c2455a83503
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
remove wait-loop on stats socket from test framework.
Type: refactor
Change-Id: I5bb95a7c597707a87f9d9a471215c4b4af1a2280
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
This change fixes the error message, which would previously report
mismatch on IPv6 layer instead of TCP layer.
Type: fix
Change-Id: Ie78779685362a420d155f928b3cdb341bc3fb8bc
Signed-off-by: Klement Sekera <ksekera@cisco.com>
|
|
Type: feature
Change-Id: Ic6d44122d3e62e09402e3f1946f7e57e9b5e7c5f
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
Type: test
This reverts commit 087c811b63aa6b0575149749e188bb37e7fb0513.
Change-Id: Ica12597f27d5a75c33c12c2d27a227dc4866adcb
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
Type: feature
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Id7b30b5fe63e68ae88f3a42aa77d2614ccda724d
|
|
vapi.connect() only raises subclasses of vpp_papi.VPPIOError.
vapi.disconnect() doesn't raise any exceptions, removed uneeded try block.
Type: test
Change-Id: Ide6e6db298b205f14382065862e358757619a5ba
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
When running exec scripts, there can be a need to wait between statements.
Type: feature
Change-Id: I2a45b390697e09fc222358c9354f28e3368a06ba
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
Type: fix
Change-Id: I4286ba58bb15dd67c1199f76166bedf3b4e0344c
Signed-off-by: Benoît Ganne <bganne@cisco.com>
|
|
Type: fix
Since CentOS 8, RPM build script doesn't accept '#!/usr/bin/env python'
as a valid shebang line. It requires scripts to explicitly chose
between python2 or python3.
Change all to use python3 as suggested by Paul Vinciguerra.
Depends-On: https://gerrit.fd.io/r/23170
Signed-off-by: Renato Botelho do Couto <renato@netgate.com>
Change-Id: Ie72af9f60fd0609e07f05b70f8d96e738b2754d1
|
|
Log the random seed used when running tests and provide means to re-use
it in a later run.
Type: feature
Change-Id: I18d2a36ee802b901d4cca5577df41cec07f09cc0
Signed-off-by: Klement Sekera <ksekera@cisco.com>
|
|
This reverts commit 4465fe1e30556b40c9ef8a1a155aa1665102dd22.
That commit makes *every* test to send SIGQUIT to VPP when it is done,
thereby triggering the coredump if there was none.
It is most surely not what we want.
Type: test
Change-Id: I3cc4c96f44c05527d586142f8feccc2f93c3e536
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
|
|
As suggested in the docs by:
https://fd.io/docs/vpp/master/usecases/contiv/core_files#let-vpp-crash
Type: test
Change-Id: I10caf16220e2507351636c1b26e57e19bcf8a542
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
Type: fix
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I309254e9e99920fbeaa50eea503c1c2a9470abfe
|
|
the IPv6 RA tests take timing into the account,
but the time inside VPP may go slightly differently compared
to the time inside the driving python thread,
if the machine running the tests is heavily loaded.
Make a sleep function which sleeps "on VPP time" and use it.
Change-Id: I3b34b0164f6e0ec7a619b92ee308089a4a8935e3
Type: test
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
|
|
Type: test
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I0264451632c1ce780b38a2c15a7e34350fc6d521
|
|
Some testclasses (e.g. IPSec) have methods with the same names,
this causes a race when running in parallel to save the API and
move it into the test's directory - the name of the file has
only the test method name as a discriminator.
Saving two traces from two VPP instances "succeeds", in that
it silently overwrites the file. But only one mv operation
works - the other gives an error "file not found" and fails the test.
Solution: add the PID of VPP under test to the API dump filename,
this way the filenames become guaranteed unique and the race is avoided.
Change-Id: I1bb47ed73369fea0f1bfbf907588a51e2cabfb7f
Type: test
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
|
|
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Id1794f38fcb776ded9b769141f5f47d7be75f247
|
|
Python3 fixes.
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I648b2142d45dfab9146a02eeb1b12de11103ff9f
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
A sizable number of tests call pg_start() to get the packets flowing and then
immediately expect to have the entirety of the packets gone through.
This works on powerful and unstressed hardware, but fails in beautifully random
ways under load.
This also necessitates the complicated logic of remembering the "zombie captures",
then sleeping for some time before cleaning them up....
The solution is simple: in pg_start(), start the generators, wait till they
all finish, clean up, done.
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: I930e51b7aae39c9841d22dd905a4d13a465a672b
Type: test
|
|
Intermittently, a test would start VPP, but no testcases would execute.
This would be more probable apparent during the high load or if there
is another testcase dumping the core at that moment.
Adding the logging to the connection revealed it was the stats socket
connection erroring with error -2. Increasing the deadline
from 3 seconds to 5 minutes has eliminated this error.
Change-Id: I40bd7e642abb9e2aef0238c612e4c34781de5db2
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Type: test
|
|
Type: fix
Fixes: defde0f870
Change-Id: Ib81e3610bd0fc22901a902dc76692f1951ead2b8
Signed-off-by: Klement Sekera <ksekera@cisco.com>
|
|
Note which worker received fragment with offset zero and use this worker
to send out the reassembled packet.
Type: fix
Change-Id: I1d3cee16788db3b230682525239c0100d51dc380
Signed-off-by: Klement Sekera <ksekera@cisco.com>
|
|
Type: feature
Change-Id: Icb1bd3fce768aebf8919c63a104f771ca7fa1d6f
Signed-off-by: Neale Ranns <nranns@cisco.com>
|
|
Type: feature
Change-Id: I72676495a85fbecc946aa266a75234cce70c3a5e
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
|
|
Discovered running test-debug job in CI.
- fix missing paren () around format value.
Type: test
Change-Id: Iebddd3035a435f8ad1cb1d6fa4e8e8c2d4ddaf96
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
Identified in post-merge review.
Type: test
Change-Id: I46e19285479437561a43975ba9b5cb68f478736c
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
Introduce a new class, that returns the truthiness of a env var.
Since an environment variable is just a string, it would normally
be true if not unset. The new class returns true when the env var is
set to a string that would be considered true.
Type: test
Depends-on: https://gerrit.fd.io/r/20484
Change-Id: I90ef010156f6fec246bde5c0e208ced1869b180f
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
Reduces the vpp image virtual size by multiple gigabytes
Add a "show bihash" command which displays configured and current
virtual space in use by bihash tables.
Modify the .py test framework to call "show bihash" on test tear-down
Type: refactor
Change-Id: Ifc1b7e2c43d29bbef645f6802fa29ff8ef09940c
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
No reason to waste CI cycles if we know the test will not run.
See:
17:55:11 ==============================================================================
17:55:11 VPP Object Model Test
17:55:11 ==============================================================================
17:55:11 Exception in thread Thread-4:
17:55:11 Traceback (most recent call last):
17:55:11 File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
17:55:11 self.run()
17:55:11 File "/w/workspace/vpp-beta-verify-master-ubuntu1804/test/framework.py", line 1475, in run
17:55:11 stdout=subprocess.PIPE, stderr=subprocess.PIPE)
17:55:11 File "/w/workspace/vpp-beta-verify-master-ubuntu1804/test/run/venv/local/lib/python2.7/site-packages/subprocess32.py", line 617, in __init__
17:55:11 restore_signals, start_new_session)
17:55:11 File "/w/workspace/vpp-beta-verify-master-ubuntu1804/test/run/venv/local/lib/python2.7/site-packages/subprocess32.py", line 1415, in _execute_child
17:55:11 raise child_exception_type(errno_num, err_msg)
17:55:11 OSError: [Errno 2] No such file or directory: '/w/workspace/vpp-beta-verify-master-ubuntu1804/test/build/vom_test/vom_test'
17:55:11
17:55:11 17:55:11,328 Timeout! Worker did not finish in 120s
17:55:11 run C++ VOM tests ERROR [ temp dir used by test case: /tmp/vpp-unittest-VOMTestCase-vpMcWF ]
17:55:11
Type: fix
Change-Id: I3d8252807e98a09a8abd70de8a22517151f9d786
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
Type: test
Change-Id: I869768ed25efa3350f025fba329466db69805803
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
'Exception: VPP is dead when setting up the test'
is more helpful with the test info.
Type: test
Change-Id: I6a262fdcf2ecb33aae17bef3d19745053a0bade8
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
- Move Exception into same module as TestCase.
- Move the error reporting logic inside the error.
- Allows testing of the returncode and signal_name for tests to consume.
- Fix the signal reporting code:
VppDiedError: VPP subprocess died unexpectedly with returncode -6 [unknown].
displays as:
VppDiedError: VPP subprocess died unexpectedly with return code: -6 [SIGABRT].
Type: test
Change-Id: I8488ab318a596c9b737308829cedfb7e96e57302
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
Prepend sudo to the gdb command line.
Type: test
Change-Id: I09013c3ca512e26de0c46c02f643b21064ba499c
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
Catches:
----
Traceback (most recent call last):
File "/vpp/test/framework.py", line 593, in tearDown
self.logger.info(self.vapi.ppcli("api trace save %s" % api_trace))
File "/vpp/test/vpp_papi_provider.py", line 413, in ppcli
return cli + "\n" + str(self.cli(cli))
File "/vpp/test/vpp_papi_provider.py", line 402, in cli
r = self.papi.cli_inband(cmd=cli)
File "/vpp/src/vpp-api/python/vpp_papi/vpp_papi.py", line 100, in __call__
return self._func(**kwargs)
File "/vpp/src/vpp-api/python/vpp_papi/vpp_papi.py", line 414, in f
return self._call_vpp(i, msg, multipart, **kwargs)
File "/vpp/src/vpp-api/python/vpp_papi/vpp_papi.py", line 634, in _call_vpp
msg = self.transport.read()
File "/vpp/src/vpp-api/python/vpp_papi/vpp_transport_shmem.py", line 120, in read
raise VppTransportShmemIOError(rv, 'vac_read failed')
VppTransportShmemIOError: [Errno -1] vac_read failed
----
Change-Id: I767e48c4d03081eb5df6a8aa67da7e192d25e4cc
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
Change-Id: Ic6e6ac0629bbf07f7dad1803a85aabfdccbc2035
Signed-off-by: Klement Sekera <ksekera@cisco.com>
|
|
The current code only allowed access to the main thread error counters.
That is not so useful for a multi worker instance.
No return a vector indexed by thread of counter_t values.
Type: fix
Change-Id: Ie322c8889c0c8175e1116e71de04a2cf453b9ed7
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
limit max # of fragments to 3 per packet by default
add API option to configure the limit at runtime
Change-Id: Ie4b9507bf5c6095b9a5925972b37fe0032f4f9e8
Signed-off-by: Klement Sekera <ksekera@cisco.com>
|
|
The unit and code coverage tests are boring. The rest of the patch
involves test and packet-generator infra cleanups.
Teach the "make test-xxx" family of targets to set the api test plugin
path correctly, to make "binary-api <api-message-name> <args>" debug
CLI commands work correctly in the "make test"
environment. Unfortunately involves both the top-level and test
Makefiles.
Add a minor pg cli feature, a CLI to manually set
s->sw_if_index[VLIB_TX].
Consider the case where one configures an interface with both a
device-input and an output feature. To test the output feature using
the pg, it's necessary to inject packets into the interface output
node with both b->sw_if_index[VLIB_TX] and b->sw_if_index[VLIB_RX] set
correctly. For example:
packet-generator new {
name tx
limit 15
size 128-128
interface local0 # rx: device input feature not configured on local0
tx-interface loop0 # tx: output node requires b->sw_if_index[VLIB_TX]
node loop0-output
data {
hex 0x01005e7ffffa000dead0000008000102030405060708090a0b0c0d0e0f0102030405
}
}
Fix a longstanding bug in the packet generator stream setup. Remove
kludges which set b->sw_if_index[VLIB_TX] to ~0 [in multiple places]
instead of using the stream value s->sw_if_index[VLIB_TX], and setting
THAT datum correctly.
Change-Id: I1097a18e8db73661ded6b822c1d718f7e5cf36ed
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Change-Id: I342ff8e44e0d1ebd9f2c8cc386372b2f5a731080
Signed-off-by: Alexandre Poirrier <apoirrie@cisco.com>
|
|
- Wait for coredump to complete before killing VPP.
Change-Id: Ib7b96b339f796f9ef7e0eadff81d181464b8a03a
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
|
|
Otherwise, gcov data vanishes without a trace.
Add a __gcov_flush() call to the unix signal handler, under #ifdef
CLIB_GCOV. Add -DCLIB_GCOV to vpp_gcov_TAG_CFLAGS.
Change-Id: I2726e671b26dfbe7fae88f46a8207bb2b5106884
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Handle the case where buffer overflows.
Then SOCK_SEQPACKET assumption that multiple API messages
are not returned by recv() is broken. Use SOCK_STREAM for
API exchanges instead.
Add support for running tests over sockets.
make test SOCKET=1
Change-Id: Ibe5fd69b1bf617de4c7ba6cce0a7c2b3f97a2821
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
This change adds a consistent interface for adding test-specific show commands to
log.txt.
It also adds log markers for the execution of setUp[Class], tearDown[Class]
in the logs.
Change-Id: I7d42e396e594a59e866a7d55dac0af25548e657a
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|