public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Martin Doucha <martin.doucha@suse.com>
Cc: ltp@lists.linux.it, linuxtestproject.agent@gmail.com
Subject: Re: [LTP] OpenPOSIX: Add common entry point function for all tests
Date: Fri, 17 Apr 2026 16:33:17 +0200	[thread overview]
Message-ID: <20260417143317.GB420978@pevik> (raw)
In-Reply-To: <20260417130920.GA420978@pevik>

Hi Martin,

> 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

> > > 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.

> +1

> @Martin, will you please send v2?


@Martin, or I can apply the following diff if you agree.

Kind regards,
Petr

> Kind regards,
> Petr

diff --git testcases/open_posix_testsuite/conformance/interfaces/pthread_create/assertions.xml testcases/open_posix_testsuite/conformance/interfaces/pthread_create/assertions.xml
index 9d3cda4d87..7a5e60557d 100644
--- testcases/open_posix_testsuite/conformance/interfaces/pthread_create/assertions.xml
+++ testcases/open_posix_testsuite/conformance/interfaces/pthread_create/assertions.xml
@@ -33,12 +33,12 @@
   If the 'start_routine' returns, the effect shall be as if there was an
   implicit call to pthread_exit() using the return value of 'start_routine'
   as the exit status.
-  NOTE: that the thread in which test_main() was originally invoked is different
+  NOTE: that the thread in which main() was originally invoked is different
   from this
   </assertion>
   <assertion id="7" tag="ref:XSH6:32848:32849">
-  When it returns from test_main(), the effect shall be as if there was an implicit
-  call to exit() using the return value of test_main() as the exit status.
+  When it returns from main(), the effect shall be as if there was an implicit
+  call to exit() using the return value of main() as the exit status.
   </assertion>
   <assertion id="8" tag="ref:XSH6:32850:32852">
   The signal state of the new thread will be initialized as so:
diff --git testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/assertions.xml testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/assertions.xml
index 15d2a09a11..f34f6a197e 100644
--- testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/assertions.xml
+++ testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/assertions.xml
@@ -24,7 +24,7 @@
   </assertion>
   <assertion id="5" tag="ref:XSH6:33031:33033">
   An implicit call to pthread_exit() is made when a thread other than the
-  thread in which test_main() was first invoked returns from the start routine that
+  thread in which main() was first invoked returns from the start routine that
   was used to create it.  The function's return value shall serve as the
   thread's exit status.
   </assertion>
diff --git testcases/open_posix_testsuite/conformance/interfaces/strcpy/1-1.c testcases/open_posix_testsuite/conformance/interfaces/strcpy/1-1.c
index 441654ed6c..e783fc92ea 100644
--- testcases/open_posix_testsuite/conformance/interfaces/strcpy/1-1.c
+++ testcases/open_posix_testsuite/conformance/interfaces/strcpy/1-1.c
@@ -44,7 +44,7 @@ static char *random_string(int len)
     return output_string;
 }
 
-int test_main(int argc, char** argv)
+int test_main(int argc PTS_ATTRIBUTE_UNUSED, char **argv PTS_ATTRIBUTE_UNUSED)
 {
     char *ret_str;
     int i;

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  parent reply	other threads:[~2026-04-17 14:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260416144213.27221-1-mdoucha@suse.cz>
2026-04-16 18:36 ` [LTP] OpenPOSIX: Add common entry point function for all tests linuxtestproject.agent
2026-04-17 13:09   ` Petr Vorel
2026-04-17 13:35     ` Martin Doucha
2026-04-17 14:44       ` Petr Vorel
2026-04-17 14:33     ` Petr Vorel [this message]
2026-04-16 18:53 ` [LTP] [PATCH] " Petr Vorel
2026-04-17  0:30   ` Li Wang via ltp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260417143317.GB420978@pevik \
    --to=pvorel@suse.cz \
    --cc=linuxtestproject.agent@gmail.com \
    --cc=ltp@lists.linux.it \
    --cc=martin.doucha@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox