tools lib traceevent: Refactor test_filter() to get rid of die()

The test_filter() function is for testing given filter is matched to a
given record.  However it doesn't handle error cases properly so add a
new argument error_str to save error info during the test and also
pass it to internal test functions.

For now, it just save the error but does nothing with it.  Maybe it
can be given by user through pevent_filter_match() later.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
2 files changed