[0/2] tracing: Fix cpu buffers unavailable problem and add its testcase

Message ID 20230804124549.2562977-1-zhengyejian1@huawei.com
Headers
Series tracing: Fix cpu buffers unavailable problem and add its testcase |

Message

Zheng Yejian Aug. 4, 2023, 12:45 p.m. UTC
  Hi, steve,

after some operations on file 'tracing_cpumask' and 'snapshot', trace
ring buffer can no longer record anything. This series contain a patch
to fix it and a constrived testcase to reproduce it.

I think the reproduction testcase is useful to help others to check if
their version has this problem and verify the bugfix. However, currently
in "tools/testing/selftests/ftrace/test.d", there seems no appropriate
subdirectory to put this kind reproductions.

So I now put the testcase in "00basic" because it is basicly simple. Or
would there be a new directory to collect simple reproduction testcases?

Zheng Yejian (2):
  tracing: Fix cpu buffers unavailable due to 'record_disabled' messed
  selftests/ftrace: Add a basic testcase for snapshot

 kernel/trace/trace.c                            |  2 ++
 .../ftrace/test.d/00basic/snapshot1.tc          | 17 +++++++++++++++++
 2 files changed, 19 insertions(+)
 create mode 100644 tools/testing/selftests/ftrace/test.d/00basic/snapshot1.tc