Skip to content

Commit

Permalink
fix(test): improve process_vm_readvX failure test
Browse files Browse the repository at this point in the history
Signed-off-by: Roberto Scolaro <[email protected]>
  • Loading branch information
therealbobo authored and poiana committed Feb 29, 2024
1 parent d753477 commit bf3b9d5
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ TEST(SyscallExit, process_vm_readvX_failure)

/*=============================== TRIGGER SYSCALL ===========================*/

char buf[16];
iovec iov[] = {{buf, 16}};
// Setting the iov to NULL will cause the failure of the syscall.
iovec *iov = NULL;
int32_t iovcnt = 7;

size_t res = syscall(__NR_process_vm_readv, getpid(), iov, iovcnt, iov, iovcnt, 1);
size_t res = syscall(__NR_process_vm_readv, getpid(), iov, iovcnt, iov, iovcnt, 0);
assert_syscall_state(SYSCALL_FAILURE, "process_vm_readv", res, EQUAL, -1);

/*=============================== TRIGGER SYSCALL ===========================*/
Expand Down

0 comments on commit bf3b9d5

Please sign in to comment.