Linux Test Project
 help / color / mirror / Atom feed
* [LTP] [PATCH] clone10: add support archs
@ 2026-01-22 10:26 Li Wang via ltp
  2026-01-22 10:41 ` Jan Stancek via ltp
  0 siblings, 1 reply; 7+ messages in thread
From: Li Wang via ltp @ 2026-01-22 10:26 UTC (permalink / raw)
  To: ltp

Signed-off-by: Li Wang <liwang@redhat.com>
---
 testcases/kernel/syscalls/clone/clone10.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/testcases/kernel/syscalls/clone/clone10.c b/testcases/kernel/syscalls/clone/clone10.c
index a52ac3568..9ffb49c37 100644
--- a/testcases/kernel/syscalls/clone/clone10.c
+++ b/testcases/kernel/syscalls/clone/clone10.c
@@ -91,4 +91,10 @@ static struct tst_test test = {
 	.cleanup = cleanup,
 	.needs_checkpoints = 1,
 	.test_all = verify_tls,
+	.supported_archs = (const char *const []) {
+		"x86_64",
+		"aarch64",
+		"s390x",
+		NULL
+	}
 };
-- 
2.52.0


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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [LTP] [PATCH] clone10: add support archs
  2026-01-22 10:26 [LTP] [PATCH] clone10: add support archs Li Wang via ltp
@ 2026-01-22 10:41 ` Jan Stancek via ltp
  2026-01-22 12:28   ` Wei Gao via ltp
  2026-01-22 12:31   ` Petr Vorel
  0 siblings, 2 replies; 7+ messages in thread
From: Jan Stancek via ltp @ 2026-01-22 10:41 UTC (permalink / raw)
  To: Li Wang; +Cc: ltp

On Thu, Jan 22, 2026 at 11:26 AM Li Wang via ltp <ltp@lists.linux.it> wrote:
>
> Signed-off-by: Li Wang <liwang@redhat.com>
> ---
>  testcases/kernel/syscalls/clone/clone10.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/testcases/kernel/syscalls/clone/clone10.c b/testcases/kernel/syscalls/clone/clone10.c
> index a52ac3568..9ffb49c37 100644
> --- a/testcases/kernel/syscalls/clone/clone10.c
> +++ b/testcases/kernel/syscalls/clone/clone10.c
> @@ -91,4 +91,10 @@ static struct tst_test test = {
>         .cleanup = cleanup,
>         .needs_checkpoints = 1,
>         .test_all = verify_tls,
> +       .supported_archs = (const char *const []) {
> +               "x86_64",
> +               "aarch64",
> +               "s390x",
> +               NULL
> +       }
>  };

Acked-by: Jan Stancek <jstancek@redhat.com>


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [LTP] [PATCH] clone10: add support archs
  2026-01-22 10:41 ` Jan Stancek via ltp
@ 2026-01-22 12:28   ` Wei Gao via ltp
  2026-01-22 12:31   ` Petr Vorel
  1 sibling, 0 replies; 7+ messages in thread
From: Wei Gao via ltp @ 2026-01-22 12:28 UTC (permalink / raw)
  To: Jan Stancek, es; +Cc: ltp

On Thu, Jan 22, 2026 at 11:41:40AM +0100, Jan Stancek via ltp wrote:
> On Thu, Jan 22, 2026 at 11:26 AM Li Wang via ltp <ltp@lists.linux.it> wrote:
> >
> > Signed-off-by: Li Wang <liwang@redhat.com>
> > ---
> >  testcases/kernel/syscalls/clone/clone10.c | 6 ++++++
> >  1 file changed, 6 insertions(+)
> >
> > diff --git a/testcases/kernel/syscalls/clone/clone10.c b/testcases/kernel/syscalls/clone/clone10.c
> > index a52ac3568..9ffb49c37 100644
> > --- a/testcases/kernel/syscalls/clone/clone10.c
> > +++ b/testcases/kernel/syscalls/clone/clone10.c
> > @@ -91,4 +91,10 @@ static struct tst_test test = {
> >         .cleanup = cleanup,
> >         .needs_checkpoints = 1,
> >         .test_all = verify_tls,
> > +       .supported_archs = (const char *const []) {
> > +               "x86_64",
> > +               "aarch64",
> > +               "s390x",
> > +               NULL
> > +       }
> >  };
> 
> Acked-by: Jan Stancek <jstancek@redhat.com>

Reviewed-by: Wei Gao <wegao@suse.com>
> 
> 
> -- 
> Mailing list info: https://lists.linux.it/listinfo/ltp

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [LTP] [PATCH] clone10: add support archs
  2026-01-22 10:41 ` Jan Stancek via ltp
  2026-01-22 12:28   ` Wei Gao via ltp
@ 2026-01-22 12:31   ` Petr Vorel
  2026-01-22 12:47     ` Li Wang via ltp
  1 sibling, 1 reply; 7+ messages in thread
From: Petr Vorel @ 2026-01-22 12:31 UTC (permalink / raw)
  To: Jan Stancek; +Cc: ltp

Hi Li, Jan,

> On Thu, Jan 22, 2026 at 11:26 AM Li Wang via ltp <ltp@lists.linux.it> wrote:

> > Signed-off-by: Li Wang <liwang@redhat.com>
> > ---
> >  testcases/kernel/syscalls/clone/clone10.c | 6 ++++++
> >  1 file changed, 6 insertions(+)

> > diff --git a/testcases/kernel/syscalls/clone/clone10.c b/testcases/kernel/syscalls/clone/clone10.c
> > index a52ac3568..9ffb49c37 100644
> > --- a/testcases/kernel/syscalls/clone/clone10.c
> > +++ b/testcases/kernel/syscalls/clone/clone10.c
> > @@ -91,4 +91,10 @@ static struct tst_test test = {
> >         .cleanup = cleanup,
> >         .needs_checkpoints = 1,
> >         .test_all = verify_tls,
> > +       .supported_archs = (const char *const []) {
> > +               "x86_64",
> > +               "aarch64",
> > +               "s390x",
> > +               NULL
> > +       }
> >  };

> Acked-by: Jan Stancek <jstancek@redhat.com>

LGTM. Indeed only these 3 archs don't TCONF.
Acked-by: Petr Vorel <pvorel@suse.cz>

Out of curiosity, where is the support defined in kernel?
"if (clone_flags & CLONE_SETTLS)" is in many archs:

$ git grep CLONE_SETTLS
...
arch/loongarch/kernel/process.c:220:    if (clone_flags & CLONE_SETTLS)
arch/m68k/kernel/process.c:179: if (clone_flags & CLONE_SETTLS)
arch/microblaze/kernel/process.c:110:   if (clone_flags & CLONE_SETTLS)
arch/mips/kernel/process.c:171: if (clone_flags & CLONE_SETTLS)
arch/nios2/kernel/process.c:143:        if (clone_flags & CLONE_SETTLS)
arch/openrisc/kernel/process.c:199:              * For CLONE_SETTLS set "tp" (r10) to the TLS pointer.
arch/openrisc/kernel/process.c:201:             if (clone_flags & CLONE_SETTLS)
arch/parisc/kernel/process.c:251:               if (clone_flags & CLONE_SETTLS)
arch/powerpc/kernel/process.c:1819:                     if (clone_flags & CLONE_SETTLS) {

Kind regards,
Petr

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [LTP] [PATCH] clone10: add support archs
  2026-01-22 12:31   ` Petr Vorel
@ 2026-01-22 12:47     ` Li Wang via ltp
  2026-01-22 13:06       ` Petr Vorel
  0 siblings, 1 reply; 7+ messages in thread
From: Li Wang via ltp @ 2026-01-22 12:47 UTC (permalink / raw)
  To: Petr Vorel; +Cc: ltp

Petr Vorel <pvorel@suse.cz> wrote:

> > Acked-by: Jan Stancek <jstancek@redhat.com>
>
> LGTM. Indeed only these 3 archs don't TCONF.
> Acked-by: Petr Vorel <pvorel@suse.cz>
>
> Out of curiosity, where is the support defined in kernel?
> "if (clone_flags & CLONE_SETTLS)" is in many archs:

Not based on this, the clone10.c test was written and gets tested
only on the known archs (x86_64, s390x, aarch64) by now.

And in case that other archs (not tested) have different behavior like i386,
so we are limited to the know/tested archs.

If we can get another arch to verified we can add it to the
.supported_archs as well.

$ cat -n ltp/include/lapi/tls.h
    ...
    53 static inline void init_tls(void)
    54 {
    55     #if defined(__x86_64__) || defined(__aarch64__) || defined(__s390x__)
    56     tls_ptr = allocate_tls_area();
    57 #else
    ...


-- 
Regards,
Li Wang


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [LTP] [PATCH] clone10: add support archs
  2026-01-22 12:47     ` Li Wang via ltp
@ 2026-01-22 13:06       ` Petr Vorel
  2026-01-22 14:16         ` Li Wang via ltp
  0 siblings, 1 reply; 7+ messages in thread
From: Petr Vorel @ 2026-01-22 13:06 UTC (permalink / raw)
  To: Li Wang; +Cc: ltp

> Petr Vorel <pvorel@suse.cz> wrote:

> > > Acked-by: Jan Stancek <jstancek@redhat.com>

> > LGTM. Indeed only these 3 archs don't TCONF.
> > Acked-by: Petr Vorel <pvorel@suse.cz>

> > Out of curiosity, where is the support defined in kernel?
> > "if (clone_flags & CLONE_SETTLS)" is in many archs:

> Not based on this, the clone10.c test was written and gets tested
> only on the known archs (x86_64, s390x, aarch64) by now.

> And in case that other archs (not tested) have different behavior like i386,
> so we are limited to the know/tested archs.

> If we can get another arch to verified we can add it to the
> .supported_archs as well.

> $ cat -n ltp/include/lapi/tls.h
>     ...
>     53 static inline void init_tls(void)
>     54 {
>     55     #if defined(__x86_64__) || defined(__aarch64__) || defined(__s390x__)
>     56     tls_ptr = allocate_tls_area();
>     57 #else
>     ...

include/lapi/tls.h

static inline void init_tls(void)
{
#if defined(__x86_64__) || defined(__aarch64__) || defined(__s390x__)
	tls_ptr = allocate_tls_area();
#else
	tst_brk(TCONF, "Unsupported architecture for TLS");
#endif

I see. First IMHO the message in include/lapi/tls.h is pretty misleading. It
does not look to me as a test limitation, but as a missing arch support in
kernel.  IMHO the message should have been something like:

tst_brk(TCONF, "Test not supported only architecture");

(i.e. to mention "test")

Also having arch listed in the test and also in tls.h is redundant.
IMHO it should be only on a single place.

Kind regards,
Petr

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [LTP] [PATCH] clone10: add support archs
  2026-01-22 13:06       ` Petr Vorel
@ 2026-01-22 14:16         ` Li Wang via ltp
  0 siblings, 0 replies; 7+ messages in thread
From: Li Wang via ltp @ 2026-01-22 14:16 UTC (permalink / raw)
  To: Petr Vorel; +Cc: ltp

On Thu, Jan 22, 2026 at 9:06 PM Petr Vorel <pvorel@suse.cz> wrote:
>
> > Petr Vorel <pvorel@suse.cz> wrote:
>
> > > > Acked-by: Jan Stancek <jstancek@redhat.com>
>
> > > LGTM. Indeed only these 3 archs don't TCONF.
> > > Acked-by: Petr Vorel <pvorel@suse.cz>
>
> > > Out of curiosity, where is the support defined in kernel?
> > > "if (clone_flags & CLONE_SETTLS)" is in many archs:
>
> > Not based on this, the clone10.c test was written and gets tested
> > only on the known archs (x86_64, s390x, aarch64) by now.
>
> > And in case that other archs (not tested) have different behavior like i386,
> > so we are limited to the know/tested archs.
>
> > If we can get another arch to verified we can add it to the
> > .supported_archs as well.
>
> > $ cat -n ltp/include/lapi/tls.h
> >     ...
> >     53 static inline void init_tls(void)
> >     54 {
> >     55     #if defined(__x86_64__) || defined(__aarch64__) || defined(__s390x__)
> >     56     tls_ptr = allocate_tls_area();
> >     57 #else
> >     ...
>
> include/lapi/tls.h
>
> static inline void init_tls(void)
> {
> #if defined(__x86_64__) || defined(__aarch64__) || defined(__s390x__)
>         tls_ptr = allocate_tls_area();
> #else
>         tst_brk(TCONF, "Unsupported architecture for TLS");
> #endif
>
> I see. First IMHO the message in include/lapi/tls.h is pretty misleading. It
> does not look to me as a test limitation, but as a missing arch support in
> kernel.  IMHO the message should have been something like:

+1

> tst_brk(TCONF, "Test not supported only architecture");
>
> (i.e. to mention "test")
>
> Also having arch listed in the test and also in tls.h is redundant.
> IMHO it should be only on a single place.

Absolutely yes, and looks like the ifdefine in tls.h should be cleanup too.
Feel free do that in a seperate patch or I will look into it tomorrow.


-- 
Regards,
Li Wang


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-01-22 14:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-22 10:26 [LTP] [PATCH] clone10: add support archs Li Wang via ltp
2026-01-22 10:41 ` Jan Stancek via ltp
2026-01-22 12:28   ` Wei Gao via ltp
2026-01-22 12:31   ` Petr Vorel
2026-01-22 12:47     ` Li Wang via ltp
2026-01-22 13:06       ` Petr Vorel
2026-01-22 14:16         ` Li Wang via ltp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox