[LTP] [PATCH] open04.c: convert to new LTP API

Avinesh Kumar akumar@suse.de
Thu Sep 1 18:07:47 CEST 2022


Hi Petr,

On Thursday, September 1, 2022 12:02:55 PM IST Petr Vorel wrote:
> Hi Avinesh,
> 
> I suggest to merge with these fixes:
> 
> * added free (if needed - that was in the original source)
> * fixed cleanup (don't run SAFE_CLOSE() if previous SAFE_OPEN() or SAFE_MALLOC()
>   failed)
> * use TST_EXP_FAIL() - the same result as TST_EXP_FAIL2() with shorter code
TST_EXP_FAIL2() is correct here as you mentioned in previous reply.
> * allocate memory needed (it's actually -2)
fds_limit(1024) - first(3) is correct as we need to allocate memory for1021 int fds.
Test executes fine even with (fds_limit - first - 2) probably because malloc allocating
more than requested memory.

> * #define FNAME "open04"
> 
> If it's ok, I'll merge it.
please go ahead and merge with rest of the suggestions, or let me know if I should
sent v2.


Thanks,
Avinesh




More information about the ltp mailing list