添加hiperf command用例

Signed-off-by:wenlong12 <wenlong12@huawei.com>

Signed-off-by: wenlong12 <wenlong12@huawei.com>
This commit is contained in:
wenlong12 2024-08-14 17:05:20 +08:00
parent 17ef04db32
commit 8d42a1fd9d
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