1 /*
2 * Copyright (c) 2021 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16 #include <cstdint>
17 #include <cstdio>
18 #include <cstdlib>
19 #include <fcntl.h>
20 #include <gtest/gtest.h>
21 #include <string>
22 #include <unistd.h>
23 #include "hdf_uhdf_test.h"
24 #include "hdf_io_service_if.h"
25 #include "hdf_usb_device_test.h"
26
27 using namespace testing::ext;
28
29 namespace ModuleTest {
30 class UsbFnDeviceSdkTest : public testing::Test {
31 public:
32 static void SetUpTestCase();
33 static void TearDownTestCase();
34 void SetUp();
35 void TearDown();
36 };
37
SetUpTestCase()38 void UsbFnDeviceSdkTest::SetUpTestCase()
39 {
40 HdfTestOpenService();
41 }
42
TearDownTestCase()43 void UsbFnDeviceSdkTest::TearDownTestCase()
44 {
45 HdfTestCloseService();
46 }
47
SetUp()48 void UsbFnDeviceSdkTest::SetUp()
49 {
50 printf("%s\n", __func__);
51 }
52
TearDown()53 void UsbFnDeviceSdkTest::TearDown()
54 {
55 printf("%s\n", __func__);
56 }
57
58 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceCreate001, TestSize.Level1)
59 {
60 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_CREATE_DEVICE, -1};
61 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
62 }
63
64 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceCreate002, TestSize.Level1)
65 {
66 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_CREATE_DEVICE002, -1};
67 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
68 }
69
70 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceCreate003, TestSize.Level1)
71 {
72 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_CREATE_DEVICE003, -1};
73 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
74 }
75
76 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceCreate004, TestSize.Level1)
77 {
78 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_CREATE_DEVICE004, -1};
79 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
80 }
81
82 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceCreate005, TestSize.Level1)
83 {
84 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_CREATE_DEVICE005, -1};
85 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
86 }
87
88 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceCreate006, TestSize.Level1)
89 {
90 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_CREATE_DEVICE006, -1};
91 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
92 }
93
94 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceStatus001, TestSize.Level1)
95 {
96 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_DEVICE_STATUS, -1};
97 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
98 }
99
100 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceStatus002, TestSize.Level1)
101 {
102 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_DEVICE_STATUS002, -1};
103 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
104 }
105
106 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceStatus003, TestSize.Level1)
107 {
108 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_DEVICE_STATUS003, -1};
109 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
110 }
111
112 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceStatus004, TestSize.Level1)
113 {
114 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_DEVICE_STATUS004, -1};
115 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
116 }
117
118 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceStatus005, TestSize.Level1)
119 {
120 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_DEVICE_STATUS005, -1};
121 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
122 }
123
124 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceGetDevice001, TestSize.Level1)
125 {
126 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_GET_DEVICE, -1};
127 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
128 }
129
130 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceGetDevice002, TestSize.Level1)
131 {
132 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_GET_DEVICE002, -1};
133 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
134 }
135
136 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceGetDevice003, TestSize.Level1)
137 {
138 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_GET_DEVICE003, -1};
139 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
140 }
141
142 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceGetDevice004, TestSize.Level1)
143 {
144 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_GET_DEVICE004, -1};
145 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
146 }
147
148 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceGetDevice005, TestSize.Level1)
149 {
150 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_GET_DEVICE005, -1};
151 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
152 }
153
154 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceGetDevice006, TestSize.Level1)
155 {
156 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_GET_DEVICE006, -1};
157 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
158 }
159
160 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceGetInterface001, TestSize.Level1)
161 {
162 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_GET_INTERFACE, -1};
163 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
164 }
165
166 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceGetInterface002, TestSize.Level1)
167 {
168 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_GET_INTERFACE002, -1};
169 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
170 }
171
172 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceGetInterface003, TestSize.Level1)
173 {
174 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_GET_INTERFACE003, -1};
175 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
176 }
177
178 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceGetInterface004, TestSize.Level1)
179 {
180 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_GET_INTERFACE004, -1};
181 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
182 }
183
184 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceGetInterface005, TestSize.Level1)
185 {
186 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_GET_INTERFACE005, -1};
187 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
188 }
189
190 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceGetInterface006, TestSize.Level1)
191 {
192 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_GET_INTERFACE006, -1};
193 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
194 }
195
196 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceGetPipeInfo001, TestSize.Level1)
197 {
198 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_GET_PIPEINFO, -1};
199 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
200 }
201
202 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceGetPipeInfo002, TestSize.Level1)
203 {
204 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_GET_PIPEINFO002, -1};
205 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
206 }
207
208 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceGetPipeInfo003, TestSize.Level1)
209 {
210 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_GET_PIPEINFO003, -1};
211 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
212 }
213
214 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceGetPipeInfo004, TestSize.Level1)
215 {
216 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_GET_PIPEINFO004, -1};
217 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
218 }
219
220 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceGetPipeInfo005, TestSize.Level1)
221 {
222 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_GET_PIPEINFO005, -1};
223 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
224 }
225
226 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceGetPipeInfo006, TestSize.Level1)
227 {
228 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_GET_PIPEINFO006, -1};
229 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
230 }
231
232 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceRegistProp001, TestSize.Level1)
233 {
234 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_REGIST_PROP, -1};
235 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
236 }
237
238 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceRegistProp002, TestSize.Level1)
239 {
240 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_REGIST_PROP002, -1};
241 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
242 }
243
244 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceRegistProp003, TestSize.Level1)
245 {
246 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_REGIST_PROP003, -1};
247 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
248 }
249
250 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceRegistProp004, TestSize.Level1)
251 {
252 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_REGIST_PROP004, -1};
253 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
254 }
255
256 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceRegistProp005, TestSize.Level1)
257 {
258 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_REGIST_PROP005, -1};
259 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
260 }
261
262 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceRegistProp006, TestSize.Level1)
263 {
264 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_REGIST_PROP006, -1};
265 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
266 }
267
268 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceRegistProp007, TestSize.Level1)
269 {
270 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_REGIST_PROP007, -1};
271 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
272 }
273
274 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceGetProp001, TestSize.Level1)
275 {
276 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_GET_PROP, -1};
277 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
278 }
279
280 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceGetProp002, TestSize.Level1)
281 {
282 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_GET_PROP002, -1};
283 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
284 }
285
286 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceGetProp003, TestSize.Level1)
287 {
288 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_GET_PROP003, -1};
289 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
290 }
291
292 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceGetProp004, TestSize.Level1)
293 {
294 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_GET_PROP004, -1};
295 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
296 }
297
298 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceGetProp005, TestSize.Level1)
299 {
300 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_GET_PROP005, -1};
301 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
302 }
303
304 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceGetProp006, TestSize.Level1)
305 {
306 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_GET_PROP006, -1};
307 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
308 }
309
310 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceGetProp007, TestSize.Level1)
311 {
312 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_GET_PROP007, -1};
313 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
314 }
315
316 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceGetProp008, TestSize.Level1)
317 {
318 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_GET_PROP008, -1};
319 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
320 }
321
322 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceSetProp001, TestSize.Level1)
323 {
324 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_SET_PROP, -1};
325 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
326 }
327
328 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceSetProp002, TestSize.Level1)
329 {
330 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_SET_PROP002, -1};
331 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
332 }
333
334 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceSetProp003, TestSize.Level1)
335 {
336 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_SET_PROP003, -1};
337 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
338 }
339
340 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceSetProp004, TestSize.Level1)
341 {
342 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_SET_PROP004, -1};
343 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
344 }
345
346 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceSetProp005, TestSize.Level1)
347 {
348 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_SET_PROP005, -1};
349 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
350 }
351
352 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceSetProp006, TestSize.Level1)
353 {
354 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_SET_PROP006, -1};
355 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
356 }
357
358 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceSetProp007, TestSize.Level1)
359 {
360 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_SET_PROP007, -1};
361 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
362 }
363
364 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceAllocCtrlRequest001, TestSize.Level1)
365 {
366 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_ALLOC_CTRLREQUEST, -1};
367 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
368 }
369
370 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceAllocCtrlRequest002, TestSize.Level1)
371 {
372 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_ALLOC_CTRLREQUEST002, -1};
373 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
374 }
375
376 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceAllocCtrlRequest003, TestSize.Level1)
377 {
378 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_ALLOC_CTRLREQUEST003, -1};
379 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
380 }
381
382 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceAllocCtrlRequest004, TestSize.Level1)
383 {
384 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_ALLOC_CTRLREQUEST004, -1};
385 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
386 }
387
388 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceAllocCtrlRequest005, TestSize.Level1)
389 {
390 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_ALLOC_CTRLREQUEST005, -1};
391 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
392 }
393
394 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceAllocCtrlRequest006, TestSize.Level1)
395 {
396 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_ALLOC_CTRLREQUEST006, -1};
397 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
398 }
399
400 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceAllocCtrlRequest007, TestSize.Level1)
401 {
402 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_ALLOC_CTRLREQUEST007, -1};
403 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
404 }
405
406 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceAllocCtrlRequest008, TestSize.Level1)
407 {
408 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_ALLOC_CTRLREQUEST008, -1};
409 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
410 }
411
412 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceAllocRequest001, TestSize.Level1)
413 {
414 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_ALLOC_REQUEST, -1};
415 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
416 }
417
418 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceAllocRequest002, TestSize.Level1)
419 {
420 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_ALLOC_REQUEST002, -1};
421 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
422 }
423
424 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceAllocRequest003, TestSize.Level1)
425 {
426 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_ALLOC_REQUEST003, -1};
427 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
428 }
429
430 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceAllocRequest004, TestSize.Level1)
431 {
432 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_ALLOC_REQUEST004, -1};
433 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
434 }
435
436 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceAllocRequest005, TestSize.Level1)
437 {
438 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_ALLOC_REQUEST005, -1};
439 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
440 }
441
442 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceAllocRequest006, TestSize.Level1)
443 {
444 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_ALLOC_REQUEST006, -1};
445 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
446 }
447
448 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceAllocRequest007, TestSize.Level1)
449 {
450 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_ALLOC_REQUEST007, -1};
451 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
452 }
453
454 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceAllocRequest008, TestSize.Level1)
455 {
456 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_ALLOC_REQUEST008, -1};
457 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
458 }
459
460 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceAllocRequest009, TestSize.Level1)
461 {
462 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_ALLOC_REQUEST009, -1};
463 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
464 }
465
466 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceFreeRequest001, TestSize.Level1)
467 {
468 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_FREE_REQUEST, -1};
469 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
470 }
471
472 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceFreeRequest002, TestSize.Level1)
473 {
474 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_FREE_REQUEST002, -1};
475 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
476 }
477
478 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceFreeRequest003, TestSize.Level1)
479 {
480 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_FREE_REQUEST003, -1};
481 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
482 }
483
484 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceFreeRequest004, TestSize.Level1)
485 {
486 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_FREE_REQUEST004, -1};
487 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
488 }
489
490 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceFreeRequest005, TestSize.Level1)
491 {
492 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_FREE_REQUEST005, -1};
493 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
494 }
495
496 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceFreeRequest006, TestSize.Level1)
497 {
498 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_FREE_REQUEST006, -1};
499 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
500 }
501
502 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceGetRequestStatus001, TestSize.Level1)
503 {
504 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_GET_REQUEST_STATUS, -1};
505 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
506 }
507
508 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceGetRequestStatus002, TestSize.Level1)
509 {
510 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_GET_REQUEST_STATUS002, -1};
511 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
512 }
513
514 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceGetRequestStatus003, TestSize.Level1)
515 {
516 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_GET_REQUEST_STATUS003, -1};
517 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
518 }
519
520 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceGetRequestStatus004, TestSize.Level1)
521 {
522 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_GET_REQUEST_STATUS004, -1};
523 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
524 }
525
526 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceGetRequestStatus005, TestSize.Level1)
527 {
528 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_GET_REQUEST_STATUS005, -1};
529 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
530 }
531
532 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceGetRequestStatus006, TestSize.Level1)
533 {
534 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_GET_REQUEST_STATUS006, -1};
535 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
536 }
537
538 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceStopRecvEvent001, TestSize.Level1)
539 {
540 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_STOP_EVENT, -1};
541 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
542 }
543
544 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceStopRecvEvent002, TestSize.Level1)
545 {
546 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_STOP_EVENT002, -1};
547 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
548 }
549
550 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceStopRecvEvent003, TestSize.Level1)
551 {
552 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_STOP_EVENT003, -1};
553 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
554 }
555
556 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceStopRecvEvent004, TestSize.Level1)
557 {
558 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_STOP_EVENT004, -1};
559 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
560 }
561
562 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceStartRecvEvent001, TestSize.Level1)
563 {
564 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_START_EVENT, -1};
565 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
566 }
567
568 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceStartRecvEvent002, TestSize.Level1)
569 {
570 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_START_EVENT002, -1};
571 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
572 }
573
574 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceStartRecvEvent003, TestSize.Level1)
575 {
576 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_START_EVENT003, -1};
577 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
578 }
579
580 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceStartRecvEvent004, TestSize.Level1)
581 {
582 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_START_EVENT004, -1};
583 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
584 }
585
586 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceStartRecvEvent005, TestSize.Level1)
587 {
588 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_START_EVENT005, -1};
589 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
590 }
591
592 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceStartRecvEvent006, TestSize.Level1)
593 {
594 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_START_EVENT006, -1};
595 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
596 }
597
598 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceStartRecvEvent007, TestSize.Level1)
599 {
600 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_START_EVENT007, -1};
601 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
602 }
603
604 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceOpenInterface001, TestSize.Level1)
605 {
606 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_OPEN_INTERFACE, -1};
607 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
608 }
609
610 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceOpenInterface002, TestSize.Level1)
611 {
612 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_OPEN_INTERFACE002, -1};
613 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
614 }
615
616 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceOpenInterface003, TestSize.Level1)
617 {
618 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_OPEN_INTERFACE003, -1};
619 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
620 }
621
622 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceOpenInterface004, TestSize.Level1)
623 {
624 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_OPEN_INTERFACE004, -1};
625 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
626 }
627
628 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceOpenInterface005, TestSize.Level1)
629 {
630 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_OPEN_INTERFACE005, -1};
631 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
632 }
633
634 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceCloseInterface001, TestSize.Level1)
635 {
636 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_CLOSE_INTERFACE, -1};
637 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
638 }
639
640 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceCloseInterface002, TestSize.Level1)
641 {
642 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_CLOSE_INTERFACE002, -1};
643 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
644 }
645
646 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceCloseInterface003, TestSize.Level1)
647 {
648 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_CLOSE_INTERFACE003, -1};
649 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
650 }
651
652 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceCloseInterface004, TestSize.Level1)
653 {
654 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_CLOSE_INTERFACE004, -1};
655 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
656 }
657
658 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceDelete001, TestSize.Level1)
659 {
660 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_DELETE_DEVICE, -1};
661 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
662 }
663
664 HWTEST_F(UsbFnDeviceSdkTest, UsbDeviceDelete002, TestSize.Level1)
665 {
666 struct HdfTestMsg msg = {TEST_USB_DEVICE_TYPE, USB_DEVICE_DELETE_DEVICE002, -1};
667 EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
668 }
669 };
670