diff options
author | Yabin Cui <yabinc@google.com> | 2024-04-02 21:53:43 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2024-04-02 21:53:43 +0000 |
commit | 0744f4b1eb07920150f5561dfbcb38fb11b5b89c (patch) | |
tree | c4190e60885482c14d37ca57ecce715efdad61f5 /simpleperf/cmd_monitor_test.cpp | |
parent | 5bc39c1637bc190939cdc07787dc46dac74d3400 (diff) | |
parent | 648c3e410a948316888ba83fe99e4e5640e220d6 (diff) | |
download | extras-0744f4b1eb07920150f5561dfbcb38fb11b5b89c.tar.gz |
Merge "simpleperf: Add CDD annotation for CtsSimpleperfTestCases" into main
Diffstat (limited to 'simpleperf/cmd_monitor_test.cpp')
-rw-r--r-- | simpleperf/cmd_monitor_test.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/simpleperf/cmd_monitor_test.cpp b/simpleperf/cmd_monitor_test.cpp index 963a9808..8264c966 100644 --- a/simpleperf/cmd_monitor_test.cpp +++ b/simpleperf/cmd_monitor_test.cpp @@ -59,15 +59,18 @@ static ::testing::AssertionResult RunMonitorCmd(std::vector<std::string> v, std: return (result ? ::testing::AssertionSuccess() : ::testing::AssertionFailure()); } +// @CddTest = 6.1/C-0-2 TEST(monitor_cmd, no_options) { std::string output; ASSERT_FALSE(RunMonitorCmd({}, output)); } +// @CddTest = 6.1/C-0-2 TEST(monitor_cmd, no_event) { ASSERT_FALSE(MonitorCmd()->Run({"-a", "--duration", "1"})); } +// @CddTest = 6.1/C-0-2 TEST(monitor_cmd, global) { TEST_REQUIRE_ROOT(); std::string output; @@ -75,6 +78,7 @@ TEST(monitor_cmd, global) { ASSERT_GT(output.size(), 0); } +// @CddTest = 6.1/C-0-2 TEST(monitor_cmd, no_perf) { TEST_REQUIRE_ROOT(); std::string output; @@ -82,6 +86,7 @@ TEST(monitor_cmd, no_perf) { ASSERT_GT(output.size(), 0); } +// @CddTest = 6.1/C-0-2 TEST(monitor_cmd, with_callchain) { TEST_REQUIRE_ROOT(); std::string output; @@ -89,6 +94,7 @@ TEST(monitor_cmd, with_callchain) { ASSERT_GT(output.size(), 0); } +// @CddTest = 6.1/C-0-2 TEST(monitor_cmd, with_callchain_fp) { TEST_REQUIRE_ROOT(); std::string output; @@ -96,6 +102,7 @@ TEST(monitor_cmd, with_callchain_fp) { ASSERT_GT(output.size(), 0); } +// @CddTest = 6.1/C-0-2 TEST(monitor_cmd, with_callchain_dwarf) { TEST_REQUIRE_ROOT(); std::string output; @@ -103,18 +110,21 @@ TEST(monitor_cmd, with_callchain_dwarf) { ASSERT_GT(output.size(), 0); } +// @CddTest = 6.1/C-0-2 TEST(monitor_cmd, frequency) { TEST_REQUIRE_ROOT(); std::string output; ASSERT_TRUE(RunMonitorCmd({"-a", "-f", "1"}, output)); } +// @CddTest = 6.1/C-0-2 TEST(monitor_cmd, count) { TEST_REQUIRE_ROOT(); std::string output; ASSERT_TRUE(RunMonitorCmd({"-a", "-c", "10000000"}, output)); } +// @CddTest = 6.1/C-0-2 TEST(monitor_cmd, cpu_percent) { TEST_REQUIRE_ROOT(); std::string output; @@ -124,6 +134,7 @@ TEST(monitor_cmd, cpu_percent) { ASSERT_FALSE(RunMonitorCmd({"-a", "--cpu-percent", "101"}, output)); } +// @CddTest = 6.1/C-0-2 TEST(monitor_cmd, record_filter_options) { TEST_REQUIRE_ROOT(); std::string output; |