]>
git.saurik.com Git - apple/xnu.git/blob - tests/fduiomove.c
1 #include <darwintest.h>
2 #include <darwintest_utils.h>
3 #include <crt_externs.h>
10 T_META_RUN_CONCURRENTLY(true),
11 T_META_LTEPHASE(LTE_POSTINIT
)
14 T_DECL(fd_invalid_pread
, "Test for 66711697: make sure we get EFAULT")
19 fd
= open(*_NSGetProgname(), O_RDONLY
);
20 T_ASSERT_POSIX_SUCCESS(fd
, "open(self)");
22 rc
= pread(fd
, (void *)~0, 64 << 10, 0);
23 T_ASSERT_POSIX_FAILURE(rc
, EFAULT
, "pread should fail with EFAULT");