Skip to content

Commit

Permalink
test/mkdir: test known bad address
Browse files Browse the repository at this point in the history
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
axboe committed Aug 30, 2024
1 parent 92bf050 commit 232d6d9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/mkdir.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ int main(int argc, char *argv[])
goto err1;
}

ret = do_mkdirat(&ring, (const char *) (uintptr_t) 0x1234);
if (ret != -EFAULT) {
fprintf(stderr, "do_mkdirat bad address: %d\n", ret);
goto err1;
}

unlinkat(AT_FDCWD, fn, AT_REMOVEDIR);
io_uring_queue_exit(&ring);
return T_EXIT_PASS;
Expand Down

0 comments on commit 232d6d9

Please sign in to comment.