Skip to content

Commit 9034347

Browse files
ayushr2gvisor-bot
authored andcommitted
Accept EMSGSIZE in native run for RawPacketMsgSizeTest.SpliceTooLong.
This behavior was fixed in 2dc334f1a63a8 ("splice, net: Use sendmsg(MSG_SPLICE_PAGES) rather than ->sendpage()"), Linux 6.5. PiperOrigin-RevId: 762121005
1 parent bae2ea3 commit 9034347

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/syscalls/linux/packet_socket_raw.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -707,9 +707,10 @@ TEST_P(RawPacketMsgSizeTest, SpliceTooLong) {
707707
if (IsRunningOnGvisor()) {
708708
EXPECT_THAT(n, SyscallFailsWithErrno(EMSGSIZE));
709709
} else {
710-
// TODO(gvisor.dev/issue/138): Linux sends out multiple UDP datagrams, each
711-
// of the size of a page.
712-
EXPECT_THAT(n, SyscallSucceedsWithValue(sizeof(buf)));
710+
// Older versions of Linux sends out multiple UDP datagrams, each of the
711+
// size of a page. Since Linux 6.5, Linux also returns EMSGSIZE.
712+
EXPECT_THAT(n, AnyOf(SyscallFailsWithErrno(EMSGSIZE),
713+
SyscallSucceedsWithValue(sizeof(buf))));
713714
}
714715
}
715716
#endif // __Fuchsia__

0 commit comments

Comments
 (0)