public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Martin Doucha <mdoucha@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] OpenPOSIX: Add common entry point function for all tests
Date: Thu, 16 Apr 2026 20:53:29 +0200	[thread overview]
Message-ID: <20260416185329.GA385137@pevik> (raw)
In-Reply-To: <20260416144213.27221-1-mdoucha@suse.cz>

Hi all,

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

Reviewed-by: Petr Vorel <pvorel@suse.cz>
Martin, thanks!

Li, Jan, hopefully you don't mind. We'd prefer not having to keep rebasing.

> Signed-off-by: Martin Doucha <mdoucha@suse.cz>
> ---
>  testcases/open_posix_testsuite/Makefile       | 13 +++---
>  .../conformance/behavior/WIFEXITED/1-1.c      |  2 +-
>  .../conformance/interfaces/nanosleep/3-2.c    |  2 +-
...
>  testcases/open_posix_testsuite/lib/Makefile   | 18 ++++++++
>  testcases/open_posix_testsuite/lib/common.c   | 13 ++++++
>  .../scripts/generate-makefiles.sh             | 10 ++++-
...
>  1695 files changed, 1974 insertions(+), 1920 deletions(-)
>  create mode 100644 testcases/open_posix_testsuite/lib/Makefile
>  create mode 100644 testcases/open_posix_testsuite/lib/common.c

...
> diff --git a/testcases/open_posix_testsuite/conformance/behavior/WIFEXITED/1-1.c b/testcases/open_posix_testsuite/conformance/behavior/WIFEXITED/1-1.c
> index ae021917c..6f7044b4a 100644
> --- a/testcases/open_posix_testsuite/conformance/behavior/WIFEXITED/1-1.c
> +++ b/testcases/open_posix_testsuite/conformance/behavior/WIFEXITED/1-1.c
> @@ -11,7 +11,7 @@
>  #include <unistd.h>
>  #include "posixtest.h"

> -int main()
> +int test_main(int argc PTS_ATTRIBUTE_UNUSED, char **argv PTS_ATTRIBUTE_UNUSED)
>  {
>  	int s;
...
> new file mode 100644
> index 000000000..ad6a9d7e6
> --- /dev/null
> +++ b/testcases/open_posix_testsuite/lib/Makefile
> @@ -0,0 +1,18 @@
> +top_srcdir?=		..
> +subdir=			lib
> +
> +AR?=			ar
> +RANLIB?=		ranlib
> +CFLAGS+=		-I$(top_srcdir)/include
> +
> +
> +vpath %.c $(top_srcdir)/$(subdir)
> +
> +all: libcommon.a
> +
> +clean:
> +	rm -f libcommon.a *.o
> +
> +libcommon.a: common.o
> +	$(AR) -rc "$@" $^
> +	$(RANLIB) "$@"
> diff --git a/testcases/open_posix_testsuite/lib/common.c b/testcases/open_posix_testsuite/lib/common.c
> new file mode 100644
> index 000000000..71e9afb2b
> --- /dev/null
> +++ b/testcases/open_posix_testsuite/lib/common.c
> @@ -0,0 +1,13 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later
> +/*
> + * Copyright (C) 2026 SUSE LLC <mdoucha@suse.cz>
> + *
> + * OpenPOSIX test bootstrap
> + */
> +
> +int test_main(int argc, char **argv);
> +
> +int main(int argc, char **argv)
> +{
> +	return test_main(argc, argv);
> +}

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

  parent reply	other threads:[~2026-04-16 18:54 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
2026-04-16 18:53 ` Petr Vorel [this message]
2026-04-17  0:30   ` [LTP] [PATCH] " 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=20260416185329.GA385137@pevik \
    --to=pvorel@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=mdoucha@suse.cz \
    /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