hi, this code tests the link between perf stat/record command line options and final perf_event_attr struct values. Also it tests the group fd linkage.
It's probably missing many command line option combinations worth testing. I wanted to check with others for more ideas before diving into this. You can check this also here: git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/linux.git perf/attr_tests4 thanks, jirka Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Corey Ashford <[email protected]> Cc: Frederic Weisbecker <[email protected]> Signed-off-by: Jiri Olsa <[email protected]> --- tools/perf/Makefile | 1 + tools/perf/builtin-test.c | 4 + tools/perf/perf.c | 2 + tools/perf/perf.h | 11 ++ tools/perf/util/test-attr.c | 142 ++++++++++++++++++++++++++ tools/perf/util/test-attr.py | 272 ++++++++++++++++++++++++++++++++++++++++++++++++++ tools/perf/util/test-attr/base-record | 39 ++++++++ tools/perf/util/test-attr/base-stat | 39 ++++++++ tools/perf/util/test-attr/test-record-basic | 5 + tools/perf/util/test-attr/test-record-count | 8 ++ tools/perf/util/test-attr/test-record-freq | 6 ++ tools/perf/util/test-attr/test-record-graph-default | 6 ++ tools/perf/util/test-attr/test-record-graph-dwarf | 6 ++ tools/perf/util/test-attr/test-record-graph-fp | 6 ++ tools/perf/util/test-attr/test-record-group | 17 ++++ tools/perf/util/test-attr/test-record-no-inherit | 7 ++ tools/perf/util/test-attr/test-record-no-samples | 6 ++ tools/perf/util/test-attr/test-record-period | 7 ++ tools/perf/util/test-attr/test-stat-basic | 6 ++ tools/perf/util/test-attr/test-stat-group | 15 +++ tools/perf/util/test-attr/test-stat-no-inherit | 7 ++ 21 files changed, 612 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

