From 34152da7e5c3c81253ffe4a433c95789d3002a8e Mon Sep 17 00:00:00 2001 From: Kevin Krakauer Date: Wed, 16 Jun 2021 14:40:21 -0700 Subject: Fix broken hdrincl test Fixes #3159. PiperOrigin-RevId: 379814096 --- test/syscalls/linux/raw_socket_hdrincl.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'test/syscalls/linux') diff --git a/test/syscalls/linux/raw_socket_hdrincl.cc b/test/syscalls/linux/raw_socket_hdrincl.cc index 8b3d02d97..fac473114 100644 --- a/test/syscalls/linux/raw_socket_hdrincl.cc +++ b/test/syscalls/linux/raw_socket_hdrincl.cc @@ -177,11 +177,10 @@ TEST_F(RawHDRINCL, ConnectToLoopback) { SyscallSucceeds()); } -// FIXME(gvisor.dev/issue/3159): Test currently flaky. -TEST_F(RawHDRINCL, DISABLED_SendWithoutConnectSucceeds) { +TEST_F(RawHDRINCL, SendWithoutConnectFails) { struct iphdr hdr = LoopbackHeader(); ASSERT_THAT(send(socket_, &hdr, sizeof(hdr), 0), - SyscallSucceedsWithValue(sizeof(hdr))); + SyscallFailsWithErrno(EDESTADDRREQ)); } // HDRINCL implies write-only. Verify that we can't read a packet sent to -- cgit v1.2.3