[LTP] [PATCH v2] syscalls/brk: add direct syscall tst_variant

Teo Couprie Diaz teo.coupriediaz@arm.com
Mon Dec 12 19:28:21 CET 2022


Hi Petr,

On 12/12/2022 15:22, Petr Vorel wrote:
> Hi Richie,
>
>> Cyril, Petr, Would you like to add your reviewed by tags? Then we can
>> merge this.
> By accident I reply to my points to v1 [1].
> To copy it here:
>
> 1) There are warnings:
> brk02.c: In function ‘brk_variants’:
> brk02.c:26:28: warning: cast to pointer from integer of different size
> [-Wint-to-pointer-cast]
>     26 |                 brk_addr = (void *)brk(addr);
>           |                            ^
>
> 2) make check reports errors which are easily fixed.
>
> Teo replied [2], that he's going to fix it. I thought I had set it
> "Changes requested", but now I see "Needs Review / ACK". Setting it to
> "Changes requested".

I believe the points you raised are fixed in the v2, on top of this thread.
Re-applying it on top of master on my side doesn't give me any warnings 
for the brk tests, as I do not cast the result from the libc brk 
anymore, and make check reports existing issues with the name of the 
function, but no style problems that did exist in v1. (I don't mind 
changing them if you want, but they are present on master as well).

If you give a quick look at the patch v2 you'll see that indeed there is 
no more (void *)brk(addr) or such that generated the warnings, for 
example. (The syscalls still need it, as they return the break directly 
rather than an error, which is what the libc wrapper does.)

I might be missing something, please do tell me if that's the case ! But 
I believe that the v2 _should_ be free of those issues.

> Kind regards,
> Petr
>
> [1] https://lore.kernel.org/ltp/20221206140421.GB21839@pevik/
> [2] https://lore.kernel.org/ltp/fe1c5bac-0ed1-92ef-3c28-e3758dc3465d@arm.com/
Thanks for taking the time.
Best regards,
Téo


More information about the ltp mailing list