Force sendfile(2) to copy data in test

PiperOrigin-RevId: 490324920
This commit is contained in:
Fabricio Voznika
2022-11-22 13:40:33 -08:00
committed by gVisor bot
parent 346aa6fef2
commit 03e92949e5
+1 -1
View File
@@ -471,7 +471,7 @@ TEST(SendFileTest, SendToNotARegularFile) {
ASSERT_NO_ERRNO_AND_VALUE(Open(out_file.path(), O_WRONLY));
// Receive an error since a directory is not a regular file.
EXPECT_THAT(sendfile(outf.get(), inf.get(), nullptr, 0),
EXPECT_THAT(sendfile(outf.get(), inf.get(), nullptr, 1),
SyscallFailsWithErrno(EINVAL));
}