Re: [PATCH bpf-next 1/3] selftests/bpf: add CSV output mode for veristat

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 9/19/22 9:07 PM, Andrii Nakryiko wrote:
Teach veristat to output results as CSV table for easier programmatic
processing. Change what was --output/-o argument to now be --emit/-e.
And then use --output-format/-o <fmt> to specify output format.
Currently "table" and "csv" is supported, table being default.

For CSV output mode veristat is using spec identifiers as column names.
E.g., instead of "Total states" veristat uses "total_states" as a CSV
header name.

Internally veristat recognizes three formats, one of them
(RESFMT_TABLE_CALCLEN) is a special format instructing veristat to
calculate column widths for table output. This felt a bit cleaner and
more uniform than either creating separate functions just for this.

Also fix double-free of bpf_object in process_prog, which didn't feel
important enough to have a separate patch for.

Without this patch set, I do see the following failure:

[$ ~/work/bpf-next/tools/testing/selftests/bpf] ./veristat -s insns,file,prog {pyperf,loop,test_verif_scale,strobemeta,test_cls_redirect,profiler}*.linked3.o double free or corruption (!prev)

Aborted (core dumped)

This patch set fixed the double free problem.


Signed-off-by: Andrii Nakryiko <andrii@xxxxxxxxxx>
---
  tools/testing/selftests/bpf/veristat.c | 114 ++++++++++++++++---------
  1 file changed, 76 insertions(+), 38 deletions(-)

[...]



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux