summaryrefslogtreecommitdiffhomepage
path: root/test/syscalls
diff options
context:
space:
mode:
authorGhanan Gowripalan <ghanan@google.com>2021-10-26 12:37:43 -0700
committergVisor bot <gvisor-bot@google.com>2021-10-26 12:41:16 -0700
commit07b22740a11632c0641657cc4dd145bd0d1e5afb (patch)
tree036f815fd84098a5f4e6f573ba4cb1b7834ff1e6 /test/syscalls
parent763d7e6e396d8d4c67d650e02bd2350b22606ada (diff)
Run packet socket tests on Fuchsia
Bug: https://fxbug.dev/81592 PiperOrigin-RevId: 405710156
Diffstat (limited to 'test/syscalls')
-rw-r--r--test/syscalls/linux/packet_socket.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/syscalls/linux/packet_socket.cc b/test/syscalls/linux/packet_socket.cc
index c706848fc..e645f61e8 100644
--- a/test/syscalls/linux/packet_socket.cc
+++ b/test/syscalls/linux/packet_socket.cc
@@ -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 {