aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/unittest/CMakeLists.txt
AgeCommit message (Collapse)AuthorFilesLines
2021-10-20gso: add support for gso perf unittestMohsin Kazmi1-0/+1
Type: test Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: I5d44a6ea24e4aa0842024a0961f1fb22c6e6419a
2021-10-01devices: add support for pseudo header checksumMohsin Kazmi1-0/+1
Type: improvement Linux uses pseudo header checksum when checksum of l4 is offloaded. This patch adds similar support in virtual interfaces. Change-Id: I6a94d1104e59356f95057e7c122e3be9cd8659a3 Signed-off-by: Aloys Augustin <aloaugus@cisco.com> Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2021-09-20hash: add support for hashing infraMohsin Kazmi1-0/+1
Type: feature Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: I3652ae275385d9b1eb1b11f418e3a7e5fef2f556
2021-09-17misc: put devtools plugins into separate component/packageDamjan Marion1-0/+3
Type: make Change-Id: I2958e9eddadee6434766ecd3cdb3b9cea742ed64 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-06-08vppinfra: pool_free_elts() now supports fixed-size poolsDave Barach1-0/+1
Test added to the unittest plugin / test_vlib.py Type: improvement Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I73445e57918347c102ff6f5e8c9ddb9bd96f1407
2021-05-05crypto crypto-openssl: support hashing operationsFilip Tehlar1-0/+1
Type: feature Change-Id: I36041fe5c5f0ff129aee42516189807e96f62123 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2021-02-10tests: add policer test helperBrian Russell1-0/+1
Add a helper CLI to exercise a policer pre-configured by the test harness. The test harness will check the stats afterwards. Type: test Signed-off-by: Brian Russell <brian@graphiant.com> Change-Id: I913dda4a9f8179c1c6b3061a68164bf1e698a392
2021-02-04vlib: increase the stats epoch only when necessaryMiklos Tirpak1-0/+1
When the counter vectors are validated and they are already long enough to fit the given index in memory, there is no need to increase the stats segment epoch. In this case, the counter vectors do not change as a result of the validation. This optimization is necessary for the case when the configuration is changed at multiple thousands per second rate. The counter vectors grow at the beginning and their size stabilizes after a while. Without this improvement, it can still take several seconds for a stats reader to succeed. Type: improvement Signed-off-by: Miklos Tirpak <miklos.tirpak@gmail.com> Change-Id: I5a6c30255832716a1460018d0bd0f63031de102b
2020-12-23vppinfra: mem bulk testFlorin Coras1-0/+1
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Icd44ede9604c29839af250a2be93ecf467467aa0
2020-09-22lisp: Move to pluginNeale Ranns1-1/+0
Type: refactor Change-Id: I54df533a8f863c4e49742903cf2457f18b4fc506 Signed-off-by: Neale Ranns <nranns@cisco.com>
2020-09-01crypto-openssl: add chacha20-poly1305 to crypto-opensslArtem Glazychev1-0/+6
Type: feature Signed-off-by: Artem Glazychev <artem.glazychev@xored.com> Change-Id: Iec28fb11b6edff1bee23117f56aa3a3e5729541a Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-05-04misc: binary api fuzz test fixesDave Barach1-0/+1
Add a hook to src/vlibapi/api_shared.c to fuzz (screw up) binary API messages, e.g. by xoring random data into them before processing. We specifically exempt client connection messages, and inband debug CLI messages. We step over msg_id, client index, client context, and sw_if_index. Otherwise, "make test" vectors fail too rapidly to learn anything. The goal is to reduce the number of crashes caused to zero. We're fairly close with this patch. Add vl_msg_api_max_length(void *mp), which returns the maximum plausible length for a binary API message. Use it to hardern vl_api_from_api_to_new_vec(...) which takes an additional argument - message pointer - so it can verify that astr->length is sane. If it's not sane, return a u8 *vector of the form "insane astr->length nnnn\0". Verify array lengths in vl_api_dhcp6_send_client_message_t_handler(...) and vl_api_dhcp6_pd_send_client_message_t_handler(...). Add a fairly effective binary API fuzz hook to the unittest plugin, and modify the "make test" framework.py to pass "api-fuzz { on|off }" to enable API fuzzing: "make API_FUZZ=on TEST=xxx test-debug" or similar Type: improvement Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I0157267652a163c01553d5267620f719cc6c3bde
2020-04-28vppinfra: improve test coverageDave Barach1-0/+1
Bonus corner-case bugfix in bitmap.h, found during the exercise. Issue dates from 2001 or thereabouts. Please review this specific change carefully. lcov_post: filter system include directories and generated files in build-root Type: improvement Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Iaa0b63e9dc571dfe3d992197ac49ba4d93403c61
2020-02-25session svm: tracking segment memory usageRyujiro Shibuya1-0/+1
1. segment manager would attempt to balance the usages across the segments, when it allocate fifos 2. the memory presure level is determined per fifo-segment 3. updated unit test 4. updated cli output for segments Type: feature Signed-off-by: Ryujiro Shibuya <ryujiro.shibuya@owmobility.com> Change-Id: I2923f3e0a43dd919196a0cb2cd55e098fde6cf66
2019-11-18vlib: improve code coverage in src/vlibDave Barach1-8/+9
Type: test Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I2dc4c09730f77931a2b484a6dd5dc669068f8e57
2019-07-24vppinfra: add mapped pcap file supportGary Boon1-0/+1
Type: feature Change-Id: Ic720d56a6f8901efde2a58519bc9aa553205a9a6 Signed-off-by: Gary Boon <gboon@cisco.com> Signed-off-by: Dave Barach <dave@barachs.net>
2019-07-13vppinfra: add doubly linked listFlorin Coras1-0/+1
Type: feature Change-Id: I21511c1abea703da67f1a491e73342496275c498 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-06-25lisp: move cp tests to unittestFlorin Coras1-0/+1
Type: refactor Also reformats and fixes some of the tests. Change-Id: I074c677fd9b28e192f72a2db32f6f2dbda9a314f Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-06-20buffers: fix crashKlement Sekera1-0/+1
this change is being made to fix a crash when current_data < 0 in buffer linearization function Ticket: N/A Type: fix Fixes: f883f6a1132ad4bb7aa9d9a79d420274fbcf3b64 Change-Id: Ia4ede823f673780e0c30d075b091db42e183650d Signed-off-by: Klement Sekera <ksekera@cisco.com>
2019-05-09add mactime plugin unit / code coverage testsDave Barach1-0/+1
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>
2019-04-23Enable 'test crash' command when running unittest plugin.Paul Vinciguerra1-0/+1
Change-Id: Icf0cff122dfbd260a2865b6c83531f4a8c726132 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-04-19svm: move fifo tests to a separate fileFlorin Coras1-0/+1
Change-Id: Iac9ac9f5a6873aae1882316af4f6c919788a0cef Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-16vppinfra: add basic rbtreeFlorin Coras1-0/+1
Algorithm from CLRS, Introduction to Algorithms 3rd Edition, Ch. 13 Change-Id: I5bc2c507593770939cd5584f21dacf36ebd2b4c1 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-14crypto: add support for AES-CTR cipherfituldo1-1/+2
Change-Id: I7d84bab7768421ed37813702c0413e52167f41ab Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2019-04-07crypto: add support for AEAD and AES-GCMDamjan Marion1-0/+1
Change-Id: Iff6f81a49b9cff5522fbb4914d47472423eac5db Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-04-02vppinfra: fix sparse_vec_index() returning non-zero index for some ↵Andrew Yourtchenko1-0/+1
nonexistent elements If we are testing for an index whose membership bitmask happens to sit in LSB of uword, and there is nothing else set in that uword in the member bitmask, the shortcut path returning the valid index is taken even if the element with a given index doesn't exist in the sparse vector. This happens because the count of leading zeroes on the value of 0 is zero, which is equal to the value taken modulo bitsize uword. Take care of that case. Also add unittests showing the problem and verifying that sparse_vec_index2 does not have the same issue. Change-Id: I19117e13817c3e5de579b9250bb741de42491985 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2019-03-28Punt InfraNeale Ranns1-0/+1
A punt/exception path that provides: 1) clients that use the infra 2) clients can create punt reasons 3) clients can register to recieve packets that are punted for a given reason to be sent to the desired node. 4) nodes which punt packets fill in the {reason,protocol} of the buffere (in the meta-data) and send to the new node "punt-dispatch" 5) punt-dispatch sends packets to the registered nodes or drops Change-Id: Ia4f144337f1387cbe585b4f375d0842aefffcde5 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-22IPSEC: test for packet drop on sequence number wrapNeale Ranns1-0/+1
Change-Id: Id546c56a4904d13d4278055f3c5a5e4548e2efd0 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-20tests: implement crypto tests per RFC2202Filip Tehlar1-1/+2
Change-Id: I18b30d5ee8aa60c34d52b7716b5feb7225cb0d59 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2019-03-19crypto: introduce crypto infraDamjan Marion1-0/+4
Change-Id: Ibf320b3e7b054b686f3af9a55afd5d5bda9b1048 Signed-off-by: Damjan Marion <damarion@cisco.com> Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2019-03-14TEST: link-state up/down notifications on FIB forwardingNeale Ranns1-0/+1
Change-Id: I478c4e5feb9603b7443efdf2967f98f9bde7ea0f Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-12-03move [m]fib and BIER tests to unittest pluginNeale Ranns1-0/+3
Change-Id: I9d2f52e756363df011026773bfffa838a557313f Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-10-28session: move test to unittest pluginFlorin Coras1-2/+3
Change-Id: I4921054b4e42bac3442d399681b21b613ce8b681 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-23c11 safe string handling supportDave Barach1-0/+1
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab Signed-off-by: Dave Barach <dave@barachs.net>
2018-08-25cmake: improve add_vpp_plugin macroDamjan Marion1-1/+2
Change-Id: Iffd5c45ab242a919592a1f686f7f880936b68a1a Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-17CMake as an alternative to autotools (experimental)Damjan Marion1-0/+18
Change-Id: Ibc59323e849810531dd0963e85493efad3b86857 Signed-off-by: Damjan Marion <damarion@cisco.com>