diff options
author | Daniele Di Proietto <ddiproietto@google.com> | 2023-06-21 19:44:49 +0000 |
---|---|---|
committer | Daniele Di Proietto <ddiproietto@google.com> | 2023-07-20 09:59:39 +0000 |
commit | be5a94b276884f9de846bab3e2430c24ba9be31a (patch) | |
tree | bbc79610a6a6f563991d7b84e902085f938cd4d0 | |
parent | 146643f04fe7e36575dd79e3258099c3594feb6c (diff) | |
download | perfetto-be5a94b276884f9de846bab3e2430c24ba9be31a.tar.gz |
test: Fix CTS tests on user builds.
CTS tests on user builds fail, because the `sched/sched_process_fork`
event in not accessible (unlike on userdebug builds).
Let's use sched/sched_switch instead. The exact event doesn't matter, we
just need an event that can be successfully enabled.
History of the test:
* On android 12, the `PerfettoFtraceIntegrationTest` suite was happily
included on CTS tests and was passing on user and userdebug build.
* We mistakenly removed suite from CTS on android 13 with
https://r.android.com/1952222, but it was kept in
`perfetto_integrationtests` (which were only run on **userdebug**).
* We added a new test to the suite in https://r.android.com/2027444.
* I readded the `PerfettoFtraceIntegrationTest` in
https://r.android.com/2612391
Tested by running:
```
atest CtsPerfettoTestCases:PerfettoFtraceIntegrationTest#ReportFtraceFailuresInStats -- --abi arm64-v8a
```
on a user master build.
Bug: 288274277
Bug: 291679694
Bug: 289783494
Bug: 291870885
(cherry picked from https://android-review.googlesource.com/q/commit:d04c69d715d45a75c9ccc44e527b8951570eed10)
Merged-In: Ifea07f718bbbd4917170604c3470475811e48b3b
Change-Id: Ifea07f718bbbd4917170604c3470475811e48b3b
(cherry picked from commit 11dc17dc6ad015caf8c3d208f318d5d6ec572a3e)
-rw-r--r-- | test/ftrace_integrationtest.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ftrace_integrationtest.cc b/test/ftrace_integrationtest.cc index ae1b1046e..7fb8ea088 100644 --- a/test/ftrace_integrationtest.cc +++ b/test/ftrace_integrationtest.cc @@ -305,7 +305,7 @@ TEST_F(PerfettoFtraceIntegrationTest, ReportFtraceFailuresInStats) { ds_config->set_name("linux.ftrace"); protos::gen::FtraceConfig ftrace_config; - ftrace_config.add_ftrace_events("sched/sched_process_fork"); // Good. + ftrace_config.add_ftrace_events("sched/sched_switch"); // Good. ftrace_config.add_ftrace_events("sched/does_not_exist"); // Bad. ftrace_config.add_ftrace_events("foobar/i_just_made_this_up"); // Bad. ftrace_config.add_atrace_categories("madeup_atrace_cat"); // Bad. |