blob: 7ea22888f85aacb742218fb810280565246fb30a [file] [log] [blame]
Yiwei Zhangfdd7e782020-01-31 15:59:34 -08001/*
2 * Copyright 2020 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#undef LOG_TAG
18#define LOG_TAG "gpuservice_unittest"
19
Tim Van Pattena9ad69b2021-11-24 19:29:38 -070020#include <unistd.h>
Vova Sharaienko0906b2c2022-05-23 21:05:08 +000021#include <binder/ProcessState.h>
Yiwei Zhangfdd7e782020-01-31 15:59:34 -080022#include <cutils/properties.h>
23#include <gmock/gmock.h>
24#include <gpustats/GpuStats.h>
25#include <gtest/gtest.h>
Yiwei Zhangb59a1272020-02-04 14:58:01 -080026#include <stats_pull_atom_callback.h>
27#include <statslog.h>
Vova Sharaienko01eeab92022-06-08 22:55:02 +000028#include <utils/Looper.h>
Yiwei Zhangfdd7e782020-01-31 15:59:34 -080029#include <utils/String16.h>
30#include <utils/Vector.h>
31
Yiwei Zhangb59a1272020-02-04 14:58:01 -080032#include "TestableGpuStats.h"
33
Yiwei Zhangfdd7e782020-01-31 15:59:34 -080034namespace android {
35namespace {
36
37using testing::HasSubstr;
38
39// clang-format off
40#define BUILTIN_DRIVER_PKG_NAME "system"
41#define BUILTIN_DRIVER_VER_NAME "0"
42#define BUILTIN_DRIVER_VER_CODE 0
43#define BUILTIN_DRIVER_BUILD_TIME 123
44#define UPDATED_DRIVER_PKG_NAME "updated"
45#define UPDATED_DRIVER_VER_NAME "1"
46#define UPDATED_DRIVER_VER_CODE 1
47#define UPDATED_DRIVER_BUILD_TIME 234
48#define VULKAN_VERSION 345
Yiwei Zhangfdd7e782020-01-31 15:59:34 -080049#define APP_PKG_NAME_1 "testapp1"
50#define APP_PKG_NAME_2 "testapp2"
51#define DRIVER_LOADING_TIME_1 678
52#define DRIVER_LOADING_TIME_2 789
53#define DRIVER_LOADING_TIME_3 891
54
55enum InputCommand : int32_t {
56 DUMP_ALL = 0,
57 DUMP_GLOBAL = 1,
58 DUMP_APP = 2,
59 DUMP_ALL_THEN_CLEAR = 3,
60 DUMP_GLOBAL_THEN_CLEAR = 4,
61 DUMP_APP_THEN_CLEAR = 5,
62};
63// clang-format on
64
65class GpuStatsTest : public testing::Test {
Vova Sharaienko01eeab92022-06-08 22:55:02 +000066 sp<android::Looper> looper;
Yiwei Zhangfdd7e782020-01-31 15:59:34 -080067public:
Vova Sharaienko01eeab92022-06-08 22:55:02 +000068 GpuStatsTest() : looper(Looper::prepare(0 /* opts */)) {
Yiwei Zhangfdd7e782020-01-31 15:59:34 -080069 const ::testing::TestInfo* const test_info =
70 ::testing::UnitTest::GetInstance()->current_test_info();
71 ALOGD("**** Setting up for %s.%s\n", test_info->test_case_name(), test_info->name());
72 }
73
74 ~GpuStatsTest() {
75 const ::testing::TestInfo* const test_info =
76 ::testing::UnitTest::GetInstance()->current_test_info();
77 ALOGD("**** Tearing down after %s.%s\n", test_info->test_case_name(), test_info->name());
Vova Sharaienko01eeab92022-06-08 22:55:02 +000078
Vova Sharaienko8a7e7fc2022-07-01 04:53:47 +000079 // This is required for test due to GpuStats instance spawns binder transactions
80 // in its destructor. After the gtest destructor test exits immidiatelly.
81 // It results in binder thread not able to process above binder transactions and memory leak
82 // occures. Binder thread needs time to process callbacks transactions.
83 // It leads to GpuStats instance destructor needs to be called in advance.
84 mGpuStats.reset(nullptr);
Vova Sharaienko01eeab92022-06-08 22:55:02 +000085 // performs all pending callbacks until all data has been consumed
86 // gives time to process binder transactions by thread pool
87 looper->pollAll(1000);
Yiwei Zhangfdd7e782020-01-31 15:59:34 -080088 }
89
90 std::string inputCommand(InputCommand cmd);
91
92 void SetUp() override {
Yiwei Zhangcf673682020-02-04 19:22:51 -080093 mCpuVulkanVersion = property_get_int32("ro.cpuvulkan.version", 0);
94 mGlesVersion = property_get_int32("ro.opengles.version", 0);
Vova Sharaienko0906b2c2022-05-23 21:05:08 +000095
96 // start the thread pool
97 sp<ProcessState> ps(ProcessState::self());
98 ps->startThreadPool();
Yiwei Zhangfdd7e782020-01-31 15:59:34 -080099 }
100
101 std::unique_ptr<GpuStats> mGpuStats = std::make_unique<GpuStats>();
102 int32_t mCpuVulkanVersion = 0;
103 int32_t mGlesVersion = 0;
104};
105
106std::string GpuStatsTest::inputCommand(InputCommand cmd) {
107 std::string result;
108 Vector<String16> args;
109
110 switch (cmd) {
111 case InputCommand::DUMP_ALL:
112 break;
113 case InputCommand::DUMP_GLOBAL:
114 args.push_back(String16("--global"));
115 break;
116 case InputCommand::DUMP_APP:
117 args.push_back(String16("--app"));
118 break;
119 case InputCommand::DUMP_ALL_THEN_CLEAR:
120 args.push_back(String16("--clear"));
121 break;
122 case InputCommand::DUMP_GLOBAL_THEN_CLEAR:
123 args.push_back(String16("--global"));
124 args.push_back(String16("--clear"));
125 break;
126 case InputCommand::DUMP_APP_THEN_CLEAR:
127 args.push_back(String16("--app"));
128 args.push_back(String16("--clear"));
129 break;
130 }
131
132 mGpuStats->dump(args, &result);
133 return result;
134}
135
136TEST_F(GpuStatsTest, statsEmptyByDefault) {
137 ASSERT_TRUE(inputCommand(InputCommand::DUMP_ALL).empty());
138}
139
140TEST_F(GpuStatsTest, canInsertBuiltinDriverStats) {
141 mGpuStats->insertDriverStats(BUILTIN_DRIVER_PKG_NAME, BUILTIN_DRIVER_VER_NAME,
142 BUILTIN_DRIVER_VER_CODE, BUILTIN_DRIVER_BUILD_TIME, APP_PKG_NAME_1,
143 VULKAN_VERSION, GpuStatsInfo::Driver::GL, true,
144 DRIVER_LOADING_TIME_1);
145
146 std::string expectedResult = "driverPackageName = " + std::string(BUILTIN_DRIVER_PKG_NAME);
147 EXPECT_THAT(inputCommand(InputCommand::DUMP_GLOBAL), HasSubstr(expectedResult));
148 expectedResult = "driverVersionName = " + std::string(BUILTIN_DRIVER_VER_NAME);
149 EXPECT_THAT(inputCommand(InputCommand::DUMP_GLOBAL), HasSubstr(expectedResult));
150 expectedResult = "driverVersionCode = " + std::to_string(BUILTIN_DRIVER_VER_CODE);
151 EXPECT_THAT(inputCommand(InputCommand::DUMP_GLOBAL), HasSubstr(expectedResult));
152 expectedResult = "driverBuildTime = " + std::to_string(BUILTIN_DRIVER_BUILD_TIME);
153 EXPECT_THAT(inputCommand(InputCommand::DUMP_GLOBAL), HasSubstr(expectedResult));
154 EXPECT_THAT(inputCommand(InputCommand::DUMP_GLOBAL), HasSubstr("glLoadingCount = 1"));
155 EXPECT_THAT(inputCommand(InputCommand::DUMP_GLOBAL), HasSubstr("glLoadingFailureCount = 0"));
156 expectedResult = "appPackageName = " + std::string(APP_PKG_NAME_1);
157 EXPECT_THAT(inputCommand(InputCommand::DUMP_APP), HasSubstr(expectedResult));
158 expectedResult = "driverVersionCode = " + std::to_string(BUILTIN_DRIVER_VER_CODE);
159 EXPECT_THAT(inputCommand(InputCommand::DUMP_APP), HasSubstr(expectedResult));
160 expectedResult = "glDriverLoadingTime: " + std::to_string(DRIVER_LOADING_TIME_1);
161 EXPECT_THAT(inputCommand(InputCommand::DUMP_APP), HasSubstr(expectedResult));
162}
163
164TEST_F(GpuStatsTest, canInsertUpdatedDriverStats) {
165 mGpuStats->insertDriverStats(UPDATED_DRIVER_PKG_NAME, UPDATED_DRIVER_VER_NAME,
166 UPDATED_DRIVER_VER_CODE, UPDATED_DRIVER_BUILD_TIME, APP_PKG_NAME_2,
167 VULKAN_VERSION, GpuStatsInfo::Driver::VULKAN_UPDATED, false,
168 DRIVER_LOADING_TIME_2);
169
170 std::string expectedResult = "driverPackageName = " + std::string(UPDATED_DRIVER_PKG_NAME);
171 EXPECT_THAT(inputCommand(InputCommand::DUMP_GLOBAL), HasSubstr(expectedResult));
172 expectedResult = "driverVersionName = " + std::string(UPDATED_DRIVER_VER_NAME);
173 EXPECT_THAT(inputCommand(InputCommand::DUMP_GLOBAL), HasSubstr(expectedResult));
174 expectedResult = "driverVersionCode = " + std::to_string(UPDATED_DRIVER_VER_CODE);
175 EXPECT_THAT(inputCommand(InputCommand::DUMP_GLOBAL), HasSubstr(expectedResult));
176 expectedResult = "driverBuildTime = " + std::to_string(UPDATED_DRIVER_BUILD_TIME);
177 EXPECT_THAT(inputCommand(InputCommand::DUMP_GLOBAL), HasSubstr(expectedResult));
178 EXPECT_THAT(inputCommand(InputCommand::DUMP_GLOBAL), HasSubstr("vkLoadingCount = 1"));
179 EXPECT_THAT(inputCommand(InputCommand::DUMP_GLOBAL), HasSubstr("vkLoadingFailureCount = 1"));
180 expectedResult = "appPackageName = " + std::string(APP_PKG_NAME_2);
181 EXPECT_THAT(inputCommand(InputCommand::DUMP_APP), HasSubstr(expectedResult));
182 expectedResult = "driverVersionCode = " + std::to_string(UPDATED_DRIVER_VER_CODE);
183 EXPECT_THAT(inputCommand(InputCommand::DUMP_APP), HasSubstr(expectedResult));
184 expectedResult = "vkDriverLoadingTime: " + std::to_string(DRIVER_LOADING_TIME_2);
185 EXPECT_THAT(inputCommand(InputCommand::DUMP_APP), HasSubstr(expectedResult));
186}
187
188TEST_F(GpuStatsTest, canInsertAngleDriverStats) {
189 mGpuStats->insertDriverStats(UPDATED_DRIVER_PKG_NAME, UPDATED_DRIVER_VER_NAME,
190 UPDATED_DRIVER_VER_CODE, UPDATED_DRIVER_BUILD_TIME, APP_PKG_NAME_2,
191 VULKAN_VERSION, GpuStatsInfo::Driver::ANGLE, true,
192 DRIVER_LOADING_TIME_3);
193
194 EXPECT_THAT(inputCommand(InputCommand::DUMP_GLOBAL), HasSubstr("angleLoadingCount = 1"));
195 EXPECT_THAT(inputCommand(InputCommand::DUMP_GLOBAL), HasSubstr("angleLoadingFailureCount = 0"));
196 std::string expectedResult = "angleDriverLoadingTime: " + std::to_string(DRIVER_LOADING_TIME_3);
197 EXPECT_THAT(inputCommand(InputCommand::DUMP_APP), HasSubstr(expectedResult));
198}
199
200TEST_F(GpuStatsTest, canDump3dApiVersion) {
201 mGpuStats->insertDriverStats(BUILTIN_DRIVER_PKG_NAME, BUILTIN_DRIVER_VER_NAME,
202 BUILTIN_DRIVER_VER_CODE, BUILTIN_DRIVER_BUILD_TIME, APP_PKG_NAME_1,
203 VULKAN_VERSION, GpuStatsInfo::Driver::GL, true,
204 DRIVER_LOADING_TIME_1);
205
206 std::string expectedResult = "vulkanVersion = " + std::to_string(VULKAN_VERSION);
207 EXPECT_THAT(inputCommand(InputCommand::DUMP_GLOBAL), HasSubstr(expectedResult));
208 expectedResult = "cpuVulkanVersion = " + std::to_string(mCpuVulkanVersion);
209 EXPECT_THAT(inputCommand(InputCommand::DUMP_GLOBAL), HasSubstr(expectedResult));
210 expectedResult = "glesVersion = " + std::to_string(mGlesVersion);
211 EXPECT_THAT(inputCommand(InputCommand::DUMP_GLOBAL), HasSubstr(expectedResult));
212}
213
214TEST_F(GpuStatsTest, canNotInsertTargetStatsBeforeProperSetup) {
215 mGpuStats->insertTargetStats(APP_PKG_NAME_1, BUILTIN_DRIVER_VER_CODE,
216 GpuStatsInfo::Stats::CPU_VULKAN_IN_USE, 0);
217 mGpuStats->insertTargetStats(APP_PKG_NAME_1, BUILTIN_DRIVER_VER_CODE,
218 GpuStatsInfo::Stats::FALSE_PREROTATION, 0);
219 mGpuStats->insertTargetStats(APP_PKG_NAME_1, BUILTIN_DRIVER_VER_CODE,
220 GpuStatsInfo::Stats::GLES_1_IN_USE, 0);
221
222 EXPECT_TRUE(inputCommand(InputCommand::DUMP_APP).empty());
223}
224
225TEST_F(GpuStatsTest, canInsertTargetStatsAfterProperSetup) {
226 mGpuStats->insertDriverStats(BUILTIN_DRIVER_PKG_NAME, BUILTIN_DRIVER_VER_NAME,
227 BUILTIN_DRIVER_VER_CODE, BUILTIN_DRIVER_BUILD_TIME, APP_PKG_NAME_1,
228 VULKAN_VERSION, GpuStatsInfo::Driver::GL, true,
229 DRIVER_LOADING_TIME_1);
230 mGpuStats->insertTargetStats(APP_PKG_NAME_1, BUILTIN_DRIVER_VER_CODE,
231 GpuStatsInfo::Stats::CPU_VULKAN_IN_USE, 0);
232 mGpuStats->insertTargetStats(APP_PKG_NAME_1, BUILTIN_DRIVER_VER_CODE,
233 GpuStatsInfo::Stats::FALSE_PREROTATION, 0);
234 mGpuStats->insertTargetStats(APP_PKG_NAME_1, BUILTIN_DRIVER_VER_CODE,
235 GpuStatsInfo::Stats::GLES_1_IN_USE, 0);
236
237 EXPECT_THAT(inputCommand(InputCommand::DUMP_APP), HasSubstr("cpuVulkanInUse = 1"));
238 EXPECT_THAT(inputCommand(InputCommand::DUMP_APP), HasSubstr("falsePrerotation = 1"));
239 EXPECT_THAT(inputCommand(InputCommand::DUMP_APP), HasSubstr("gles1InUse = 1"));
240}
241
Tim Van Pattena9ad69b2021-11-24 19:29:38 -0700242// Verify we always have the most recently used apps in mAppStats, even when we fill it.
243TEST_F(GpuStatsTest, canInsertMoreThanMaxNumAppRecords) {
244 constexpr int kNumExtraApps = 15;
245 static_assert(kNumExtraApps > GpuStats::APP_RECORD_HEADROOM);
246
247 // Insert stats for GpuStats::MAX_NUM_APP_RECORDS so we fill it up.
248 for (int i = 0; i < GpuStats::MAX_NUM_APP_RECORDS + kNumExtraApps; ++i) {
249 std::stringstream nameStream;
250 nameStream << "testapp" << "_" << i;
251 std::string fullPkgName = nameStream.str();
252
253 mGpuStats->insertDriverStats(BUILTIN_DRIVER_PKG_NAME, BUILTIN_DRIVER_VER_NAME,
254 BUILTIN_DRIVER_VER_CODE, BUILTIN_DRIVER_BUILD_TIME,
255 fullPkgName, VULKAN_VERSION, GpuStatsInfo::Driver::GL, true,
256 DRIVER_LOADING_TIME_1);
257 mGpuStats->insertTargetStats(fullPkgName, BUILTIN_DRIVER_VER_CODE,
258 GpuStatsInfo::Stats::CPU_VULKAN_IN_USE, 0);
259 mGpuStats->insertTargetStats(fullPkgName, BUILTIN_DRIVER_VER_CODE,
260 GpuStatsInfo::Stats::FALSE_PREROTATION, 0);
261 mGpuStats->insertTargetStats(fullPkgName, BUILTIN_DRIVER_VER_CODE,
262 GpuStatsInfo::Stats::GLES_1_IN_USE, 0);
263
264 EXPECT_THAT(inputCommand(InputCommand::DUMP_APP), HasSubstr(fullPkgName.c_str()));
265 EXPECT_THAT(inputCommand(InputCommand::DUMP_APP), HasSubstr("cpuVulkanInUse = 1"));
266 EXPECT_THAT(inputCommand(InputCommand::DUMP_APP), HasSubstr("falsePrerotation = 1"));
267 EXPECT_THAT(inputCommand(InputCommand::DUMP_APP), HasSubstr("gles1InUse = 1"));
268 }
269
270 // mAppStats purges GpuStats::APP_RECORD_HEADROOM apps removed everytime it's filled up.
271 int numPurges = kNumExtraApps / GpuStats::APP_RECORD_HEADROOM;
272 numPurges += (kNumExtraApps % GpuStats::APP_RECORD_HEADROOM) == 0 ? 0 : 1;
273
274 // Verify the remaining apps are present.
275 for (int i = numPurges * GpuStats::APP_RECORD_HEADROOM;
276 i < GpuStats::MAX_NUM_APP_RECORDS + kNumExtraApps;
277 ++i) {
278 std::stringstream nameStream;
279 // Add a newline to search for the exact package name.
280 nameStream << "testapp" << "_" << i << "\n";
281 std::string fullPkgName = nameStream.str();
282
283 EXPECT_THAT(inputCommand(InputCommand::DUMP_APP), HasSubstr(fullPkgName.c_str()));
284 }
285}
286
Yiwei Zhangfdd7e782020-01-31 15:59:34 -0800287TEST_F(GpuStatsTest, canDumpAllBeforeClearAll) {
288 mGpuStats->insertDriverStats(BUILTIN_DRIVER_PKG_NAME, BUILTIN_DRIVER_VER_NAME,
289 BUILTIN_DRIVER_VER_CODE, BUILTIN_DRIVER_BUILD_TIME, APP_PKG_NAME_1,
290 VULKAN_VERSION, GpuStatsInfo::Driver::GL, true,
291 DRIVER_LOADING_TIME_1);
292
293 EXPECT_FALSE(inputCommand(InputCommand::DUMP_ALL_THEN_CLEAR).empty());
294 EXPECT_TRUE(inputCommand(InputCommand::DUMP_ALL).empty());
295}
296
297TEST_F(GpuStatsTest, canDumpGlobalBeforeClearGlobal) {
298 mGpuStats->insertDriverStats(BUILTIN_DRIVER_PKG_NAME, BUILTIN_DRIVER_VER_NAME,
299 BUILTIN_DRIVER_VER_CODE, BUILTIN_DRIVER_BUILD_TIME, APP_PKG_NAME_1,
300 VULKAN_VERSION, GpuStatsInfo::Driver::GL, true,
301 DRIVER_LOADING_TIME_1);
302
303 EXPECT_FALSE(inputCommand(InputCommand::DUMP_GLOBAL_THEN_CLEAR).empty());
304 EXPECT_TRUE(inputCommand(InputCommand::DUMP_GLOBAL).empty());
305 EXPECT_FALSE(inputCommand(InputCommand::DUMP_APP).empty());
306}
307
308TEST_F(GpuStatsTest, canDumpAppBeforeClearApp) {
309 mGpuStats->insertDriverStats(BUILTIN_DRIVER_PKG_NAME, BUILTIN_DRIVER_VER_NAME,
310 BUILTIN_DRIVER_VER_CODE, BUILTIN_DRIVER_BUILD_TIME, APP_PKG_NAME_1,
311 VULKAN_VERSION, GpuStatsInfo::Driver::GL, true,
312 DRIVER_LOADING_TIME_1);
313
314 EXPECT_FALSE(inputCommand(InputCommand::DUMP_APP_THEN_CLEAR).empty());
315 EXPECT_TRUE(inputCommand(InputCommand::DUMP_APP).empty());
316 EXPECT_FALSE(inputCommand(InputCommand::DUMP_GLOBAL).empty());
317}
318
Yiwei Zhangb59a1272020-02-04 14:58:01 -0800319TEST_F(GpuStatsTest, skipPullInvalidAtom) {
320 TestableGpuStats testableGpuStats(mGpuStats.get());
321 mGpuStats->insertDriverStats(BUILTIN_DRIVER_PKG_NAME, BUILTIN_DRIVER_VER_NAME,
322 BUILTIN_DRIVER_VER_CODE, BUILTIN_DRIVER_BUILD_TIME, APP_PKG_NAME_1,
323 VULKAN_VERSION, GpuStatsInfo::Driver::GL, true,
324 DRIVER_LOADING_TIME_1);
325
326 EXPECT_FALSE(inputCommand(InputCommand::DUMP_GLOBAL).empty());
327 EXPECT_FALSE(inputCommand(InputCommand::DUMP_APP).empty());
328
329 EXPECT_TRUE(testableGpuStats.makePullAtomCallback(-1) == AStatsManager_PULL_SKIP);
330
331 EXPECT_FALSE(inputCommand(InputCommand::DUMP_GLOBAL).empty());
332 EXPECT_FALSE(inputCommand(InputCommand::DUMP_APP).empty());
333}
334
335TEST_F(GpuStatsTest, canPullGlobalAtom) {
336 TestableGpuStats testableGpuStats(mGpuStats.get());
337 mGpuStats->insertDriverStats(BUILTIN_DRIVER_PKG_NAME, BUILTIN_DRIVER_VER_NAME,
338 BUILTIN_DRIVER_VER_CODE, BUILTIN_DRIVER_BUILD_TIME, APP_PKG_NAME_1,
339 VULKAN_VERSION, GpuStatsInfo::Driver::GL, true,
340 DRIVER_LOADING_TIME_1);
341
342 EXPECT_FALSE(inputCommand(InputCommand::DUMP_GLOBAL).empty());
343 EXPECT_FALSE(inputCommand(InputCommand::DUMP_APP).empty());
344
345 EXPECT_TRUE(testableGpuStats.makePullAtomCallback(android::util::GPU_STATS_GLOBAL_INFO) ==
346 AStatsManager_PULL_SUCCESS);
347
348 EXPECT_TRUE(inputCommand(InputCommand::DUMP_GLOBAL).empty());
349 EXPECT_FALSE(inputCommand(InputCommand::DUMP_APP).empty());
350}
351
Yiwei Zhang29f85932020-02-04 17:14:54 -0800352TEST_F(GpuStatsTest, canPullAppAtom) {
353 TestableGpuStats testableGpuStats(mGpuStats.get());
354 mGpuStats->insertDriverStats(BUILTIN_DRIVER_PKG_NAME, BUILTIN_DRIVER_VER_NAME,
355 BUILTIN_DRIVER_VER_CODE, BUILTIN_DRIVER_BUILD_TIME, APP_PKG_NAME_1,
356 VULKAN_VERSION, GpuStatsInfo::Driver::GL, true,
357 DRIVER_LOADING_TIME_1);
358
359 EXPECT_FALSE(inputCommand(InputCommand::DUMP_GLOBAL).empty());
360 EXPECT_FALSE(inputCommand(InputCommand::DUMP_APP).empty());
361
362 EXPECT_TRUE(testableGpuStats.makePullAtomCallback(android::util::GPU_STATS_APP_INFO) ==
363 AStatsManager_PULL_SUCCESS);
364
365 EXPECT_FALSE(inputCommand(InputCommand::DUMP_GLOBAL).empty());
366 EXPECT_TRUE(inputCommand(InputCommand::DUMP_APP).empty());
367}
368
Yiwei Zhangfdd7e782020-01-31 15:59:34 -0800369} // namespace
370} // namespace android