aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/DUTSetup.py
AgeCommit message (Collapse)AuthorFilesLines
2020-09-23FIX: Race conditionpmikus1-0/+12
avf tests works, but vfio-pci tests are following, the interfaces must be in down state (ideally unbind, as vpp cannot pick them). Signed-off-by: pmikus <pmikus@cisco.com> Change-Id: I77af85ec4239059a5455ef68683ca129548bd7bd
2020-09-22Framework: Heapsize configurationpmikus1-1/+1
- https://gerrit.fd.io/r/c/vpp/+/28829 - https://gerrit.fd.io/r/c/vpp/+/28896 - ip6 to be added later Signed-off-by: pmikus <pmikus@cisco.com> Change-Id: I7b03b8ace5c5c7582d4a2f66bfd788a3ec80a916
2020-01-28perf: hoststack iperf3 test tuningDave Wallace1-11/+11
Change-Id: I53425f57fe9ecef9cff2c94642cc7cb24537a961 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2020-01-24Attempt to fix journalctlPeter Mikus1-3/+3
- AWK - ECHO - pipe + Much simpler Change-Id: I4876f4eae68c96571dc38fd21e53ba269f5f888e Signed-off-by: Peter Mikus <pmikus@cisco.com>
2020-01-20FIX: Hugepages should be detected also from overcommitPeter Mikus1-147/+69
Change-Id: I36ec9d61f775791ad0632a579c4921889d1f5acf Signed-off-by: Peter Mikus <pmikus@cisco.com>
2020-01-15Hoststack perf infrastructure refactoringDave Wallace1-16/+66
- DUT only topology (hoststack test apps are co-located with vpp) - Make vpp app specific keywords generic where applicable - Add IP4 Prefix to topology file - Support running wrk in linux namespace - Refactor namespace cleanup - Remove redundant namespace creation code - Refactor test/keyword dirs: tcp -> hoststack - Add hoststack utility keywords - Refactor wrk suite setup/teardown - Update tests with recent perf infra changes Change-Id: Ia1cf07978d579393eef94923819a87c8c1f36f34 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-12-13FIX: eth interfaces need numa_node information in topology fileJan Gelety1-1/+1
Change-Id: I9a3c6947da8ab5033e29b39833c97bcdafdc3ca9 Signed-off-by: Jan Gelety <jgelety@cisco.com>
2019-12-11Introduce VPP-IPsec container tests.Ludovit Mikula1-2/+2
Change-Id: Ie64d662e81879bd52785e0188450d998bf056bda Signed-off-by: Ludovit Mikula <ludovit.mikula@pantheon.tech>
2019-12-09FIX: integer divisionsJan Gelety1-1/+1
Change-Id: I28caf62f418bf18601cd379603d03c307e3ba9c8 Signed-off-by: Jan Gelety <jgelety@cisco.com>
2019-12-05Improve quoting of asterisksVratko Polak1-1/+1
When quoted, the asterisks are understood as literal characters. When unquoted, so they act as globs patterns. When used to match files already present in the filesystem, the asterisks should be unquoted. When used to match a package name (not a file), the asterisks should be quoted to prevent the bash expansion, as programs such as apt-get and yum do their own expasion afterwards. Unquoted asterisks for matching package names may happen to work when there are no files to match the bash expansion, but quoted asterisks are sure to avoid accidents. Also, we want an asterisk both before and after "vpp", due to package names such as libvppinfra-dev and python3-vpp-api. Change-Id: I657a24c24a71d865915aba201bd0d3276cb33281 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-11-28Python3: resources and librariesJan Gelety1-236/+255
Change-Id: I1392c06b1d64f62b141d24c0d42a8e36913b15e2 Signed-off-by: Jan Gelety <jgelety@cisco.com>
2019-11-11FIX: Paths for new Docker imagesPeter Mikus1-2/+1
Signed-off-by: Peter Mikus <pmikus@cisco.com> Change-Id: Ia39ff6445e4029a78d008d5690661610a1e9ed50
2019-05-15FIX: Remove old restart sequence - HoneycombPeter Mikus1-3/+4
Change-Id: I12865ea4f48c1902e80e67463fff4cf481a2e24c Signed-off-by: Peter Mikus <pmikus@cisco.com>
2019-05-09Remove old VPP Restart sequencePeter Mikus1-30/+4
Change-Id: I7f71a9709ad55ce03d73e23cc8a9f5064947ed51 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2019-05-07Fix typos in DUTsetup.pyVratko Polak1-2/+2
Change-Id: I7fb255c26bfb62a273844b3753aa37b742835045 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-05-06CSIT-1493 VPP restart handling codePeter Mikus1-1/+39
Change-Id: Ibe52125089f39e0ff17ec607a3ed00c61d52ab8c Signed-off-by: Peter Mikus <pmikus@cisco.com>
2019-03-28Add ipsec crypto test for Denverton platformYulong Pei1-7/+21
add ipsec cryto test to support Denverton hardware crypto device C3xxx. replace HW_cryptodev keyword to HW_DH895xcc or HW_C3xxx, or add more other hardware crypto device type support in the future. Change-Id: I181bca4095757fde7ca45ab3856273ac5930d902 Signed-off-by: Yulong Pei <yulong.pei@intel.com>
2019-03-04Rename to Constants.pyVratko Polak1-1/+1
Motivation: Make the constants available also for Robot. Restraint: Robotframework user guide says: Because variable files are always imported using a file system path, creating them as classes has some restrictions: Python classes must have the same name as the module they are located. Change-Id: I638ef3fe045db132e366de2e2699638b8637e45e Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-02-25FIX: VPP PIDs can also be separated by spaces not only by line breaksJan Gelety1-6/+4
Change-Id: I6a5e8732be224927aa965cdf6b93998aa8699639 Signed-off-by: Jan Gelety <jgelety@cisco.com>
2019-02-04CSIT-1416 Remove installation of vpp from containersPeter Mikus1-0/+23
Use parent system (Host, Container) installation of VPP. This will save the internet bandwith by skip installing of prerequisites packages. It will also skip dpkg install and simplify the process of initializing VPP inside container. Previosly initialization of VPP in container takes about 55s. With this patch it is reduced to 2-3s. This patch removes the bloated VOLUME creation between container sidecars (a.k.a nested container) and fixes the hugepage allocation. Change-Id: Ifa2be532edb77354657e1b84568bdc34993b00d0 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2019-01-28CSIT-1403 Implement multichain configuration for l2bd with memif/ip4.Peter Mikus1-6/+7
Change-Id: Ia87156b2ba826eb0a9a93d756b9765c7373ca6ce Signed-off-by: Peter Mikus <pmikus@cisco.com>
2019-01-24CSIT-1407 FIX vpp install after VPP changesPeter Mikus1-57/+20
Change-Id: I9148f6de75c3100f827eedec48c4c0ccb343bc54 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2018-09-28CSIT-1321 Add IP4base tests using AVF driverPeter Mikus1-9/+18
Change-Id: I960c2b4170efa06597851853cfc15bda1c60fe94 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2018-09-19CSIT-1291 Improve service handling with container detectionPeter Mikus1-164/+82
Change-Id: Iaeac10676f46e0267041afee927bc6e3201146b2 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2018-09-05CSIT-1205 Create AVF driver testPeter Mikus1-107/+217
- Add L1 KWs for SR-IOV handling (init Vfs, remove Vfs, ...) - Cleanup L1 KWs for SR-IOV bind/unbind/pci_get/... - Add L2 KWs for Test Setup/Teardown, L2patch, Create AVF interface - Add sample L2patch test fox x710, xxv710 Change-Id: If17077877455a14043617d8ea0d06cbe47b469e3 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2018-09-05Fix various pylint violationsVratko Polak1-18/+19
+ SchedUtils.py: Do not use `len(SEQUENCE)` to determine if a sequence is empty + VatHistory.py: Do not use `len(SEQUENCE)` to determine if a sequence is empty + VppCounters.py: Do not use `len(SEQUENCE)` to determine if a sequence is empty + Memif.py: ++ Do not use `len(SEQUENCE)` to determine if a sequence is empty ++ Either all return statements in a function should return an expression, or none of them should. ++ Update :return: on possible None. + Classify.py: Unnecessary "else" after "return" + ContainerUtils.py: Useless super delegation in method '__init__' + CpuUtils.py: Do not use `len(SEQUENCE)` to determine if a sequence is empty + DropRateSearch.py: Either all return statements in a function should return an expression, or none of them should. + IPv4NodeAddress.py: Do not use `len(SEQUENCE)` to determine if a sequence is empty ++ Also improve docstrings. + IPv4Setup.py: Useless super delegation in method '__init__' + IPv6Setup.py: Do not use `len(SEQUENCE)` to determine if a sequence is empty ++ Also improve docstrings. + IPv6Setup.py: standard import "from ipaddress import IPv6Network" should be placed before "from robot.api import logger" + MacSwap.py: Trailing newlines + NATUtil.py: Do not use `len(SEQUENCE)` to determine if a sequence is empty + NodePath.py: Unnecessary "else" after "return" + Tap.py: Do not use `len(SEQUENCE)` to determine if a sequence is empty + topology.py: Either all return statements in a function should return an expression, or none of them should. + topology.py: Unnecessary "else" after "return" ++ Do not use `len(SEQUENCE)` to determine if a sequence is empty ++ Improve docstrings + DUTSetup.py: Do not use `len(SEQUENCE)` to determine if a sequence is empty ++ Also do not compare int(ret_code) just to access zero-ness. + ssh.py: Do not use `len(SEQUENCE)` to determine if a sequence is empty + InterfaceUtil.py: Unnecessary "else" after "return" Change-Id: Iba4244aa79661ee7df15fed5c7c6dbf04dfa88b2 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2018-08-20Refactor VHOST codePeter Mikus1-0/+166
CSIT-1164 Create VM vhost tests for 2-node topology CSIT-1173 Implement VM vhost KWs for 2-node topology - Cleanup QemuUtils.py Library (PEP8, some TODOs, readability, multi queue, ring size, qemu version detection) - Cleanup VHOST KWs perf (Unify running QEMU on N-node topology) - Add ability to configure Queues, Hyperthreading, automatically compute number of CPU for VM/Testpmd and RXQ for Testpmd workload. - Partial cleanup of configuration KWs (l2xc, l2bd) for 2-node - Create IPv4 2-node KW Change-Id: I8aae1355bafa651de715cd438fe706c443ea1d88 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2018-07-03CSIT-1046 Make uio driver configurable from topofilesPeter Mikus1-0/+13
Currently we are configuring uio_driver from global variable. This may not be suitable for various topologies where we need different driver per TB. This patch is suppose to put uio_driver into topology files. Change-Id: I56af0697e8b2359ccb126151217976408720c1ba Signed-off-by: Peter Mikus <pmikus@cisco.com>
2018-07-02Compatibility fixes with Ubuntu 18.04Peter Mikus1-4/+18
Currently we are using ip:port socket to for VPP to listen for incoming connections. There is only one place in code this socket is used for detection if VPP is responding after restart. This patch is supposed to change ip:port to sock:file which is default preffered way in VPP. This way we can start using vppctl. netcat on the other side with ip:port remains hanged in console for infinite time not returning back. There is also need to check whether uio_module is loaded and eventually load it. As uio_pci_generic is not working there, we will fallback to main igb_uio (uio_pci_generic being only lightweight subset of igb_uio). This patch also add additional verbose output to console during setup to better understand if failure happens during copy/extract/setup. Change-Id: I0b8a3b76dce3316496a3ad928f58718b6e73057d Signed-off-by: Peter Mikus <pmikus@cisco.com>
2018-06-22CSIT-1043: Execute pci rescan only if neededjuraj.linkes1-7/+24
Pci rescan is a rather invasive process, which is why it should be executed only if needed. This patch moves the pci rescan after pci device driver discovery, rescanning the devices for further attemps at driver discovery. Change-Id: I29c939b44c3f67371416a99c711e057f711ba9b4 Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
2018-05-04Fix various pylint 1.5.4 warningsVratko Polak1-2/+1
+ DUTSetup.py:424 Else clause on loop without a break statement + InterfaceUtil.py:400 Else clause on loop without a break statement + QemuUtils.py:564 Wrong continued indentation + SetupDPDKTest.py: Locally enabling broad-except + VatExecutor.py: Catching too general exception Exception + ssh.py:95 No exception type(s) specified. + HTTPRequest.py: Tolerate HTTPCodes.OK + multiple: Drop ":returns: None" from docstrings. There are still several warnings present: - R0902(too-many-instance-attributes) - R0912(too-many-branches) - R0913(too-many-arguments) - R0914(too-many-locals) - R0915(too-many-statements) - R0401(cyclic-import) And there are multiple blocks of similar lines, mainly across various Setup*Test.py files: - R0801(duplicate-code) Change-Id: I582575cb52b85d69d268e6374852f6e74bb71052 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2018-04-25Fix warnings reported by gen_doc.shVratko Polak1-4/+4
+ Docstring warnings fixed. + Multiline param descriptions indented by 4 spaces. - Except the PacketVerifier.py one - I have tried several quote-like blocks, nothing works. - Rst warnings not fixed. - How can I fix them? They refer to temporarily created files. + Other improvements: + Python lines no longer than 80 characters. + :return: -> :returns: + Notes before params. + :raises + closing colon after exception class. + Description is a sentence. + Present tense in conditional sentences. + Bumped copyright year in edited files. Change-Id: I462c194eeecb666dc146e26858486a07c990be9b Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2018-04-23CSIT-1009: SRv6 proxy testsJan Gelety1-0/+1
- SRv6 with endpoint to SR-unaware Service Function via static proxy - SRv6 with endpoint to SR-unaware Service Function via dynamic proxy - SRv6 with endpoint to SR-unaware Service Function via masquerading proxy Change-Id: I6a6062cb41d810bf9e27dacfd866181bfde4c693 Signed-off-by: Jan Gelety <jgelety@cisco.com>
2018-04-11Create unified service operationsPeter Mikus1-22/+69
- Add ability to dump the logs from service unit (since last start) - Cleanup service code to more streamlined way. Change-Id: I6e332dce3229727dd36fd72a8ecfb9fc9efe4d63 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2018-03-22FIX: check OS on DUT instead on hostJan Gelety1-1/+3
CSIT-1010 Change-Id: I21303c22a50c0fe7914f769aca61ef350287ccb5 Signed-off-by: Jan Gelety <jgelety@cisco.com>
2018-03-19FIX: remove all vpp packages installedJan Gelety1-10/+10
Change-Id: I1a2e51fada2f16fb236499a5cbff735f5e08aae2 Signed-off-by: Jan Gelety <jgelety@cisco.com>
2018-03-16VPP install and verify in __init__.robotAndrej Kilvady1-0/+125
Move VPP installation to separate test in test suite setup phase to clearly indicate any issue with VPP installation. Added test to check VPP responsiveness after installation. Change-Id: Idc2c78152e23aa7301bb5dbf9b1b6f4b639c3e84 Signed-off-by: Andrej Kilvady <andrej.kilvady@pantheon.tech>
2018-03-14Robot logs archiving for trending jobsPeter Mikus1-4/+0
- Add output.xml auto-archiving to logs.fd.io. - Cleanup from obsolete code. Change-Id: Iafa9ef802264d2ad36ca0f556cb14d2b3ca0f179 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2018-01-17CSIT-675: SRv6 performance testsJan Gelety1-2/+29
- update L1 KWs - update L2 KWs - tests with one SID (no SRH insertion) - tests with two SIDs (SRH inserted) and decapsulation - tests with two SIDs (SRH inserted) without decapsulation - enabled packet traces and logged packet traces in the test case tear down if test failed Change-Id: I3a0f4c350eed3f42509c6d49e832faa78fe64dbb Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-12-15CSIT-861: SW cryptodev perf testsJan Gelety1-35/+89
Change-Id: I687216ca43569542d38be681ca04c898010fc65d Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-09-08CSIT-665: Re-write L1 robot keywords in pythonDasa Simkova1-2/+12
Change-Id: Iddd823375ddd17b9abd5f02ee3aea3bfcb625149 Signed-off-by: Dasa Simkova <dspropagacie@gmail.com>
2017-07-26Fix pylint errorsTibor Frank1-14/+15
Change-Id: I9b8d69978ee35bf7610cdfd372135ce3515eec96 Signed-off-by: Tibor Frank <tifrank@cisco.com>
2017-06-20VIRL VPP PID fixJan Gelety1-23/+24
- use three tries to get PID of VPP process Change-Id: If72784dfc2c5600aae703dff9170c4f491a3b685 Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-05-30Do not fail test case when no vpp pid detected in the tear downJan Gelety1-4/+9
- currently when no pid (or more pids) detected in the test case tear down of successfully run test case not only the WARN message is logged but the whole test case is failed - to change this behaviour but keep test case failure if no vpp pid (or more vpp pids) detected in test case setup the low level KW "Get VPP PID" behaviour has been changed to return one or more pids or None w/o raising an error and check has been moved to higher level KW "Save VPP PIDs" - there was added suite name and test case name to WARN message when no pid or more pids detected in the test case tear down Change-Id: I04f8d81c1ca48a1e4a45bd0e58f00d36d51c6933 Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-04-10IPsec Multi-Tunnel performance test suiteKirill Rybalchenko1-0/+184
Change-Id: I4b0ba83960e50089f29cab9a30ab760241c6f566 Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
2017-03-28Use "No VPP PID found on node X" when vpp pid is not returnedJan Gelety1-2/+6
Change-Id: Idfe6d674355bf57fdc24219cdaf8664ec23dfce9 Signed-off-by: Jan Gelety <jgelety@cisco.com>
2016-12-16Pylint fixesTibor Frank1-3/+4
- Fix PyLint errors - Fix comments in touched python modules Change-Id: I26db2d292a41969cf38b9b0bdd49c4fb15349102 Signed-off-by: Tibor Frank <tifrank@cisco.com>
2016-11-07CSIT-465: Common test setup and teardownTibor Frank1-0/+45
This test setup and teardown is aimed to be used with all functional tests. It does not include functionality to manipulate VMs (qemu). Test setup includes: - Setup all DUTs before test - Save VPP PIDs - Setup all TGs before traffic script - Update All Interface Data On All Nodes Test teardown includes: - Show Packet Trace on All DUTs - Show vpp trace dump on all DUTs - Vpp Show Errors On All DUTs - Check VPP PID in Teardown Change-Id: Ifee0bd58b7865442c5b510852908fd8363e3c543 Signed-off-by: Tibor Frank <tifrank@cisco.com>
2016-10-27Increase timeout for 'vpp restart' operationsMiroslav Miklus1-2/+2
Systemd first send SIGTERM and wait 90s (default value) to send SIGKILL to terminate the vpp service. Change-Id: Ia582cfdc4bebc5d3530e82692856fe733d0b001e Signed-off-by: Miroslav Miklus <mmiklus@cisco.com>
2016-10-04Fix pylint warnings in python librariesselias1-2/+12
- no functional changes - fixes 80+ PEP-8 violations Change-Id: Icf414778ec40d5cb44364fa69a876f9a1870c3c7 Signed-off-by: selias <samelias@cisco.com>