summaryrefslogtreecommitdiff
path: root/simpleperf/cmd_stat_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'simpleperf/cmd_stat_test.cpp')
-rw-r--r--simpleperf/cmd_stat_test.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/simpleperf/cmd_stat_test.cpp b/simpleperf/cmd_stat_test.cpp
index 61b65a1e..c24ccbc9 100644
--- a/simpleperf/cmd_stat_test.cpp
+++ b/simpleperf/cmd_stat_test.cpp
@@ -100,7 +100,11 @@ TEST(stat_cmd, existing_threads) {
ASSERT_TRUE(StatCmd()->Run({"-t", tid_list, "sleep", "1"}));
}
-TEST(stat_cmd, no_monitored_threads) { ASSERT_FALSE(StatCmd()->Run({""})); }
+TEST(stat_cmd, no_monitored_threads) {
+ ScopedAppPackageName scoped_package_name("");
+ ASSERT_FALSE(StatCmd()->Run({}));
+ ASSERT_FALSE(StatCmd()->Run({""}));
+}
TEST(stat_cmd, group_option) {
ASSERT_TRUE(
@@ -162,11 +166,8 @@ TEST(stat_cmd, no_modifier_for_clock_events) {
}
TEST(stat_cmd, handle_SIGHUP) {
- if (!GetDefaultAppPackageName().empty()) {
- // See http://b/79495636.
- GTEST_LOG_(INFO) << "Omit this test in app's context.";
- return;
- }
+ // See http://b/79495636.
+ ScopedAppPackageName scoped_package_name("");
std::thread thread([]() {
sleep(1);
kill(getpid(), SIGHUP);