aboutsummaryrefslogtreecommitdiffstats
path: root/test/hook.py
AgeCommit message (Collapse)AuthorFilesLines
2019-02-04Fix inheritance problem in test/hook.py.Paul Vinciguerra1-16/+16
Subclasses cannot modify the signature of their constructors. def __init__(self, test): - super(PollHook, self).__init__(test.logger) + super(PollHook, self).__init__(test) Change-Id: I764df8871128f9198a03fac4ec2f45528547467a Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-02-01VTL: Fix issue with ipaddress library use under python2.Paul Vinciguerra1-0/+5
If you pass in a non-unicode 4-byte ipv6 address to ip_address, ipaddress interprets this as an IPv4Address. Under python2, ip_address interprets 'a7::' as a packed ipv4: 97.55.58.58 You can test with: --- import ipaddress try: text_type = unicode except NameError: text_type = str addr = ipaddress.ip_address('a7::') print(addr) --- Change-Id: I06c561e0ab7315869cc89d0bb08c05e743a90982 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-12-13test/hook.py. Add human-friendly annotations to log msgs.Paul Vinciguerra1-3/+19
* Add human-friendly annotations to packed data values in the logs. Examples: vpp-unittest-TestNAT66-_JdbMS/log.txt:22:31:29,152 API: ip_neighbor_add_del (is_static=0, is_no_adj_fib=0, is_add=1, sw_if_index=2, dst_address='\xfd\x01\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02 (fd01:2::2)', mac_address='\x02\x02\x00\x00\xff\x02 (02:02:00:00:ff:02)', is_ipv6=1) vpp-unittest-TestACL_dot1ad_bridged-xEdhrj/log.txt:22:31:17,130 API: ip_neighbor_add_del (is_static=0, is_no_adj_fib=0, is_add=1, sw_if_index=5, dst_address='\xfd\x01\x00\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc9 (fd01:5::c9)', mac_address='\x02\x05\xc9\x00\xff\xc9 (02:05:c9:00:ff:c9)', is_ipv6=1) vpp-unittest-TestACL_dot1ad_bridged-xEdhrj/log.txt:22:31:17,240 API: sw_interface_add_del_address (address_length=24, del_all=0, is_add=1, sw_if_index=6, address='\xac\x10\x06\x01 (172.16.6.1)', is_ipv6=0) vpp-unittest-TestACL_dot1ad_bridged-xEdhrj/log.txt:22:31:17,314 API: sw_interface_add_del_address (address_length=64, del_all=0, is_add=1, sw_if_index=6, address='\xfd\x01\x00\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01 (fd01:6::1)', is_ipv6=1) Change-Id: Id6991569ee0ff853f76fae8fac941e8a26468a19 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-10-10Setup, teardown, DEBUG=core, FAILFAST fixesjuraj.linkes1-21/+14
- Fixed a bug when an error occuring in tearDownClass would not result in test being marked as failed - Improved test results reporting in cases when an error occurs in setUpClass and tearDownClass - Fixed DEBUG=core when the core is produced in setUpClass or tearDownClass - Reworked DEBUG=core to always be handled after all tests have been executed - Fixed FAILFAST=1 for parallel test runs Change-Id: I3e9cd3b97ba6fa802fa0aa2dd7678ff82eee09ec Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
2018-08-30Fix the default step when using STEP=1 while testingjuraj.linkes1-1/+1
Change-Id: I6b2950dfd0d9023b20e24845b3bce20cf4ba66df Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
2018-08-23CSIT-1139: Implement parallel test executionjuraj.linkes1-5/+5
The implementation of parallel test execution in VPP Test Framework. - VPPTestCase test methods are grouped together - tests are running in separate processes - VPP instances spawned by tests are assigned to different cores - output from these processes is redirected through pipes and printed out testcase by testcase - TEST_JOBS env var is used to specify the number of parallel processes - improved test summary - a bit of code cleanup Change-Id: I9ca93904d9fe2c3daf980500c64a8611838ae28c Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
2018-03-31make test: print a warning in case a core_pattern contains a filter programAndrew Yourtchenko1-0/+2
The default config on Ubuntu 16.04.4 desktop results in truncated cores when running make test which coredumps. Uninstalling the filter program (apport) makes the corefiles normal size. Print a warning about that fact, so the others potentially affected didn't have to wonder. Change-Id: Iba4b0a2765a25100d6e24fd7f4de0e0339efd835 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-03-24make test: enhance core-file informationKlement Sekera1-2/+12
Change-Id: I1283960a9a49f6d70b9d7b7793cfb345c22ccdea Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-03-23make test: code cleanupKlement Sekera1-3/+5
Change-Id: Ic689de569e5b6e6209d16d6acdb13c489daca1f5 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-03-14make test: early core detection, code cleanupKlement Sekera1-0/+2
Change-Id: I503d69f902f1c8d3107fb3f2b9f31b0083ebb747 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-02-01IPv4/6 reassemblyKlement Sekera1-9/+5
Change-Id: Ic5dcadd13c88b8a5e7896dab82404509c081614a Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-11-06make test: fix DEBUG=core errorKlement Sekera1-1/+1
Change-Id: I703b2866a1607d6a2fad215e90b5cf2d7afdfd0d Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-08-10make test: detect hung testsKlement Sekera1-22/+7
Run tests in a forked process with a set of pipes to communicate keep-alives and overall result. This allows us to detect when e.g. vpp dies mid-API call causing the test to hang waiting for response (which will never come since vpp died). Support setting a (per test case) TIMEOUT make test option to set timeout, with a default timeout of 120 seconds. Example - fail the test suite if any test-case fails to finish within 300s: make TIMEOUT=300 test Change-Id: I0d04f26a7232968f4bf043adf5d5b508f5018717 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-01-11make test: improve documentation and PEP8 complianceKlement Sekera1-2/+2
Change-Id: Ib4f0353aab6112fcc3c3d8f0bcbed5bc4b567b9b Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-12-07BFD: basic asynchronous session up/downKlement Sekera1-8/+12
This is a work-in-progress basic BFD session handling. Only asynchronous mode is supported at the moment. Setting the session flags doesn't work. Change-Id: Idba27f721b5c35be5a66a6d202a63d23ff7ecf6f Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-11-28make test: detect early vpp crashKlement Sekera1-2/+1
If VPP process dies right at start, do a quick detection instead of being stuck in the connect timeout (60s). Change-Id: I41675181635fb81a6a7d93fbf652480a16bf78a0 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-11-02Improve debug-cli in test frameworkKlement Sekera1-1/+1
Opening debug-cli only makes sense if there is time for user to use it, so either the run must be debugged or stepped. Only open the debug-cli in these cases. Change-Id: Ied276071797a549880d730cda43c59230a412efe Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-10-31add vpp debugging support to test frameworkKlement Sekera1-8/+104
improve test documentation Change-Id: Ia9678aa2532ecb4cb33736aedb4a31aa3f2a3f93 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-10-26refactor test frameworkKlement Sekera1-0/+128
Change-Id: I31da3b1857b6399f9899276a2d99cdd19436296c Signed-off-by: Klement Sekera <ksekera@cisco.com> Signed-off-by: Matej Klotton <mklotton@cisco.com> Signed-off-by: Jan Gelety <jgelety@cisco.com> Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>