From 5ba5837b150acb7c827809b262eb43230030422e Mon Sep 17 00:00:00 2001 From: Dave Wallace Date: Tue, 13 Feb 2018 16:14:06 -0500 Subject: make-test: use api custom-dump to reduce log size. - Reduce log size by using "api trace custom-dump" instead of "api trace dump". - Fix custom-dump output of cli_inband_t api message to include cli command being executed. New output: DBGvpp# api trace custom-dump /tmp/test vl_api_memclnt_delete_t: index: 2 handle: 0x301d8e10 SCRIPT: memclnt_create name vpp_api_test SCRIPT: sw_interface_dump all SCRIPT: control_ping SCRIPT: exec show run Old output: DBGvpp# api trace dump /tmp/test ---------- trace 0 ----------- vl_api_memclnt_delete_t: index: 33554432 handle: 0x108e1d3000000000 ---------- trace 1 ----------- vl_api_memclnt_create_t: name: vpp_api_test input_queue: 0x808e1d3000000000 context: 0 ctx_quota: 0 ---------- trace 2 ----------- vl_api_sw_interface_dump_t: _vl_msg_id: 61 client_index: 33554432 context: 0 name_filter_valid: 0 ---------- trace 3 ----------- vl_api_control_ping_t: _vl_msg_id: 712 client_index: 33554432 context: 0 ---------- trace 4 ----------- vl_api_cli_inband_t: _vl_msg_id: 715 client_index: 33554432 context: 0 length: 9 Change-Id: If740c861649a3a59b8cc7a777c23c3cf94b8ff87 Signed-off-by: Dave Wallace --- src/vpp/api/custom_dump.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/vpp/api/custom_dump.c b/src/vpp/api/custom_dump.c index 49fe2a8bd26..a51b6aa2dc6 100644 --- a/src/vpp/api/custom_dump.c +++ b/src/vpp/api/custom_dump.c @@ -1806,9 +1806,15 @@ static void *vl_api_cli_inband_t_print (vl_api_cli_inband_t * mp, void *handle) { u8 *s; + u8 *cmd = 0; + u32 length = ntohl (mp->length); - s = format (0, "SCRIPT: cli_inband "); + vec_validate (cmd, length); + clib_memcpy (cmd, mp->cmd, length); + s = format (0, "SCRIPT: exec %v ", cmd); + + vec_free (cmd); FINISH; } -- cgit 1.2.3-korg