mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Deflake process_vm_read_write test.
Passing an uninitialized iovec can cause process_vm_readv/writev to fail for reasons other than the intended one. PiperOrigin-RevId: 708414541
This commit is contained in:
@@ -350,11 +350,15 @@ TEST(ProcessVMInvalidTest, NULLRemoteIovec) {
|
||||
}
|
||||
|
||||
TEST(ProcessVMInvalidTest, ProcessNoExist) {
|
||||
std::string contents = "3263827";
|
||||
struct iovec iov;
|
||||
iov.iov_base = contents.data();
|
||||
iov.iov_len = contents.size();
|
||||
|
||||
EXPECT_THAT(process_vm_readv(-1, &iov, 1, &iov, 1, 0),
|
||||
SyscallFailsWithErrno(::testing::AnyOf(ESRCH, EFAULT)));
|
||||
SyscallFailsWithErrno(ESRCH));
|
||||
EXPECT_THAT(process_vm_writev(-1, &iov, 1, &iov, 1, 0),
|
||||
SyscallFailsWithErrno(::testing::AnyOf(ESRCH, EFAULT)));
|
||||
SyscallFailsWithErrno(ESRCH));
|
||||
}
|
||||
|
||||
TEST(ProcessVMInvalidTest, GreaterThanIOV_MAX) {
|
||||
|
||||
Reference in New Issue
Block a user