Run packet socket tests on Fuchsia

Bug: https://fxbug.dev/81592
PiperOrigin-RevId: 405710156
This commit is contained in:
Ghanan Gowripalan 2021-10-26 12:37:43 -07:00 committed by gVisor bot
parent 763d7e6e39
commit 07b22740a1
1 changed files with 5 additions and 2 deletions

View File

@ -94,7 +94,9 @@ TEST_P(PacketSocketTest, GetSockName) {
Eq(sizeof(addr) - sizeof(addr.sll_addr))));
EXPECT_EQ(addr.sll_family, AF_PACKET);
EXPECT_EQ(addr.sll_ifindex, 0);
if (IsRunningOnGvisor() && !IsRunningWithHostinet()) {
if (IsRunningOnGvisor() && !IsRunningWithHostinet() &&
GvisorPlatform() != Platform::kFuchsia) {
// TODO(https://gvisor.dev/issue/6530): Do not assume all interfaces have
// an ethernet address.
EXPECT_EQ(addr.sll_halen, ETH_ALEN);
@ -130,7 +132,8 @@ TEST_P(PacketSocketTest, GetSockName) {
EXPECT_EQ(addr.sll_addr[i], 0) << "byte mismatch @ idx = " << i;
}
EXPECT_EQ(ntohs(addr.sll_protocol), htons(addr.sll_protocol));
if (IsRunningOnGvisor() && !IsRunningWithHostinet()) {
if (IsRunningOnGvisor() && !IsRunningWithHostinet() &&
GvisorPlatform() != Platform::kFuchsia) {
// TODO(https://gvisor.dev/issue/6621): Support populating sll_hatype.
EXPECT_EQ(addr.sll_hatype, 0);
} else {