[LTP] [PATCH v2] syscalls/mmap14: Rewrite test using new LTP API
Richard Palethorpe
rpalethorpe@suse.de
Mon Oct 9 12:59:42 CEST 2023
Hello,
Avinesh Kumar <akumar@suse.de> writes:
>
> -static void setup(void)
> +static void run(void)
> {
> - tst_require_root();
> + unsigned int sz_before, sz_after, sz_diff;
>
> - tst_sig(FORK, DEF_HANDLER, cleanup);
> + getvmlck(&sz_before);
>
> - TEST_PAUSE;
> -}
> + if (((sz_before * 1024) + MMAPSIZE) > rlim.rlim_cur)
> + tst_brk(TBROK, "Trying to exceed RLIMIT_MEMLOCK limit");
Should this be TCONF not TBROK?
--
Thank you,
Richard.
More information about the ltp
mailing list