summaryrefslogtreecommitdiffstats
path: root/src/vppinfra/test_macros.c
AgeCommit message (Collapse)AuthorFilesLines
2021-05-06vppinfra: fix testsDamjan Marion1-2/+2
Type: fix Change-Id: If59a66aae658dd35dbcb4987ab00c306b3c6e2e2 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-06-25misc: add gdb macrosDave Barach1-2/+3
These gdb macros should prove very helpul when poking around in core files. Pifi (pool_is_free_index) is not straighforward. Best to work it out once. Others: bitmap_get = clib_bitmap_get vl = vec_len pe = pool_elts node_name_from_index, as described vnet_buffer_opaque, prints the primary buffer opaque vnet_buffer_opaque2, prints the secondary buffer opaque Fix vppinfra unit-test compile error Type: improvement Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Id2a2391a47e5a07cf3757f473e3805cc04784161
2020-06-19vlib: add recursive macro expander to debug cliDave Barach1-2/+2
All of the pieces have been sitting around for years. Added several debug CLI commands: "define <variable-name> <value>" "undefine <variable-name>" "show macro [noeval]" "echo <whatever>" Macros may refer to other macros. To defer evaluation: "define foo \$(bar)" or some such. The macro evaluator is not smart about "define foo \$(foo)" or more complicated circular definitions, so don't do that. Environment variables are available, simply use $<name-of-environment-vbl> The macro expander has a table of (overrideable) builtin names, which are evaluated by calling functions. Simple example: echo $USER define ip1 192.168.1.1/24 define ip2 192.168.2.1/24 loop create loop create set int ip address loop0 $ip1 set int ip address loop1 $ip2 show int addr show macro undefine ip1 undefine ip2 Type: feature Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I08a800647bac573d8ae3cfd75c40061d41c5f976
2018-09-03Compile vppinfra on macOSDamjan Marion1-0/+2
Add missing calls to clib_mem_init to vppinfra test codes. Change-Id: I53ffc6fc287d1a378065bb86c18b6e995ecdb775 Signed-off-by: Damjan Marion <damarion@cisco.com> Signed-off-by: Dave Barach <dave@barachs.net>
2018-06-05VPP API: Memory traceOle Troan1-2/+3
if you plan to put a hash into shared memory, the key sum and key equal functions MUST be set to constants such as KEY_FUNC_STRING, KEY_FUNC_MEM, etc. -lvppinfra is PIC, which means that the process which set up the hash won't have the same idea where the key sum and key compare functions live in other processes. Change-Id: Ib3b5963a0d2fb467b91e1f16274df66ac74009e9 Signed-off-by: Ole Troan <ot@cisco.com> Signed-off-by: Dave Barach <dave@barachs.net> Signed-off-by: Ole Troan <ot@cisco.com>
2016-12-28Reorganize source tree to use single autotools instanceDamjan Marion1-0/+64
Change-Id: I7b51f88292e057c6443b12224486f2d0c9f8ae23 Signed-off-by: Damjan Marion <damarion@cisco.com>