[LTP] OpenPOSIX: Add common entry point function for all tests
Martin Doucha
mdoucha@suse.cz
Fri Apr 17 15:35:21 CEST 2026
Hi!
On 4/17/26 15:09, Petr Vorel wrote:
> Hi Martin,
>
>> Hi Martin,
>
>> On Thu, 16 Apr 2026, Martin Doucha wrote:
>>> OpenPOSIX: Add common entry point function for all tests
>
>>> Add a new shared source file implementing the main() function and rename
>>> the existing main() functions in test case sources to test_main(). This
>>> allows adding custom debug code to all test cases at once.
>
>> [...]
>
>>> diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/assertions.xml b/...
>>> - NOTE: that the thread in which main() was originally invoked is different
>>> + NOTE: that the thread in which test_main() was originally invoked is different
>
>> This changes verbatim POSIX specification text. The assertions.xml files
>> quote the POSIX standard, which defines behaviour relative to main() — the C
>> entry point, not an LTP-internal function name. Revert these hunks in both
>> pthread_create/assertions.xml and pthread_exit/assertions.xml.
>
> +1
This "issue" is nonsense. I've checked the XML files and the assertions
are still correct as is regardless of renaming a few functions. The
pthread_create() and pthread_exit() specification applies special
treatment to the main thread and adding one more function call between
the main() function and the test code does not change that.
>>> diff --git a/.../aio_write/9-2.c b/.../aio_write/9-2.c
>>> +int test_main(int argc, char** argv)
>
>> s/char** argv/char **argv/ to match the style used everywhere else.
This typo is actually in conformance/interfaces/strcpy/1-1.c (line 23793
of the patch). Please change the test_main() signature to this during merge:
int test_main(int argc PTS_ATTRIBUTE_UNUSED, char **argv
PTS_ATTRIBUTE_UNUSED)
I don't think it makes sense to send another 1MB patch to fix one line.
--
Martin Doucha mdoucha@suse.cz
SW Quality Engineer
SUSE LINUX, s.r.o.
CORSO IIa
Krizikova 148/34
186 00 Prague 8
Czech Republic
More information about the ltp
mailing list