[LTP] [PATCH 1/3] link03: Convert docs to docparse

Yang Xu (Fujitsu) xuyang2018.jy@fujitsu.com
Tue Oct 31 08:22:22 CET 2023


Hi Petr,

I've noticed that the test objectives of link03 and link05 are very similar, and the description of link05's test has no relevance to the test code.
Therefore, I think we can simply remove link03 and update the test description of link05 to replace link03.
As for your previous suggestions for modifying the link05 code, I don't have a good solution for this.

The specific information is as follows:
LINK: http://patchwork.ozlabs.org/project/ltp/patch/1697021709-22916-2-git-send-email-xuyang2018.jy@fujitsu.com/


Best Regards,
Yang Xu


>Hi Petr,

>>Hi Xu,

>>Also, while you are at it, could you please fix these warnings?

>OK. I will pay attention to it.

>>$ make link03

>>link03.c: In function ‘main’:
>>link03.c:104:22: warning: ‘%d’ directive writing between 1 and 10 bytes into a region of size between 1 and 255 [-Wformat-overflow=]
>> 104 |    sprintf(lname, "%s%d", fname, i);
>>     |                      ^~
>>link03.c:104:19: note: directive argument in the range [1, 2147483646]
>>  104 |    sprintf(lname, "%s%d", fname, i);
>>     |                   ^~~~~~
>>link03.c:104:4: note: ‘sprintf’ output between 2 and 265 bytes into a destination of size 255
>>  104 |    sprintf(lname, "%s%d", fname, i);
>>     |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>link03.c:123:22: warning: ‘%d’ directive writing between 1 and 10 bytes into a region of size between 1 and 255 [-Wformat-overflow=]
>>  123 |    sprintf(lname, "%s%d", fname, i);
>>     |                      ^~
>>link03.c:123:19: note: directive argument in the range [1, 2147483646]
>>  123 |    sprintf(lname, "%s%d", fname, i);
>>      |                   ^~~~~~
>>link03.c:123:4: note: ‘sprintf’ output between 2 and 265 bytes into a destination of size 255
>>  123 |    sprintf(lname, "%s%d", fname, i);
>>      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>link03.c:138:22: warning: ‘%d’ directive writing between 1 and 10 bytes into a region of size between 1 and 255 [-Wformat-overflow=]
>>  138 |    sprintf(lname, "%s%d", fname, i);
>>      |                      ^~
>>link03.c:138:19: note: directive argument in the range [1, 2147483646]
>>  138 |    sprintf(lname, "%s%d", fname, i);
>>      |                   ^~~~~~
>>link03.c:138:4: note: ‘sprintf’ output between 2 and 265 bytes into a destination of size 255
>>  138 |    sprintf(lname, "%s%d", fname, i);

>>$ make check-link03
>>CHECK testcases/kernel/syscalls/link/link03.c
>>link03.c:1: WARNING: Missing or malformed SPDX-License-Identifier tag in line 1
>>link03.c:33: ERROR: do not initialise statics to 0
>>link03.c:55: ERROR: code indent should use tabs where possible
>>link03.c:90: ERROR: code indent should use tabs where possible
>>link03.c:100: ERROR: code indent should use tabs where possible

>>Thanks!

>>Kind regards,
>>Petr

>Best Regards
>Yang Xu


More information about the ltp mailing list