[LTP] [PATCH v2] syscalls/mmap08: Use macro TST_EXP_FAIL_PTR_VOID()
Petr Vorel
pvorel@suse.cz
Mon May 13 15:18:51 CEST 2024
Hi Avinesh,
...
> static void run(void)
> {
> - TESTPTR(mmap(NULL, page_sz, PROT_WRITE, MAP_FILE | MAP_SHARED, fd, 0));
> + TST_EXP_FAIL_PTR_VOID(mmap(NULL, page_sz, PROT_WRITE, MAP_FILE | MAP_SHARED, fd, 0), EBADF);
> - if (TST_RET_PTR != MAP_FAILED) {
> - tst_res(TFAIL, "mmap() passed unexpectedly");
> + if(TST_RET_PTR != MAP_FAILED) {
Whitespace was broken (missing space after "if") + brackets were not needed any
more. I fixed it and merged together with mmap06 patch.
Thank you!
Kind regards,
Petr
More information about the ltp
mailing list