libtraceevent: Add sample program to test events

Add a samples directory and the program test-event that can be used to
parse a given event. I found that when an event fails in trace-cmd, it
can be a burden to try to debug it as you may need to go through all the
events to get to the buggy event.

The test-event will let you simply copy and paste the event format into
a file, and read it and it will parse it, giving any errors that it
finds. This makes running the parser under gdb much easier.

Link: https://lore.kernel.org/linux-trace-devel/20220221152539.6671a413@rorschach.local.home

Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
4 files changed