1 #include <gtest/gtest.h>
2
3 #include <stdint.h>
4 #include <string.h>
5
6 #include <string>
7
8 #define CPUINFO_HARDWARE_VALUE_MAX 64
9 #define CPUINFO_ARM_CHIPSET_NAME_MAX 48
10
11 extern "C" void cpuinfo_arm_android_parse_proc_cpuinfo_hardware(
12 const char hardware[CPUINFO_HARDWARE_VALUE_MAX],
13 uint32_t cores,
14 uint32_t max_cpu_freq_max,
15 bool is_tegra,
16 char chipset_name[CPUINFO_ARM_CHIPSET_NAME_MAX]);
17
parse_proc_cpuinfo_hardware(std::string hardware,uint32_t cores=1,uint32_t max_cpu_freq_max=0)18 inline std::string parse_proc_cpuinfo_hardware(
19 std::string hardware,
20 uint32_t cores=1,
21 uint32_t max_cpu_freq_max=0)
22 {
23 char hardware_buffer[CPUINFO_HARDWARE_VALUE_MAX];
24 strncpy(hardware_buffer, hardware.c_str(), CPUINFO_HARDWARE_VALUE_MAX);
25 char chipset_name[CPUINFO_ARM_CHIPSET_NAME_MAX];
26 cpuinfo_arm_android_parse_proc_cpuinfo_hardware(
27 hardware_buffer, cores, max_cpu_freq_max, false, chipset_name);
28 return std::string(chipset_name, strnlen(chipset_name, CPUINFO_ARM_CHIPSET_NAME_MAX));
29 }
30
parse_proc_cpuinfo_hardware_tegra(std::string hardware,uint32_t cores=1,uint32_t max_cpu_freq_max=0)31 inline std::string parse_proc_cpuinfo_hardware_tegra(
32 std::string hardware,
33 uint32_t cores=1,
34 uint32_t max_cpu_freq_max=0)
35 {
36 char hardware_buffer[CPUINFO_HARDWARE_VALUE_MAX];
37 strncpy(hardware_buffer, hardware.c_str(), CPUINFO_HARDWARE_VALUE_MAX);
38 char chipset_name[CPUINFO_ARM_CHIPSET_NAME_MAX];
39 cpuinfo_arm_android_parse_proc_cpuinfo_hardware(
40 hardware_buffer, cores, max_cpu_freq_max, true, chipset_name);
41 return std::string(chipset_name, strnlen(chipset_name, CPUINFO_ARM_CHIPSET_NAME_MAX));
42 }
43
TEST(PROC_CPUINFO_HARDWARE,qualcomm_msm)44 TEST(PROC_CPUINFO_HARDWARE, qualcomm_msm) {
45 EXPECT_EQ("Qualcomm MSM7225AB",
46 parse_proc_cpuinfo_hardware("LG MSM7225AB"));
47 EXPECT_EQ("Qualcomm MSM7225AB",
48 parse_proc_cpuinfo_hardware("LG MSM7225AB V1"));
49 EXPECT_EQ("Qualcomm MSM7625A",
50 parse_proc_cpuinfo_hardware("QCT MSM7625a FFA"));
51 EXPECT_EQ("Qualcomm MSM8208",
52 parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8208"));
53 EXPECT_EQ("Qualcomm MSM8209",
54 parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8209"));
55 EXPECT_EQ("Qualcomm MSM8210",
56 parse_proc_cpuinfo_hardware("Qualcomm MSM8210"));
57 EXPECT_EQ("Qualcomm MSM8212",
58 parse_proc_cpuinfo_hardware("Qualcomm MSM 8212 (Flattened Device Tree)"));
59 EXPECT_EQ("Qualcomm MSM8212",
60 parse_proc_cpuinfo_hardware("Qualcomm MSM8212"));
61 EXPECT_EQ("Qualcomm MSM8225",
62 parse_proc_cpuinfo_hardware("QCT MSM8225 SURF"));
63 EXPECT_EQ("Qualcomm MSM8226",
64 parse_proc_cpuinfo_hardware("Qualcomm MSM 8226 (Flattened Device Tree)"));
65 EXPECT_EQ("Qualcomm MSM8226",
66 parse_proc_cpuinfo_hardware("Qualcomm MSM8226"));
67 EXPECT_EQ("Qualcomm MSM8228",
68 parse_proc_cpuinfo_hardware("Qualcomm MSM8228"));
69 EXPECT_EQ("Qualcomm MSM8230",
70 parse_proc_cpuinfo_hardware("LGE MSM8230 L9II"));
71 EXPECT_EQ("Qualcomm MSM8239",
72 parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8239"));
73 EXPECT_EQ("Qualcomm MSM8609",
74 parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8609"));
75 EXPECT_EQ("Qualcomm MSM8610",
76 parse_proc_cpuinfo_hardware("Qualcomm MSM 8610 (Flattened Device Tree)", 2));
77 EXPECT_EQ("Qualcomm MSM8610",
78 parse_proc_cpuinfo_hardware("Qualcomm MSM8610", 2));
79 #if CPUINFO_ARCH_ARM
80 EXPECT_EQ("Qualcomm MSM8612",
81 parse_proc_cpuinfo_hardware("Qualcomm MSM 8610 (Flattened Device Tree)", 4));
82 EXPECT_EQ("Qualcomm MSM8612",
83 parse_proc_cpuinfo_hardware("Qualcomm MSM 8612 (Flattened Device Tree)"));
84 #endif /* CPUINFO_ARCH_ARM */
85 EXPECT_EQ("Qualcomm MSM8625",
86 parse_proc_cpuinfo_hardware("LG MSM8625 V7"));
87 EXPECT_EQ("Qualcomm MSM8625",
88 parse_proc_cpuinfo_hardware("QCT MSM8625 FFA"));
89 EXPECT_EQ("Qualcomm MSM8625",
90 parse_proc_cpuinfo_hardware("QCT MSM8625 SURF"));
91 EXPECT_EQ("Qualcomm MSM8625Q",
92 parse_proc_cpuinfo_hardware("QRD MSM8625Q SKUD"));
93 EXPECT_EQ("Qualcomm MSM8626",
94 parse_proc_cpuinfo_hardware("Qualcomm MSM8626"));
95 EXPECT_EQ("Qualcomm MSM8627",
96 parse_proc_cpuinfo_hardware("QCT MSM8627 MTP"));
97 EXPECT_EQ("Qualcomm MSM8628",
98 parse_proc_cpuinfo_hardware("Qualcomm MSM8628"));
99 EXPECT_EQ("Qualcomm MSM8909",
100 parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8909"));
101 EXPECT_EQ("Qualcomm MSM8916",
102 parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8216"));
103 EXPECT_EQ("Qualcomm MSM8916",
104 parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8916", 4));
105 EXPECT_EQ("Qualcomm MSM8916",
106 parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8916MSM8916", 4));
107 EXPECT_EQ("Qualcomm MSM8917",
108 parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8917", 4));
109 EXPECT_EQ("Qualcomm MSM8920",
110 parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8920"));
111 EXPECT_EQ("Qualcomm MSM8926",
112 parse_proc_cpuinfo_hardware("Qualcomm MSM 8926 (Flattened Device Tree)"));
113 EXPECT_EQ("Qualcomm MSM8926",
114 parse_proc_cpuinfo_hardware("Qualcomm MSM8926"));
115 EXPECT_EQ("Qualcomm MSM8928",
116 parse_proc_cpuinfo_hardware("Qualcomm MSM8928"));
117 EXPECT_EQ("Qualcomm MSM8928",
118 parse_proc_cpuinfo_hardware("Qualcomm msm 8928"));
119 EXPECT_EQ("Qualcomm MSM8929",
120 parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8929"));
121 EXPECT_EQ("Qualcomm MSM8930",
122 parse_proc_cpuinfo_hardware("LGE MSM8930 FX3"));
123 EXPECT_EQ("Qualcomm MSM8930",
124 parse_proc_cpuinfo_hardware("QCT MSM8930 CDP"));
125 EXPECT_EQ("Qualcomm MSM8930",
126 parse_proc_cpuinfo_hardware("QCT MSM8930 MTP"));
127 EXPECT_EQ("Qualcomm MSM8937",
128 parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8937", 8));
129 EXPECT_EQ("Qualcomm MSM8939",
130 parse_proc_cpuinfo_hardware("Qualcomm MSM 8939 HUAWEI ALE_L04"));
131 EXPECT_EQ("Qualcomm MSM8939",
132 parse_proc_cpuinfo_hardware("Qualcomm MSM 8939 HUAWEI ATH-UL01"));
133 EXPECT_EQ("Qualcomm MSM8939",
134 parse_proc_cpuinfo_hardware("Qualcomm MSM 8939 HUAWEI KII-L05"));
135 EXPECT_EQ("Qualcomm MSM8939",
136 parse_proc_cpuinfo_hardware("Qualcomm MSM 8939 HUAWEI KIW-L21"));
137 EXPECT_EQ("Qualcomm MSM8939",
138 parse_proc_cpuinfo_hardware("Qualcomm MSM 8939 HUAWEI KIW-L22"));
139 EXPECT_EQ("Qualcomm MSM8939",
140 parse_proc_cpuinfo_hardware("Qualcomm MSM 8939 HUAWEI KIW-L23"));
141 EXPECT_EQ("Qualcomm MSM8939",
142 parse_proc_cpuinfo_hardware("Qualcomm MSM 8939 HUAWEI KIW-L24"));
143 EXPECT_EQ("Qualcomm MSM8939",
144 parse_proc_cpuinfo_hardware("Qualcomm MSM 8939 HUAWEI KIW-L33"));
145 EXPECT_EQ("Qualcomm MSM8939",
146 parse_proc_cpuinfo_hardware("Qualcomm MSM 8939 HUAWEI RIO-L01_VB"));
147 EXPECT_EQ("Qualcomm MSM8939",
148 parse_proc_cpuinfo_hardware("Qualcomm MSM 8939 HUAWEI RIO-L02"));
149 EXPECT_EQ("Qualcomm MSM8939",
150 parse_proc_cpuinfo_hardware("Qualcomm MSM 8939 HUAWEI RIO-L03"));
151 EXPECT_EQ("Qualcomm MSM8939",
152 parse_proc_cpuinfo_hardware("Qualcomm MSM 8939 HUAWEI TEXAS-A1"));
153 EXPECT_EQ("Qualcomm MSM8939",
154 parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8939"));
155 EXPECT_EQ("Qualcomm MSM8939",
156 parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8939_BC"));
157 EXPECT_EQ("Qualcomm MSM8940",
158 parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8940"));
159 EXPECT_EQ("Qualcomm MSM8952",
160 parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8952"));
161 EXPECT_EQ("Qualcomm MSM8952",
162 parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8952MSM8952"));
163 EXPECT_EQ("Qualcomm MSM8952",
164 parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc. MSM8952 QRD SKUM"));
165 EXPECT_EQ("Qualcomm MSM8953",
166 parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8953"));
167 EXPECT_EQ("Qualcomm MSM8953PRO",
168 parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8953Pro"));
169 EXPECT_EQ("Qualcomm MSM8956",
170 parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8956"));
171 EXPECT_EQ("Qualcomm MSM8960",
172 parse_proc_cpuinfo_hardware("LGE MSM8960 D1L KR", 2));
173 EXPECT_EQ("Qualcomm MSM8960",
174 parse_proc_cpuinfo_hardware("LGE MSM8960 FX1", 2));
175 EXPECT_EQ("Qualcomm MSM8960",
176 parse_proc_cpuinfo_hardware("LGE MSM8960 Lx", 2));
177 EXPECT_EQ("Qualcomm MSM8960",
178 parse_proc_cpuinfo_hardware("LGE MSM8960 VU2", 2));
179 EXPECT_EQ("Qualcomm MSM8960",
180 parse_proc_cpuinfo_hardware("QCT MSM8960 CDP", 2));
181 EXPECT_EQ("Qualcomm MSM8960",
182 parse_proc_cpuinfo_hardware("Qualcomm MSM8960", 2));
183 EXPECT_EQ("Qualcomm MSM8960DT",
184 parse_proc_cpuinfo_hardware("msm8960dt"));
185 EXPECT_EQ("Qualcomm MSM8974",
186 parse_proc_cpuinfo_hardware("Qualcomm MSM 8974 (Flattened Device Tree)"));
187 EXPECT_EQ("Qualcomm MSM8974",
188 parse_proc_cpuinfo_hardware("Qualcomm MSM 8974 HAMMERHEAD (Flattened Device Tree)"));
189 EXPECT_EQ("Qualcomm MSM8974",
190 parse_proc_cpuinfo_hardware("Qualcomm MSM8974"));
191 EXPECT_EQ("Qualcomm MSM8974PRO-AA",
192 parse_proc_cpuinfo_hardware("Qualcomm MSM8974PRO-AA"));
193 EXPECT_EQ("Qualcomm MSM8974PRO-AB",
194 parse_proc_cpuinfo_hardware("Qualcomm MSM8974PRO-AB"));
195 EXPECT_EQ("Qualcomm MSM8974PRO-AC",
196 parse_proc_cpuinfo_hardware("Qualcomm MSM8974PRO-AC"));
197 EXPECT_EQ("Qualcomm MSM8976",
198 parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8976"));
199 EXPECT_EQ("Qualcomm MSM8976PRO",
200 parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8976SG"));
201 EXPECT_EQ("Qualcomm MSM8992",
202 parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8992"));
203 EXPECT_EQ("Qualcomm MSM8994",
204 parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8994"));
205 EXPECT_EQ("Qualcomm MSM8994V",
206 parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc. MSM8994v2.1 MTP"));
207 EXPECT_EQ("Qualcomm MSM8996",
208 parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8996", 4));
209 EXPECT_EQ("Qualcomm MSM8996PRO-AB",
210 parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8996pro", 4, 1593600 /* LITTLE core */));
211 EXPECT_EQ("Qualcomm MSM8996PRO-AB",
212 parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8996pro", 4, 2150400 /* big core */));
213 EXPECT_EQ("Qualcomm MSM8996PRO-AC",
214 parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8996pro", 4, 2188800 /* LITTLE core */));
215 EXPECT_EQ("Qualcomm MSM8996PRO-AC",
216 parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8996pro", 4, 2342400 /* big core */));
217 EXPECT_EQ("Qualcomm MSM8998",
218 parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8998"));
219 }
220
TEST(PROC_CPUINFO_HARDWARE,qualcomm_apq)221 TEST(PROC_CPUINFO_HARDWARE, qualcomm_apq) {
222 EXPECT_EQ("Qualcomm APQ8009",
223 parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc APQ8009"));
224 EXPECT_EQ("Qualcomm APQ8016",
225 parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc APQ8016"));
226 EXPECT_EQ("Qualcomm APQ8016",
227 parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc APQ8016APQ8016"));
228 EXPECT_EQ("Qualcomm APQ8017",
229 parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc APQ8017"));
230 EXPECT_EQ("Qualcomm APQ8026",
231 parse_proc_cpuinfo_hardware("Qualcomm APQ8026"));
232 EXPECT_EQ("Qualcomm APQ8028",
233 parse_proc_cpuinfo_hardware("Qualcomm APQ8028"));
234 EXPECT_EQ("Qualcomm APQ8039",
235 parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc APQ8039"));
236 EXPECT_EQ("Qualcomm APQ8053",
237 parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc APQ8053"));
238 EXPECT_EQ("Qualcomm APQ8064",
239 parse_proc_cpuinfo_hardware("PANTECH APQ8064 EF48S"));
240 EXPECT_EQ("Qualcomm APQ8064",
241 parse_proc_cpuinfo_hardware("PANTECH APQ8064 EF49K"));
242 EXPECT_EQ("Qualcomm APQ8064",
243 parse_proc_cpuinfo_hardware("PANTECH APQ8064 EF50L"));
244 EXPECT_EQ("Qualcomm APQ8064",
245 parse_proc_cpuinfo_hardware("PANTECH APQ8064 EF51K"));
246 EXPECT_EQ("Qualcomm APQ8064",
247 parse_proc_cpuinfo_hardware("PANTECH APQ8064 EF51L"));
248 EXPECT_EQ("Qualcomm APQ8064",
249 parse_proc_cpuinfo_hardware("PANTECH APQ8064 EF51S"));
250 EXPECT_EQ("Qualcomm APQ8064",
251 parse_proc_cpuinfo_hardware("PANTECH APQ8064 EF52K"));
252 EXPECT_EQ("Qualcomm APQ8064",
253 parse_proc_cpuinfo_hardware("PANTECH APQ8064 EF52L"));
254 EXPECT_EQ("Qualcomm APQ8064",
255 parse_proc_cpuinfo_hardware("PANTECH APQ8064 EF52S"));
256 EXPECT_EQ("Qualcomm APQ8064",
257 parse_proc_cpuinfo_hardware("QCT APQ8064 AWIFI"));
258 EXPECT_EQ("Qualcomm APQ8064",
259 parse_proc_cpuinfo_hardware("QCT APQ8064 DEB"));
260 EXPECT_EQ("Qualcomm APQ8064",
261 parse_proc_cpuinfo_hardware("QCT APQ8064 DUMA"));
262 EXPECT_EQ("Qualcomm APQ8064",
263 parse_proc_cpuinfo_hardware("QCT APQ8064 FLO"));
264 EXPECT_EQ("Qualcomm APQ8064",
265 parse_proc_cpuinfo_hardware("QCT APQ8064 LEOPARDCAT"));
266 EXPECT_EQ("Qualcomm APQ8064",
267 parse_proc_cpuinfo_hardware("QCT APQ8064 MAKO"));
268 EXPECT_EQ("Qualcomm APQ8064",
269 parse_proc_cpuinfo_hardware("QCT APQ8064 MTP"));
270 EXPECT_EQ("Qualcomm APQ8074PRO-AB",
271 parse_proc_cpuinfo_hardware("Qualcomm APQ8074PRO-AB"));
272 EXPECT_EQ("Qualcomm APQ8076",
273 parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc APQ8076"));
274 EXPECT_EQ("Qualcomm APQ8084",
275 parse_proc_cpuinfo_hardware("Qualcomm APQ 8084 (Flattened Device Tree)"));
276 EXPECT_EQ("Qualcomm APQ8084",
277 parse_proc_cpuinfo_hardware("Qualcomm APQ8084"));
278 EXPECT_EQ("Qualcomm APQ8094",
279 parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc APQ8094"));
280 EXPECT_EQ("Qualcomm APQ8096",
281 parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc APQ8096"));
282 }
283
TEST(PROC_CPUINFO_HARDWARE,qualcomm_sdm)284 TEST(PROC_CPUINFO_HARDWARE, qualcomm_sdm) {
285 EXPECT_EQ("Qualcomm Snapdragon 630",
286 parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc SDM630"));
287 EXPECT_EQ("Qualcomm Snapdragon 660",
288 parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc SDM660"));
289 }
290
TEST(PROC_CPUINFO_HARDWARE,qualcomm_sm)291 TEST(PROC_CPUINFO_HARDWARE, qualcomm_sm) {
292 EXPECT_EQ("Qualcomm Snapdragon 8150",
293 parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc SM8150"));
294 }
295
TEST(PROC_CPUINFO_HARDWARE,mediatek_mt)296 TEST(PROC_CPUINFO_HARDWARE, mediatek_mt) {
297 EXPECT_EQ("MediaTek MT5507",
298 parse_proc_cpuinfo_hardware("MT5507"));
299 EXPECT_EQ("MediaTek MT5508",
300 parse_proc_cpuinfo_hardware("MT5508"));
301 EXPECT_EQ("MediaTek MT6517",
302 parse_proc_cpuinfo_hardware("MT6517"));
303 EXPECT_EQ("MediaTek MT6570",
304 parse_proc_cpuinfo_hardware("MT6570"));
305 EXPECT_EQ("MediaTek MT6571",
306 parse_proc_cpuinfo_hardware("MT6571"));
307 EXPECT_EQ("MediaTek MT6572",
308 parse_proc_cpuinfo_hardware("MT6572"));
309 EXPECT_EQ("MediaTek MT6575",
310 parse_proc_cpuinfo_hardware("MT6575"));
311 EXPECT_EQ("MediaTek MT6577",
312 parse_proc_cpuinfo_hardware("MT6577"));
313 EXPECT_EQ("MediaTek MT6580",
314 parse_proc_cpuinfo_hardware("MT6580"));
315 EXPECT_EQ("MediaTek MT6580M",
316 parse_proc_cpuinfo_hardware("MT6580M"));
317 EXPECT_EQ("MediaTek MT6581",
318 parse_proc_cpuinfo_hardware("MT6581"));
319 EXPECT_EQ("MediaTek MT6582",
320 parse_proc_cpuinfo_hardware("MT6582"));
321 EXPECT_EQ("MediaTek MT6582",
322 parse_proc_cpuinfo_hardware("Mediatek MT6582"));
323 EXPECT_EQ("MediaTek MT6588",
324 parse_proc_cpuinfo_hardware("MT6588"));
325 EXPECT_EQ("MediaTek MT6589",
326 parse_proc_cpuinfo_hardware("MT6589"));
327 EXPECT_EQ("MediaTek MT6591",
328 parse_proc_cpuinfo_hardware("MT6591"));
329 EXPECT_EQ("MediaTek MT6592",
330 parse_proc_cpuinfo_hardware("MT6592"));
331 EXPECT_EQ("MediaTek MT6592T",
332 parse_proc_cpuinfo_hardware("MT6592T"));
333 EXPECT_EQ("MediaTek MT6592T",
334 parse_proc_cpuinfo_hardware("MT6592trubo"));
335 EXPECT_EQ("MediaTek MT6592T",
336 parse_proc_cpuinfo_hardware("MT6592turbo"));
337 EXPECT_EQ("MediaTek MT6595",
338 parse_proc_cpuinfo_hardware("MT6595"));
339 EXPECT_EQ("MediaTek MT6732",
340 parse_proc_cpuinfo_hardware("MT6732"));
341 EXPECT_EQ("MediaTek MT6732",
342 parse_proc_cpuinfo_hardware("MT6752", 4));
343 EXPECT_EQ("MediaTek MT6732M",
344 parse_proc_cpuinfo_hardware("MT6732M"));
345 EXPECT_EQ("MediaTek MT6735",
346 parse_proc_cpuinfo_hardware("MT6735"));
347 EXPECT_EQ("MediaTek MT6735M",
348 parse_proc_cpuinfo_hardware("MT6735M"));
349 EXPECT_EQ("MediaTek MT6735P",
350 parse_proc_cpuinfo_hardware("MT6735P"));
351 EXPECT_EQ("MediaTek MT6737",
352 parse_proc_cpuinfo_hardware("MT6737"));
353 EXPECT_EQ("MediaTek MT6737M",
354 parse_proc_cpuinfo_hardware("MT6737M"));
355 EXPECT_EQ("MediaTek MT6737T",
356 parse_proc_cpuinfo_hardware("MT6737T"));
357 EXPECT_EQ("MediaTek MT6737T",
358 parse_proc_cpuinfo_hardware("Samsung GrandPrimePlus LTE CIS rev04 board based on MT6737T"));
359 EXPECT_EQ("MediaTek MT6737T",
360 parse_proc_cpuinfo_hardware("Samsung GrandPrimePlus LTE LTN DTV rev04 board based on MT6737T"));
361 EXPECT_EQ("MediaTek MT6737T",
362 parse_proc_cpuinfo_hardware("Samsung GrandPrimePlus LTE LTN OPEN rev04 board based on MT6737T"));
363 EXPECT_EQ("MediaTek MT6738",
364 parse_proc_cpuinfo_hardware("MT6738"));
365 EXPECT_EQ("MediaTek MT6750",
366 parse_proc_cpuinfo_hardware("MT6750"));
367 EXPECT_EQ("MediaTek MT6750T",
368 parse_proc_cpuinfo_hardware("MT6750T"));
369 EXPECT_EQ("MediaTek MT6752",
370 parse_proc_cpuinfo_hardware("MT6752", 8));
371 EXPECT_EQ("MediaTek MT6752M",
372 parse_proc_cpuinfo_hardware("MT6752M", 8));
373 EXPECT_EQ("MediaTek MT6753",
374 parse_proc_cpuinfo_hardware("MT6753"));
375 EXPECT_EQ("MediaTek MT6753T",
376 parse_proc_cpuinfo_hardware("MT6753T"));
377 EXPECT_EQ("MediaTek MT6755",
378 parse_proc_cpuinfo_hardware("MT6755"));
379 EXPECT_EQ("MediaTek MT6755BM",
380 parse_proc_cpuinfo_hardware("MT6755BM"));
381 EXPECT_EQ("MediaTek MT6755M",
382 parse_proc_cpuinfo_hardware("MT6755M"));
383 EXPECT_EQ("MediaTek MT6755V/B",
384 parse_proc_cpuinfo_hardware("MT6755V/B"));
385 EXPECT_EQ("MediaTek MT6755V/BM",
386 parse_proc_cpuinfo_hardware("MT6755V/BM"));
387 EXPECT_EQ("MediaTek MT6755V/C",
388 parse_proc_cpuinfo_hardware("MT6755V/C"));
389 EXPECT_EQ("MediaTek MT6755V/CM",
390 parse_proc_cpuinfo_hardware("MT6755V/CM"));
391 EXPECT_EQ("MediaTek MT6755V/W",
392 parse_proc_cpuinfo_hardware("MT6755V/W"));
393 EXPECT_EQ("MediaTek MT6755V/WM",
394 parse_proc_cpuinfo_hardware("MT6755V/WM"));
395 EXPECT_EQ("MediaTek MT6755V/WT",
396 parse_proc_cpuinfo_hardware("MT6755V/WT"));
397 EXPECT_EQ("MediaTek MT6757",
398 parse_proc_cpuinfo_hardware("MT6757"));
399 EXPECT_EQ("MediaTek MT6757",
400 parse_proc_cpuinfo_hardware("Samsung J7 Max LTE SWA rev02a board based on MT6757"));
401 EXPECT_EQ("MediaTek MT6757CD",
402 parse_proc_cpuinfo_hardware("MT6757CD"));
403 EXPECT_EQ("MediaTek MT6757CH",
404 parse_proc_cpuinfo_hardware("MT6757CH"));
405 EXPECT_EQ("MediaTek MT6795",
406 parse_proc_cpuinfo_hardware("MT6795"));
407 EXPECT_EQ("MediaTek MT6795M",
408 parse_proc_cpuinfo_hardware("MT6795M"));
409 EXPECT_EQ("MediaTek MT6795MM",
410 parse_proc_cpuinfo_hardware("MT6795MM"));
411 EXPECT_EQ("MediaTek MT6795T",
412 parse_proc_cpuinfo_hardware("MT6795T"));
413 EXPECT_EQ("MediaTek MT6797",
414 parse_proc_cpuinfo_hardware("MT6797"));
415 EXPECT_EQ("MediaTek MT6797M",
416 parse_proc_cpuinfo_hardware("MT6797M"));
417 EXPECT_EQ("MediaTek MT6797T",
418 parse_proc_cpuinfo_hardware("MT6797T"));
419 EXPECT_EQ("MediaTek MT6797X",
420 parse_proc_cpuinfo_hardware("MT6797X"));
421 EXPECT_EQ("MediaTek MT8111",
422 parse_proc_cpuinfo_hardware("MT8111"));
423 EXPECT_EQ("MediaTek MT8121",
424 parse_proc_cpuinfo_hardware("MT8121"));
425 EXPECT_EQ("MediaTek MT8125",
426 parse_proc_cpuinfo_hardware("MT8125"));
427 EXPECT_EQ("MediaTek MT8127",
428 parse_proc_cpuinfo_hardware("MT8127"));
429 EXPECT_EQ("MediaTek MT8135",
430 parse_proc_cpuinfo_hardware("MT8135"));
431 EXPECT_EQ("MediaTek MT8151",
432 parse_proc_cpuinfo_hardware("MT8151"));
433 EXPECT_EQ("MediaTek MT8161",
434 parse_proc_cpuinfo_hardware("MT8161"));
435 EXPECT_EQ("MediaTek MT8161A",
436 parse_proc_cpuinfo_hardware("MT8161A"));
437 EXPECT_EQ("MediaTek MT8161P",
438 parse_proc_cpuinfo_hardware("MT8161P"));
439 EXPECT_EQ("MediaTek MT8163",
440 parse_proc_cpuinfo_hardware("MT8163"));
441 EXPECT_EQ("MediaTek MT8165",
442 parse_proc_cpuinfo_hardware("MT8165"));
443 EXPECT_EQ("MediaTek MT8167A",
444 parse_proc_cpuinfo_hardware("MT8167A"));
445 EXPECT_EQ("MediaTek MT8167B",
446 parse_proc_cpuinfo_hardware("MT8167B"));
447 EXPECT_EQ("MediaTek MT8173",
448 parse_proc_cpuinfo_hardware("MT8173"));
449 EXPECT_EQ("MediaTek MT8176",
450 parse_proc_cpuinfo_hardware("MT8176"));
451 EXPECT_EQ("MediaTek MT8312",
452 parse_proc_cpuinfo_hardware("MT8312"));
453 EXPECT_EQ("MediaTek MT8312C",
454 parse_proc_cpuinfo_hardware("MT8312C"));
455 EXPECT_EQ("MediaTek MT8312D",
456 parse_proc_cpuinfo_hardware("MT8312D"));
457 EXPECT_EQ("MediaTek MT8317",
458 parse_proc_cpuinfo_hardware("MT8317"));
459 EXPECT_EQ("MediaTek MT8321",
460 parse_proc_cpuinfo_hardware("MT8321"));
461 EXPECT_EQ("MediaTek MT8321M",
462 parse_proc_cpuinfo_hardware("MT8321M"));
463 EXPECT_EQ("MediaTek MT8377",
464 parse_proc_cpuinfo_hardware("MT8377"));
465 EXPECT_EQ("MediaTek MT8382",
466 parse_proc_cpuinfo_hardware("MT8382"));
467 EXPECT_EQ("MediaTek MT8389",
468 parse_proc_cpuinfo_hardware("MT8389"));
469 EXPECT_EQ("MediaTek MT8389Q",
470 parse_proc_cpuinfo_hardware("MT8389Q"));
471 EXPECT_EQ("MediaTek MT8392",
472 parse_proc_cpuinfo_hardware("MT8392"));
473 EXPECT_EQ("MediaTek MT8685",
474 parse_proc_cpuinfo_hardware("MT8685"));
475 EXPECT_EQ("MediaTek MT8732",
476 parse_proc_cpuinfo_hardware("MT8732"));
477 EXPECT_EQ("MediaTek MT8732T",
478 parse_proc_cpuinfo_hardware("MT8732T"));
479 EXPECT_EQ("MediaTek MT8735",
480 parse_proc_cpuinfo_hardware("MT8735"));
481 EXPECT_EQ("MediaTek MT8735A",
482 parse_proc_cpuinfo_hardware("MT8735A"));
483 EXPECT_EQ("MediaTek MT8735B",
484 parse_proc_cpuinfo_hardware("MT8735B"));
485 EXPECT_EQ("MediaTek MT8735D",
486 parse_proc_cpuinfo_hardware("MT8735D"));
487 EXPECT_EQ("MediaTek MT8735M",
488 parse_proc_cpuinfo_hardware("MT8735M"));
489 EXPECT_EQ("MediaTek MT8735P",
490 parse_proc_cpuinfo_hardware("MT8735P"));
491 EXPECT_EQ("MediaTek MT8735T",
492 parse_proc_cpuinfo_hardware("MT8735T"));
493 EXPECT_EQ("MediaTek MT8752",
494 parse_proc_cpuinfo_hardware("MT8752"));
495 EXPECT_EQ("MediaTek MT8783",
496 parse_proc_cpuinfo_hardware("MT8783"));
497 EXPECT_EQ("MediaTek MT8783T",
498 parse_proc_cpuinfo_hardware("MT8783T"));
499 }
500
TEST(PROC_CPUINFO_HARDWARE,samsung_exynos)501 TEST(PROC_CPUINFO_HARDWARE, samsung_exynos) {
502 EXPECT_EQ("Samsung Exynos 4415",
503 parse_proc_cpuinfo_hardware("Samsung EXYNOS4415"));
504 EXPECT_EQ("Samsung Exynos 5420",
505 parse_proc_cpuinfo_hardware("Samsung EXYNOS5420", 4));
506 EXPECT_EQ("Samsung Exynos 5430",
507 parse_proc_cpuinfo_hardware("Samsung EXYNOS5430"));
508 EXPECT_EQ("Samsung Exynos 5433",
509 parse_proc_cpuinfo_hardware("Samsung EXYNOS5433"));
510 EXPECT_EQ("Samsung Exynos 7420",
511 parse_proc_cpuinfo_hardware("SAMSUNG Exynos7420"));
512 EXPECT_EQ("Samsung Exynos 7578",
513 parse_proc_cpuinfo_hardware("SAMSUNG Exynos7580", 4));
514 EXPECT_EQ("Samsung Exynos 7580",
515 parse_proc_cpuinfo_hardware("SAMSUNG Exynos7580", 8));
516 }
517
TEST(PROC_CPUINFO_HARDWARE,samsung_universal)518 TEST(PROC_CPUINFO_HARDWARE, samsung_universal) {
519 EXPECT_EQ("Samsung Exynos 3470",
520 parse_proc_cpuinfo_hardware("UNIVERSAL3470"));
521 EXPECT_EQ("Samsung Exynos 3475",
522 parse_proc_cpuinfo_hardware("UNIVERSAL3475"));
523 EXPECT_EQ("Samsung Exynos 5260",
524 parse_proc_cpuinfo_hardware("UNIVERSAL5260"));
525 EXPECT_EQ("Samsung Exynos 5410",
526 parse_proc_cpuinfo_hardware("UNIVERSAL5410"));
527 EXPECT_EQ("Samsung Exynos 5420",
528 parse_proc_cpuinfo_hardware("UNIVERSAL5420", 4));
529 EXPECT_EQ("Samsung Exynos 5422",
530 parse_proc_cpuinfo_hardware("universal5422"));
531 EXPECT_EQ("Samsung Exynos 5430",
532 parse_proc_cpuinfo_hardware("UNIVERSAL5430"));
533 }
534
535 #if CPUINFO_ARCH_ARM
TEST(PROC_CPUINFO_HARDWARE,samsung_smdk)536 TEST(PROC_CPUINFO_HARDWARE, samsung_smdk) {
537 EXPECT_EQ("Samsung Exynos 4210",
538 parse_proc_cpuinfo_hardware("SMDK4210"));
539 EXPECT_EQ("Samsung Exynos 4212",
540 parse_proc_cpuinfo_hardware("SMDK4x12", 2));
541 EXPECT_EQ("Samsung Exynos 4412",
542 parse_proc_cpuinfo_hardware("SMDK4x12", 4));
543 }
544
TEST(PROC_CPUINFO_HARDWARE,samsung_special)545 TEST(PROC_CPUINFO_HARDWARE, samsung_special) {
546 EXPECT_EQ("Samsung Exynos 5250",
547 parse_proc_cpuinfo_hardware("Manta"));
548 }
549 #endif /* CPUINFO_ARCH_ARM */
550
TEST(PROC_CPUINFO_HARDWARE,hisilicon_kirin)551 TEST(PROC_CPUINFO_HARDWARE, hisilicon_kirin) {
552 #if CPUINFO_ARCH_ARM
553 EXPECT_EQ("HiSilicon Kirin 920",
554 parse_proc_cpuinfo_hardware("Hisilicon Kirin 920"));
555 EXPECT_EQ("HiSilicon Kirin 920",
556 parse_proc_cpuinfo_hardware("Kirin920"));
557 EXPECT_EQ("HiSilicon Kirin 925",
558 parse_proc_cpuinfo_hardware("Hisilicon Kirin 925"));
559 EXPECT_EQ("HiSilicon Kirin 925",
560 parse_proc_cpuinfo_hardware("Kirin925"));
561 #endif /* CPUINFO_ARCH_ARM */
562 EXPECT_EQ("HiSilicon Kirin 930",
563 parse_proc_cpuinfo_hardware("Hisilicon Kirin 930"));
564 EXPECT_EQ("HiSilicon Kirin 935",
565 parse_proc_cpuinfo_hardware("Hisilicon Kirin 935"));
566 EXPECT_EQ("HiSilicon Kirin 950",
567 parse_proc_cpuinfo_hardware("Hisilicon Kirin 950"));
568 EXPECT_EQ("HiSilicon Kirin 955",
569 parse_proc_cpuinfo_hardware("Hisilicon Kirin 955"));
570 }
571
TEST(PROC_CPUINFO_HARDWARE,hisilicon_special)572 TEST(PROC_CPUINFO_HARDWARE, hisilicon_special) {
573 EXPECT_EQ("HiSilicon Hi3751",
574 parse_proc_cpuinfo_hardware("hi3751"));
575 #if CPUINFO_ARCH_ARM
576 EXPECT_EQ("HiSilicon K3V2",
577 parse_proc_cpuinfo_hardware("k3v2oem1"));
578 #endif /* CPUINFO_ARCH_ARM */
579 EXPECT_EQ("HiSilicon Kirin 620",
580 parse_proc_cpuinfo_hardware("hi6210sft"));
581 EXPECT_EQ("HiSilicon Kirin 650",
582 parse_proc_cpuinfo_hardware("hi6250"));
583 #if CPUINFO_ARCH_ARM
584 EXPECT_EQ("HiSilicon Kirin 910T",
585 parse_proc_cpuinfo_hardware("hi6620oem"));
586 #endif /* CPUINFO_ARCH_ARM */
587 }
588
589 #if CPUINFO_ARCH_ARM
TEST(PROC_CPUINFO_HARDWARE,actions)590 TEST(PROC_CPUINFO_HARDWARE, actions) {
591 EXPECT_EQ("Actions ATM7029",
592 parse_proc_cpuinfo_hardware("gs702a"));
593 EXPECT_EQ("Actions ATM7029B",
594 parse_proc_cpuinfo_hardware("gs702c"));
595 EXPECT_EQ("Actions ATM7059A",
596 parse_proc_cpuinfo_hardware("gs705a"));
597 }
598 #endif /* CPUINFO_ARCH_ARM */
599
TEST(PROC_CPUINFO_HARDWARE,allwinner_sunxi)600 TEST(PROC_CPUINFO_HARDWARE, allwinner_sunxi) {
601 #if CPUINFO_ARCH_ARM
602 EXPECT_EQ("Allwinner A10",
603 parse_proc_cpuinfo_hardware("sun4i", 1));
604 EXPECT_EQ("Allwinner A13",
605 parse_proc_cpuinfo_hardware("sun5i", 1));
606 EXPECT_EQ("Allwinner A20",
607 parse_proc_cpuinfo_hardware("sun7i", 2));
608 EXPECT_EQ("Allwinner A23",
609 parse_proc_cpuinfo_hardware("sun8i", 2));
610 EXPECT_EQ("Allwinner A31",
611 parse_proc_cpuinfo_hardware("sun6i", 4));
612 EXPECT_EQ("Allwinner A33",
613 parse_proc_cpuinfo_hardware("sun8i", 4));
614 #endif /* CPUINFO_ARCH_ARM */
615 EXPECT_EQ("Allwinner A64",
616 parse_proc_cpuinfo_hardware("sun50iw1", 4));
617 EXPECT_EQ("Allwinner A64",
618 parse_proc_cpuinfo_hardware("sun50iw1p1", 4));
619 EXPECT_EQ("Allwinner A64",
620 parse_proc_cpuinfo_hardware("sun50iw2", 4));
621 #if CPUINFO_ARCH_ARM
622 EXPECT_EQ("Allwinner A80",
623 parse_proc_cpuinfo_hardware("sun9i", 8));
624 EXPECT_EQ("Allwinner A83T",
625 parse_proc_cpuinfo_hardware("sun8i", 8));
626 #endif /* CPUINFO_ARCH_ARM */
627 }
628
629 #if CPUINFO_ARCH_ARM
TEST(PROC_CPUINFO_HARDWARE,amlogic)630 TEST(PROC_CPUINFO_HARDWARE, amlogic) {
631 EXPECT_EQ("Amlogic S805",
632 parse_proc_cpuinfo_hardware("Amlogic Meson8B"));
633 EXPECT_EQ("Amlogic S812",
634 parse_proc_cpuinfo_hardware("Amlogic Meson8"));
635 }
636
TEST(PROC_CPUINFO_HARDWARE,lg)637 TEST(PROC_CPUINFO_HARDWARE, lg) {
638 EXPECT_EQ("LG Nuclun 7111",
639 parse_proc_cpuinfo_hardware("Odin"));
640 }
641
TEST(PROC_CPUINFO_HARDWARE,marvell_pxa)642 TEST(PROC_CPUINFO_HARDWARE, marvell_pxa) {
643 EXPECT_EQ("Marvell PXA1088",
644 parse_proc_cpuinfo_hardware("PXA1088"));
645 EXPECT_EQ("Marvell PXA1088",
646 parse_proc_cpuinfo_hardware("PXA1L88"));
647 EXPECT_EQ("Marvell PXA1908",
648 parse_proc_cpuinfo_hardware("PXA1908"));
649 EXPECT_EQ("Marvell PXA1928",
650 parse_proc_cpuinfo_hardware("PXA1928"));
651 EXPECT_EQ("Marvell PXA988",
652 parse_proc_cpuinfo_hardware("PXA988"));
653 }
654
TEST(PROC_CPUINFO_HARDWARE,mstar)655 TEST(PROC_CPUINFO_HARDWARE, mstar) {
656 EXPECT_EQ("MStar 6A338",
657 parse_proc_cpuinfo_hardware("Madison"));
658 }
659
TEST(PROC_CPUINFO_HARDWARE,nvidia)660 TEST(PROC_CPUINFO_HARDWARE, nvidia) {
661 EXPECT_EQ("Nvidia Tegra AP20H",
662 parse_proc_cpuinfo_hardware_tegra("picasso"));
663 EXPECT_EQ("Nvidia Tegra AP20H",
664 parse_proc_cpuinfo_hardware_tegra("picasso_e"));
665 EXPECT_EQ("Nvidia Tegra AP20H",
666 parse_proc_cpuinfo_hardware_tegra("stingray"));
667 EXPECT_EQ("Nvidia Tegra AP33",
668 parse_proc_cpuinfo_hardware_tegra("endeavoru"));
669 EXPECT_EQ("Nvidia Tegra AP33",
670 parse_proc_cpuinfo_hardware_tegra("x3"));
671 EXPECT_EQ("Nvidia Tegra SL460N",
672 parse_proc_cpuinfo_hardware_tegra("Ceres"));
673 EXPECT_EQ("Nvidia Tegra T114",
674 parse_proc_cpuinfo_hardware_tegra("macallan"));
675 EXPECT_EQ("Nvidia Tegra T114",
676 parse_proc_cpuinfo_hardware_tegra("mozart"));
677 EXPECT_EQ("Nvidia Tegra T114",
678 parse_proc_cpuinfo_hardware_tegra("tostab12BA"));
679 EXPECT_EQ("Nvidia Tegra T124",
680 parse_proc_cpuinfo_hardware_tegra("mocha"));
681 EXPECT_EQ("Nvidia Tegra T124",
682 parse_proc_cpuinfo_hardware_tegra("tn8"));
683 EXPECT_EQ("Nvidia Tegra T20",
684 parse_proc_cpuinfo_hardware_tegra("nbx03"));
685 EXPECT_EQ("Nvidia Tegra T20",
686 parse_proc_cpuinfo_hardware_tegra("p3"));
687 EXPECT_EQ("Nvidia Tegra T20",
688 parse_proc_cpuinfo_hardware_tegra("ventana"));
689 EXPECT_EQ("Nvidia Tegra T30",
690 parse_proc_cpuinfo_hardware_tegra("cardhu"));
691 EXPECT_EQ("Nvidia Tegra T30",
692 parse_proc_cpuinfo_hardware_tegra("chagall"));
693 EXPECT_EQ("Nvidia Tegra T30",
694 parse_proc_cpuinfo_hardware_tegra("picasso_m"));
695 EXPECT_EQ("Nvidia Tegra T30",
696 parse_proc_cpuinfo_hardware_tegra("picasso_mf"));
697 EXPECT_EQ("Nvidia Tegra T30L",
698 parse_proc_cpuinfo_hardware_tegra("BIRCH"));
699 EXPECT_EQ("Nvidia Tegra T30L",
700 parse_proc_cpuinfo_hardware_tegra("NS_14T004"));
701 EXPECT_EQ("Nvidia Tegra T30L",
702 parse_proc_cpuinfo_hardware_tegra("avalon"));
703 EXPECT_EQ("Nvidia Tegra T30L",
704 parse_proc_cpuinfo_hardware_tegra("picasso_e2"));
705 EXPECT_EQ("Nvidia Tegra T30L",
706 parse_proc_cpuinfo_hardware_tegra("tostab12BL"));
707 EXPECT_EQ("Nvidia Tegra T30L",
708 parse_proc_cpuinfo_hardware_tegra("txs03"));
709 EXPECT_EQ("Nvidia Tegra T33",
710 parse_proc_cpuinfo_hardware_tegra("bobsleigh"));
711 EXPECT_EQ("Nvidia Tegra T33",
712 parse_proc_cpuinfo_hardware_tegra("enrc2b"));
713 EXPECT_EQ("Nvidia Tegra T33",
714 parse_proc_cpuinfo_hardware_tegra("evitareul"));
715 EXPECT_EQ("Nvidia Tegra T33",
716 parse_proc_cpuinfo_hardware_tegra("tegra_fjdev103"));
717 }
718 #endif /* CPUINFO_ARCH_ARM */
719
TEST(PROC_CPUINFO_HARDWARE,rockchip_rk)720 TEST(PROC_CPUINFO_HARDWARE, rockchip_rk) {
721 EXPECT_EQ("Rockchip RK3126",
722 parse_proc_cpuinfo_hardware("Rockchip RK3126"));
723 EXPECT_EQ("Rockchip RK3128",
724 parse_proc_cpuinfo_hardware("Rockchip RK3128"));
725 EXPECT_EQ("Rockchip RK3188",
726 parse_proc_cpuinfo_hardware("Rockchip RK3188"));
727 EXPECT_EQ("Rockchip RK3228H",
728 parse_proc_cpuinfo_hardware("rockchip,rk3228h"));
729 EXPECT_EQ("Rockchip RK3229",
730 parse_proc_cpuinfo_hardware("Rockchip RK3229"));
731 EXPECT_EQ("Rockchip RK3328",
732 parse_proc_cpuinfo_hardware("rockchip,rk3328"));
733 EXPECT_EQ("Rockchip RK3368",
734 parse_proc_cpuinfo_hardware("rockchip,rk3368"));
735 }
736
TEST(PROC_CPUINFO_HARDWARE,spreadtrum_sc)737 TEST(PROC_CPUINFO_HARDWARE, spreadtrum_sc) {
738 EXPECT_EQ("Spreadtrum SC5735",
739 parse_proc_cpuinfo_hardware("sc5735"));
740 EXPECT_EQ("Spreadtrum SC6820I",
741 parse_proc_cpuinfo_hardware("sc6820i"));
742 EXPECT_EQ("Spreadtrum SC7715",
743 parse_proc_cpuinfo_hardware("scx15"));
744 EXPECT_EQ("Spreadtrum SC7730",
745 parse_proc_cpuinfo_hardware("sc7730"));
746 EXPECT_EQ("Spreadtrum SC7731",
747 parse_proc_cpuinfo_hardware("sc7731"));
748 EXPECT_EQ("Spreadtrum SC7731C",
749 parse_proc_cpuinfo_hardware("sc7731c"));
750 EXPECT_EQ("Spreadtrum SC7731G",
751 parse_proc_cpuinfo_hardware("sc7731g"));
752 EXPECT_EQ("Spreadtrum SC8825",
753 parse_proc_cpuinfo_hardware("sc8825"));
754 EXPECT_EQ("Spreadtrum SC8830",
755 parse_proc_cpuinfo_hardware("sc8830"));
756 EXPECT_EQ("Spreadtrum SC9830",
757 parse_proc_cpuinfo_hardware("sc9830"));
758 EXPECT_EQ("Spreadtrum SC9832",
759 parse_proc_cpuinfo_hardware("sc9832"));
760 EXPECT_EQ("Spreadtrum SC9832A",
761 parse_proc_cpuinfo_hardware("sc9832a"));
762 }
763
TEST(PROC_CPUINFO_HARDWARE,telechips)764 TEST(PROC_CPUINFO_HARDWARE, telechips) {
765 EXPECT_EQ("Telechips TCC892X",
766 parse_proc_cpuinfo_hardware("tcc892x"));
767 EXPECT_EQ("Telechips TCC893X",
768 parse_proc_cpuinfo_hardware("tcc893x"));
769 }
770
771 #if CPUINFO_ARCH_ARM
TEST(PROC_CPUINFO_HARDWARE,texas_instruments_omap)772 TEST(PROC_CPUINFO_HARDWARE, texas_instruments_omap) {
773 EXPECT_EQ("Texas Instruments OMAP4430",
774 parse_proc_cpuinfo_hardware("OMAP4430"));
775 EXPECT_EQ("Texas Instruments OMAP4460",
776 parse_proc_cpuinfo_hardware("OMAP4460"));
777 }
778
TEST(PROC_CPUINFO_HARDWARE,texas_instruments_special)779 TEST(PROC_CPUINFO_HARDWARE, texas_instruments_special) {
780 EXPECT_EQ("Texas Instruments OMAP4430",
781 parse_proc_cpuinfo_hardware("mapphone_CDMA"));
782 EXPECT_EQ("Texas Instruments OMAP4460",
783 parse_proc_cpuinfo_hardware("Tuna"));
784 }
785
TEST(PROC_CPUINFO_HARDWARE,wondermedia)786 TEST(PROC_CPUINFO_HARDWARE, wondermedia) {
787 EXPECT_EQ("WonderMedia WM8850",
788 parse_proc_cpuinfo_hardware("WMT", 1, 1200000));
789 EXPECT_EQ("WonderMedia WM8880",
790 parse_proc_cpuinfo_hardware("WMT", 2, 1500000));
791 EXPECT_EQ("WonderMedia WM8950",
792 parse_proc_cpuinfo_hardware("WMT", 1, 1008000));
793 }
794 #endif
795