!554 添加hiperf command用例

Merge pull request !554 from wenlong_12/master
This commit is contained in:
openharmony_ci 2024-08-15 09:24:30 +00:00 committed by Gitee
commit a63cdc160a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 14 additions and 0 deletions

View File

@ -700,6 +700,10 @@ HWTEST_F(PerfEventRecordTest, GetPerfEventRecord, TestSize.Level1)
ASSERT_EQ(perfEventRecord != nullptr, true);
}
}
std::unique_ptr<PerfEventRecord> perfEventRecord =
GetPerfEventRecord(static_cast<perf_event_type>(PERF_RECORD_AUXTRACE),
reinterpret_cast<uint8_t *>(&data), attr);
ASSERT_EQ(perfEventRecord != nullptr, true);
}
} // namespace HiPerf
} // namespace Developtools

View File

@ -1249,6 +1249,16 @@ HWTEST_F(SubCommandRecordTest, ExcludeTids, TestSize.Level1)
ForkAndRunTest("-d 2 -s dwarf -f 2000 --exclude-tid 200");
}
/**
* @tc.name: ExcludeThread
* @tc.desc: Test --exclude-thread
* @tc.type: FUNC
*/
HWTEST_F(SubCommandRecordTest, ExcludeThread, TestSize.Level1)
{
ForkAndRunTest("-d 2 -s dwarf -f 2000 --exclude-thread com.app.test");
}
/**
* @tc.name: ExcludeMixedThreadName
* @tc.desc: Test --exclude-thread option mixed correct name and error name