• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2023-2023 Huawei Device Co., Ltd. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without modification,
5  * are permitted provided that the following conditions are met:
6  *
7  * 1. Redistributions of source code must retain the above copyright notice, this list of
8  *    conditions and the following disclaimer.
9  *
10  * 2. Redistributions in binary form must reproduce the above copyright notice, this list
11  *    of conditions and the following disclaimer in the documentation and/or other materials
12  *    provided with the distribution.
13  *
14  * 3. Neither the name of the copyright holder nor the names of its contributors may be used
15  *    to endorse or promote products derived from this software without specific prior written
16  *    permission.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
20  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
22  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
25  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29  */
30 
31 #include "xts_net.h"
32 
33 LITE_TEST_SUIT(NET, ActsNet, ActsNetTestSuite);
34 
ActsNetTestSuiteSetUp(void)35 static BOOL ActsNetTestSuiteSetUp(void)
36 {
37     return TRUE;
38 }
39 
ActsNetTestSuiteTearDown(void)40 static BOOL ActsNetTestSuiteTearDown(void)
41 {
42     return TRUE;
43 }
44 
45 /**
46  * @tc.number    : SUB_KERNEL_NET_0730
47  * @tc.name      : test ioctl get and set IFHWADDR
48  * @tc.desc      : [C- SOFTWARE -0200]
49  */
50 LITE_TEST_CASE(ActsNetTestSuite, testIoctlIfhwAddr, Function | MediumTest | Level2)
51 {
52     int udpFd = socket(AF_INET, SOCK_DGRAM, 0);
53     ICUNIT_ASSERT_NOT_EQUAL(udpFd, -1, udpFd); /* -1, common data for test, no special meaning */
54 
55     struct ifreq ifre[5]; /* 5, common data for test, no special meaning */
56     struct ifconf ifcf = {0};
57     (void)memset_s(&ifcf, sizeof(struct ifconf), 0, sizeof(struct ifconf));
58     ifcf.ifc_len = 5 * sizeof(struct ifreq); /* 5, common data for test, no special meaning */
59     ifcf.ifc_buf = (char *)ifre;
60     int ret = ioctl(udpFd, SIOCGIFCONF, (char *)&ifcf);
61     ICUNIT_ASSERT_EQUAL(ret, 0, ret);
62 
63     char rst1[18]; /* 18, common data for test, no special meaning */
64     char *macPtr = NULL;
65     struct ifreq ifrTmp = {0};
66     struct sockaddr_in *addr = NULL;
67     int ifrCount = ifcf.ifc_len / sizeof(struct ifreq);
68     ICUNIT_GOTO_EQUAL(ifrCount, 2, ifrCount, EXIT); /* 2, common data for test, no special meaning */
69     ICUNIT_ASSERT_WITHIN_EQUAL(ifrCount, 2, INT_MAX, ifrCount); /* 2, common data for test, no special meaning */
70 EXIT:
71     for (int i = 0; i < ifrCount; i++) {
72         addr = (struct sockaddr_in *)&ifre[i].ifr_addr;
73         if (strcmp("lo", ifre[i].ifr_name) != 0) {
74             (void)memset_s(&ifrTmp, sizeof(struct ifreq), 0, sizeof(struct ifreq));
75             ret = strcpy_s(ifrTmp.ifr_name, sizeof(ifrTmp.ifr_name), ifre[i].ifr_name);
76             ICUNIT_ASSERT_EQUAL(ret, 0, ret);
77             ret = ioctl(udpFd, SIOCGIFHWADDR, &ifrTmp);
78             ICUNIT_ASSERT_EQUAL(ret, 0, ret);
79             macPtr = ifrTmp.ifr_hwaddr.sa_data;
80             ret = sprintf_s(rst1, sizeof(rst1), "%.2x:%.2x:%.2x:%.2x:%.2x:%.2x", *macPtr, *(macPtr + 1),
81                 *(macPtr + 2), *(macPtr + 3), *(macPtr + 4), *(macPtr + 5)); /* 1, 2, 3, 4, 5, common data for test, no special meaning */
82             ICUNIT_ASSERT_EQUAL((unsigned int)ret, strlen(rst1), (unsigned int)ret);
83         }
84     }
85     ret = close(udpFd);
86     ICUNIT_ASSERT_EQUAL(ret, 0, ret);
87     return 0;
88 }
89 
90 /**
91  * @tc.number    : SUB_KERNEL_NET_1000
92  * @tc.name      : test socket operation
93  * @tc.desc      : [C- SOFTWARE -0200]
94  */
95 LITE_TEST_CASE(ActsNetTestSuite, testSocketOpt, Function | MediumTest | Level2)
96 {
97     socklen_t len;
98     struct timeval timeout = {0};
99     int fd = socket(AF_INET, SOCK_STREAM, 0);
100     ICUNIT_ASSERT_NOT_EQUAL(fd, -1, fd); /* -1, common data for test, no special meaning */
101 
102     int error = -1; /* -1, common data for test, no special meaning */
103     len = sizeof(error);
104     int ret = getsockopt(fd, SOL_SOCKET, SO_ERROR, &error, &len);
105     ICUNIT_ASSERT_EQUAL(ret, 0, ret);
106     ICUNIT_ASSERT_EQUAL(error, 0, error);
107 
108     len = sizeof(timeout);
109     ret = getsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &timeout, &len);
110     ICUNIT_ASSERT_EQUAL(ret, 0, ret);
111 
112     timeout.tv_sec = 1000; /* 1000, common data for test, no special meaning */
113     len = sizeof(timeout);
114     ret = setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &timeout, len);
115     ICUNIT_ASSERT_EQUAL(ret, 0, ret);
116 
117     (void)memset_s(&timeout, len, 0, len);
118     ret = getsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &timeout, &len);
119     ICUNIT_ASSERT_EQUAL(ret, 0, ret);
120     ICUNIT_ASSERT_EQUAL(timeout.tv_sec, 1000, timeout.tv_sec); /* 1000, common data for test, no special meaning */
121 
122     int flag = 1; /* 1, common data for test, no special meaning */
123     ret = setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(flag));
124     ICUNIT_ASSERT_EQUAL(ret, 0, ret);
125 
126     flag = 0;
127     len = sizeof(flag);
128     ret = getsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &flag, &len);
129     ICUNIT_ASSERT_EQUAL(ret, 0, ret);
130     ICUNIT_ASSERT_EQUAL(flag, 1, flag); /* 1, common data for test, no special meaning */
131 
132     error = -1; /* -1, common data for test, no special meaning */
133     len = sizeof(error);
134     ret = getsockopt(fd, SOL_SOCKET, SO_ERROR, &error, &len);
135     ICUNIT_ASSERT_EQUAL(ret, 0, ret);
136     ICUNIT_ASSERT_EQUAL(error, 0, error);
137 
138     ret = close(fd);
139     ICUNIT_ASSERT_EQUAL(ret, 0, ret);
140     return 0;
141 }
142 
143 /**
144  * @tc.number    : SUB_KERNEL_NET_1100
145  * @tc.name      : test getsockname and getpeername invalid input
146  * @tc.desc      : [C- SOFTWARE -0200]
147  */
148 LITE_TEST_CASE(ActsNetTestSuite, testGetSocketNameInvalidInput, Function | MediumTest | Level3)
149 {
150     struct sockaddr addr = {0};
151     socklen_t addrLen = sizeof(addr);
152     int ret = getsockname(-1, &addr, &addrLen); /* -1, common data for test, no special meaning */
153     ICUNIT_ASSERT_EQUAL(ret, -1, ret); /* -1, common data for test, no special meaning */
154     ret = getpeername(-1, &addr, &addrLen); /* -1, common data for test, no special meaning */
155     ICUNIT_ASSERT_EQUAL(ret, -1, ret); /* -1, common data for test, no special meaning */
156     ret = getsockname(0, &addr, &addrLen);
157     ICUNIT_ASSERT_EQUAL(ret, -1, ret); /* -1, common data for test, no special meaning */
158     ret = getpeername(0, &addr, &addrLen);
159     ICUNIT_ASSERT_EQUAL(ret, -1, ret); /* -1, common data for test, no special meaning */
160     ret = getsockname(1, &addr, &addrLen); /* 1, common data for test, no special meaning */
161     ICUNIT_ASSERT_EQUAL(ret, -1, ret); /* -1, common data for test, no special meaning */
162     ret = getpeername(1, &addr, &addrLen); /* 1, common data for test, no special meaning */
163     ICUNIT_ASSERT_EQUAL(ret, -1, ret); /* -1, common data for test, no special meaning */
164     ret = getsockname(130, &addr, &addrLen); /* 130, common data for test, no special meaning */
165     ICUNIT_ASSERT_EQUAL(ret, -1, ret); /* -1, common data for test, no special meaning */
166     ret = getpeername(130, &addr, &addrLen); /* 130, common data for test, no special meaning */
167     ICUNIT_ASSERT_EQUAL(ret, -1, ret); /* -1, common data for test, no special meaning */
168     ret = getsockname(10, NULL, &addrLen); /* 10, common data for test, no special meaning */
169     ICUNIT_ASSERT_EQUAL(ret, -1, ret); /* -1, common data for test, no special meaning */
170     ret = getpeername(10, NULL, &addrLen); /* 10, common data for test, no special meaning */
171     ICUNIT_ASSERT_EQUAL(ret, -1, ret); /* -1, common data for test, no special meaning */
172     ret = getsockname(10, &addr, NULL); /* 10, common data for test, no special meaning */
173     ICUNIT_ASSERT_EQUAL(ret, -1, ret); /* -1, common data for test, no special meaning */
174     ret = getpeername(10, &addr, NULL); /* 10, common data for test, no special meaning */
175     ICUNIT_ASSERT_EQUAL(ret, -1, ret); /* -1, common data for test, no special meaning */
176     return 0;
177 }
178 
179 /**
180  * @tc.number    : SUB_KERNEL_NET_2400
181  * @tc.name      : test convert value from host to network byte order
182  * @tc.desc      : [C- SOFTWARE -0200]
183  */
184 LITE_TEST_CASE(ActsNetTestSuite, testHostToNetwork, Function | MediumTest | Level2)
185 {
186     uint32_t intInput1 = 0;
187     uint32_t intRst01 = htonl(intInput1);
188     uint32_t intInput2 = 65536; /* 65536, common data for test, no special meaning */
189     uint32_t intRst02 = htonl(intInput2);
190     uint16_t shortInput1 = 0;
191     uint16_t shortRst01 = htons(shortInput1);
192     uint16_t shortInput2 = 255; /* 255, common data for test, no special meaning */
193     uint16_t shortRst02 = htons(shortInput2);
194 
195 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
196     uint32_t expectZero = 0;
197     uint32_t expectForIinput2 = 256; /* 255, common data for test, no special meaning */
198     uint32_t expectForSinput2 = 65280; /* 65536, common data for test, no special meaning */
199     ICUNIT_ASSERT_EQUAL(intRst01, expectZero, intRst01);
200     ICUNIT_ASSERT_EQUAL(intRst02, expectForIinput2, intRst02);
201     ICUNIT_ASSERT_EQUAL(shortRst01, expectZero, shortRst01);
202     ICUNIT_ASSERT_EQUAL(shortRst02, expectForSinput2, shortRst02);
203 #else
204     ICUNIT_ASSERT_EQUAL(intRst01, intInput1, intRst01);
205     ICUNIT_ASSERT_EQUAL(intRst02, intInput2, intRst02);
206     ICUNIT_ASSERT_EQUAL(shortRst01, shortInput1, shortRst01);
207     ICUNIT_ASSERT_EQUAL(shortRst02, shortInput2, shortRst02);
208 #endif
209     return 0;
210 }
211 
212 /**
213  * @tc.number    : SUB_KERNEL_NET_2500
214  * @tc.name      : test convert value from network to host byte order
215  * @tc.desc      : [C- SOFTWARE -0200]
216  */
217 LITE_TEST_CASE(ActsNetTestSuite, testNetworkToHost, Function | MediumTest | Level2)
218 {
219     uint32_t intInput1 = 0;
220     uint32_t intRst1 = ntohl(intInput1);
221     uint32_t intInput2 = 65536; /* 65536, common data for test, no special meaning */
222     uint32_t intRst02 = ntohl(intInput2);
223     uint16_t shortInput1 = 0;
224     uint16_t shortRst01 = ntohs(shortInput1);
225     uint16_t shortInput2 = 255; /* 255, common data for test, no special meaning */
226     uint16_t shortRst02 = ntohs(shortInput2);
227 
228 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
229     uint32_t expectZero = 0;
230     uint32_t expectForIinput2 = 256; /* 255, common data for test, no special meaning */
231     uint32_t expectForSinput2 = 65280; /* 65536, common data for test, no special meaning */
232     ICUNIT_ASSERT_EQUAL(intRst1, expectZero, intRst1);
233     ICUNIT_ASSERT_EQUAL(intRst02, expectForIinput2, intRst02);
234     ICUNIT_ASSERT_EQUAL(shortRst01, expectZero, shortRst01);
235     ICUNIT_ASSERT_EQUAL(shortRst02, expectForSinput2, shortRst02);
236 #else
237     ICUNIT_ASSERT_EQUAL(intRst1, intInput1, intRst1);
238     ICUNIT_ASSERT_EQUAL(intRst02, intInput2, intRst02);
239     ICUNIT_ASSERT_EQUAL(shortRst01, shortInput1, shortRst01);
240     ICUNIT_ASSERT_EQUAL(shortRst02, shortInput2, shortRst02);
241 #endif
242     return 0;
243 }
244 
245 /**
246  * @tc.number    : SUB_KERNEL_NET_2600
247  * @tc.name      : test inet_pton IPv4 normal
248  * @tc.desc      : [C- SOFTWARE -0200]
249  */
250 LITE_TEST_CASE(ActsNetTestSuite, testInetPtonIpv4Normal, Function | MediumTest | Level2)
251 {
252     int ret;
253     struct in_addr rst = {0};
254     char cpAddrs[4][16] = {"10.58.212.100", "0.0.0.0", "255.0.0.0", "255.255.255.255"}; /* 4, 16, common data for test, no special meaning */
255 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
256     unsigned int expLittle[4] = {1691630090, 0, 255, 4294967295}; /* 4, common data for test, no special meaning */
257 #else
258     unsigned int expBig[4] = {171627620, 0, 4278190080, 4294967295}; /* 4, common data for test, no special meaning */
259 #endif
260 
261     for (int i = 0; i < 4; i++) { /* 4, common data for test, no special meaning */
262         ret = inet_pton(AF_INET, cpAddrs[i], &rst);
263         ICUNIT_ASSERT_EQUAL(ret, 1, ret);
264 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
265         ICUNIT_ASSERT_EQUAL(rst.s_addr, expLittle[i], rst.s_addr);
266 #else
267         ICUNIT_ASSERT_EQUAL(rst.s_addr, expBig[i], rst.s_addr);
268 #endif
269     }
270     return 0;
271 }
272 
273 /**
274  * @tc.number    : SUB_KERNEL_NET_2800
275  * @tc.name      : test inet_pton IPv6 normal
276  * @tc.desc      : [C- SOFTWARE -0200]
277  */
278 LITE_TEST_CASE(ActsNetTestSuite, testInetPtonIpv6Normal, Function | MediumTest | Level2)
279 {
280     int ret;
281     struct in6_addr rst = {0};
282     char cpAddrs[6][40] = {"0101:0101:0101:0101:1010:1010:1010:1010", "0:0:0:0:0:0:0:0", /* 6, 40, common data for test, no special meaning */
283         "FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF", "::", "1::", "0011:0011:0011:0011:11:11:11:11"};
284     for (int i = 0; i < 6; i++) { /* 6, common data for test, no special meaning */
285         ret = inet_pton(AF_INET6, cpAddrs[i], &rst);
286         ICUNIT_ASSERT_EQUAL(ret, 1, ret); /* 1, common data for test, no special meaning */
287     }
288     return 0;
289 }
290 
291 /**
292  * @tc.number    : SUB_KERNEL_NET_2900
293  * @tc.name      : test inet_pton IPv6 abnormal
294  * @tc.desc      : [C- SOFTWARE -0200]
295  */
296 LITE_TEST_CASE(ActsNetTestSuite, testInetPtonIpv6Abnormal, Function | MediumTest | Level2)
297 {
298     int ret;
299     struct in6_addr rst = {0};
300     char cpAddrs[7][40] = {"127.0.0.1", "f", ":", "0:0", "1:::", ":::::::", /* 7, 40, common data for test, no special meaning */
301         "1111:1111:1111:1111:1111:1111:1111:111G"};
302     for (int i = 0; i < 7; i++) { /* 7, common data for test, no special meaning */
303         ret = inet_pton(AF_INET6, cpAddrs[i], &rst);
304         ICUNIT_ASSERT_EQUAL(ret, 0, ret);
305     }
306     return 0;
307 }
308 
309 /**
310  * @tc.number    : SUB_KERNEL_NET_3000
311  * @tc.name      : test inet_pton with invalid family
312  * @tc.desc      : [C- SOFTWARE -0200]
313  */
314 LITE_TEST_CASE(ActsNetTestSuite, testInetPtonInvalidFamily, Function | MediumTest | Level2)
315 {
316     struct in_addr rst = {0};
317     int ret = inet_pton(AF_IPX, "127.0.0.1", &rst);
318     ICUNIT_ASSERT_EQUAL(ret, -1, ret); /* -1, common data for test, no special meaning */
319     ret = inet_pton(-1, "127.0.0.1", &rst);
320     ICUNIT_ASSERT_EQUAL(ret, -1, ret); /* -1, common data for test, no special meaning */
321     return 0;
322 }
323 
324 /**
325  * @tc.number    : SUB_KERNEL_NET_3100
326  * @tc.name      : test inet_ntop IPv4 normal
327  * @tc.desc      : [C- SOFTWARE -0200]
328  */
329 LITE_TEST_CASE(ActsNetTestSuite, testInetNtopIpv4Normal, Function | MediumTest | Level2)
330 {
331     const char *ret = NULL;
332     struct in_addr inputAddr = {0};
333     char rstBuff[INET_ADDRSTRLEN];
334 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
335     unsigned int inpLittle[4] = {0x64d43a0a, 0, 255, 4294967295}; /* 4, common data for test, no special meaning */
336 #else
337     unsigned int inpBig[4] = {171627620, 0, 4278190080, 4294967295}; /* 4, common data for test, no special meaning */
338 #endif
339 
340     char expAddrs[4][16] = {"10.58.212.100", "0.0.0.0", "255.0.0.0", "255.255.255.255"}; /* 4, 16, common data for test, no special meaning */
341     for (int i = 0; i < 4; i++) { /* 4, common data for test, no special meaning */
342 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
343         inputAddr.s_addr = inpLittle[i];
344 #else
345         inputAddr.s_addr = inpBig[i];
346 #endif
347         ret = inet_ntop(AF_INET, &inputAddr, rstBuff, sizeof(rstBuff));
348         if (ret == NULL) {
349             ICUNIT_ASSERT_NOT_EQUAL(ret, NULL, ret);
350         } else {
351             ICUNIT_ASSERT_STRING_EQUAL(ret, expAddrs[i], ret);
352             ICUNIT_ASSERT_STRING_EQUAL(rstBuff, expAddrs[i], rstBuff);
353         }
354     }
355     return 0;
356 }
357 
358 /**
359  * @tc.number    : SUB_KERNEL_NET_3200
360  * @tc.name      : test inet_ntop IPv4 boundary input
361  * @tc.desc      : [C- SOFTWARE -0200]
362  */
363 LITE_TEST_CASE(ActsNetTestSuite, testInetNtopIpv4Abnormal, Function | MediumTest | Level2)
364 {
365     const char *ret = NULL;
366     struct in_addr inputAddr = {0};
367     char rstBuff[INET_ADDRSTRLEN];
368     char expStr[2][16] = {"255.255.255.255", "0.0.0.0"}; /* 2, 16, common data for test, no special meaning */
369     for (int i = 0; i < 2; i++) { /* 2, common data for test, no special meaning */
370         inputAddr.s_addr = (i == 0 ? -1 : 4294967296); /* -1, 4294967296, common data for test, no special meaning */
371         ret = inet_ntop(AF_INET, &inputAddr, rstBuff, sizeof(rstBuff));
372         ICUNIT_ASSERT_NOT_EQUAL(ret, NULL, ret);
373         ICUNIT_ASSERT_STRING_EQUAL(ret, expStr[i], ret);
374         ICUNIT_ASSERT_STRING_EQUAL(rstBuff, expStr[i], rstBuff);
375     }
376     return 0;
377 }
378 
379 /**
380  * @tc.number    : SUB_KERNEL_NET_3500
381  * @tc.name      : test inet_ntop with invalid family
382  * @tc.desc      : [C- SOFTWARE -0200]
383  */
384 LITE_TEST_CASE(ActsNetTestSuite, testInetNtopInvalidFamily, Function | MediumTest | Level2)
385 {
386     int iret;
387     const char *ret = NULL;
388     struct in6_addr inputAddr = {0};
389     char rstBuff[INET6_ADDRSTRLEN];
390 
391     iret = inet_pton(AF_INET6, "1::", &inputAddr);
392     ICUNIT_ASSERT_EQUAL(iret, 1, iret); /* 1, common data for test, no special meaning */
393     ret = inet_ntop(AF_IPX, &inputAddr, rstBuff, sizeof(rstBuff));
394     ICUNIT_ASSERT_EQUAL(ret, NULL, ret);
395     ret = inet_ntop(-1, &inputAddr, rstBuff, sizeof(rstBuff)); /* -1, common data for test, no special meaning */
396     ICUNIT_ASSERT_EQUAL(ret, NULL, ret);
397     return 0;
398 }
399 
400 RUN_TEST_SUITE(ActsNetTestSuite);
401 
ActsNetTest(void)402 void ActsNetTest(void)
403 {
404     RUN_ONE_TESTCASE(testIoctlIfhwAddr);
405     RUN_ONE_TESTCASE(testSocketOpt);
406     RUN_ONE_TESTCASE(testGetSocketNameInvalidInput);
407     RUN_ONE_TESTCASE(testHostToNetwork);
408     RUN_ONE_TESTCASE(testNetworkToHost);
409     RUN_ONE_TESTCASE(testInetPtonIpv4Normal);
410     RUN_ONE_TESTCASE(testInetPtonInvalidFamily);
411     RUN_ONE_TESTCASE(testInetNtopIpv4Normal);
412     RUN_ONE_TESTCASE(testInetNtopIpv4Abnormal);
413 #if (LWIP_IPV6 == 1)
414     RUN_ONE_TESTCASE(testInetPtonIpv6Normal);
415     RUN_ONE_TESTCASE(testInetPtonIpv6Abnormal);
416     RUN_ONE_TESTCASE(testInetNtopInvalidFamily);
417 #endif
418 }
419 
420