提交 0fa7b4a1 编写于 作者: L limeng151 提交者: 余明星

fixed 0776e344 from https://gitee.com/mingxingyu/xts_acts/pulls/1516

修改里面存在的敏感信息
Signed-off-by: Nlimeng151 <limeng151@huawei.com>
Change-Id: Icfcf7ac0f47459914d102a6c722a3c84eef3ad41
上级 74a82038
...@@ -1072,8 +1072,7 @@ HWTEST_F(ActsNetTest, testIoctlIfconf, Function | MediumTest | Level2) ...@@ -1072,8 +1072,7 @@ HWTEST_F(ActsNetTest, testIoctlIfconf, Function | MediumTest | Level2)
int ifrCount = ifc.ifc_len / sizeof(struct ifreq); int ifrCount = ifc.ifc_len / sizeof(struct ifreq);
EXPECT_TRUE(ifrCount >= 2); EXPECT_TRUE(ifrCount >= 2);
for (int i = 0; i < ifrCount; i++) { for (int i = 0; i < ifrCount; i++) {
printf("[###]interface name is %s, ip addr is %s\n", ifr[i].ifr_name, printf("[###]interface name is %s\n", ifr[i].ifr_name);
inet_ntoa(((struct sockaddr_in *)&ifr[i].ifr_addr)->sin_addr));
} }
ret = close(udpFd); ret = close(udpFd);
EXPECT_EQ(0, ret); EXPECT_EQ(0, ret);
...@@ -1163,8 +1162,7 @@ HWTEST_F(ActsNetTest, testIoctlIfnetAddrOthers, Function | MediumTest | Level2) ...@@ -1163,8 +1162,7 @@ HWTEST_F(ActsNetTest, testIoctlIfnetAddrOthers, Function | MediumTest | Level2)
ASSERT_EQ(0, ret) << "ioctl fail[SIOCGIFADDR], errinfo[" << strerror(errno) << "]"; ASSERT_EQ(0, ret) << "ioctl fail[SIOCGIFADDR], errinfo[" << strerror(errno) << "]";
addr2 = (struct sockaddr_in *)&ifrTmp.ifr_addr; addr2 = (struct sockaddr_in *)&ifrTmp.ifr_addr;
EXPECT_EQ(addr1->sin_addr.s_addr, addr2->sin_addr.s_addr); EXPECT_EQ(addr1->sin_addr.s_addr, addr2->sin_addr.s_addr);
printf("[###]get %s addr1[%s],addr2[%s]\n", ifr[i].ifr_name, inet_ntoa(addr1->sin_addr), printf("[###]get %s\n", ifr[i].ifr_name);
inet_ntoa(addr2->sin_addr));
// set inet addr // set inet addr
addr2->sin_addr.s_addr = addr1->sin_addr.s_addr; addr2->sin_addr.s_addr = addr1->sin_addr.s_addr;
...@@ -1223,7 +1221,7 @@ HWTEST_F(ActsNetTest, testIoctlIfhwAddr, Function | MediumTest | Level2) ...@@ -1223,7 +1221,7 @@ HWTEST_F(ActsNetTest, testIoctlIfhwAddr, Function | MediumTest | Level2)
ret = sprintf_s(rst1, sizeof(rst1), "%.2x:%.2x:%.2x:%.2x:%.2x:%.2x", *macPtr, *(macPtr+1), ret = sprintf_s(rst1, sizeof(rst1), "%.2x:%.2x:%.2x:%.2x:%.2x:%.2x", *macPtr, *(macPtr+1),
*(macPtr+2), *(macPtr+3), *(macPtr+4), *(macPtr+5)); *(macPtr+2), *(macPtr+3), *(macPtr+4), *(macPtr+5));
EXPECT_EQ(strlen(rst1), (unsigned int)ret) << "sprintf_s error"; EXPECT_EQ(strlen(rst1), (unsigned int)ret) << "sprintf_s error";
printf("[###]get %s rst[%s]\n", ifrTmp.ifr_name, rst1); printf("[###]get %s \n", ifrTmp.ifr_name);
} }
} }
ret = close(udpFd); ret = close(udpFd);
...@@ -1745,7 +1743,7 @@ HWTEST_F(ActsNetTest, testInetPtonIpv4Normal, Function | MediumTest | Level2) ...@@ -1745,7 +1743,7 @@ HWTEST_F(ActsNetTest, testInetPtonIpv4Normal, Function | MediumTest | Level2)
#else #else
EXPECT_EQ(expectBig[i], rst.s_addr); EXPECT_EQ(expectBig[i], rst.s_addr);
#endif #endif
printf("[###]inet_pton %s: un[%u],s[%d],hex[%x]\n", cpAddrs[i], rst.s_addr, rst.s_addr, rst.s_addr); printf("[###]inet_pton : un[%u],s[%d],hex[%x]\n", rst.s_addr, rst.s_addr, rst.s_addr);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册