clone10: add support archs
PATCH 1/1 clone10: add support archs
--- testcases/kernel/syscalls/clone/clone10.c | 6 ++++++ 1 file changed, 6 insertions(+)
testcases/kernel/syscalls/clone/clone10.c +6 -0
@@ -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 + } };
Signature · 5 lines
2.52.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Quoted 11 lines · Li Wang via ltp
Signed-off-by Li Wang <[email protected]>--- testcases/kernel/syscalls/clone/clone10.c | 6 ++++++ 1 file changed, 6 insertions(+)testcases/kernel/syscalls/clone/clone10.c +0
-0
testcases/kernel/syscalls/clone/clone10.c static struct tst_test test = { · line 100
Quoted 10 lines
testcases/kernel/syscalls/clone/clone10.c +6
-0@@ -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 + } };
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Wei Gao via ltp
Reviewed-by Wei GaoQuoted 16 lines · Jan Stancek via ltp
Quoted 15 lines · Li Wang via ltp
Signed-off-by Li Wang <[email protected]>--- testcases/kernel/syscalls/clone/clone10.c | 6 ++++++ 1 file changed, 6 insertions(+)testcases/kernel/syscalls/clone/clone10.c +1
-0@@ -91,4 +91,10 @@ static struct tst_test test = { .cleanup = cleanup, .needs_checkpoints = 1, .test_all = verify_tls, + .supported_archs = (const char *const []) {
Quoted 8 lines
testcases/kernel/syscalls/clone/clone10.c static struct tst_test test = { · line 100
Quoted 6 lines
testcases/kernel/syscalls/clone/clone10.c +5
-0+"x86_64" , +"aarch64" , +"s390x" , + NULL + } };Acked-by Jan Stancek <[email protected]>
Quoted 4 lines
Signature · 2 lines
-- Mailing list info: https://lists.linux.it/listinfo/ltp
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Petr Vorel
Acked-byHi Li, Jan,
Quoted 16 lines · Li Wang via ltp
Quoted 15 lines
Signed-off-by Li Wang <[email protected]>--- testcases/kernel/syscalls/clone/clone10.c | 6 ++++++ 1 file changed, 6 insertions(+)testcases/kernel/syscalls/clone/clone10.c +1
-0@@ -91,4 +91,10 @@ static struct tst_test test = { .cleanup = cleanup, .needs_checkpoints = 1, .test_all = verify_tls, + .supported_archs = (const char *const []) {
Quoted 8 lines
testcases/kernel/syscalls/clone/clone10.c static struct tst_test test = { · line 100
Quoted 6 lines
testcases/kernel/syscalls/clone/clone10.c +5
-0+"x86_64" , +"aarch64" , +"s390x" , + NULL + } };Acked-by Jan Stancek <[email protected]>
LGTM. Indeed only these 3 archs don't TCONF.
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
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Quoted 7 lines · Petr Vorel
Quoted 1 line
Acked-by Jan Stancek <[email protected]>LGTM. Indeed only these 3 archs don't TCONF.
Acked-by Petr Vorel <[email protected]>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
...Signature · 6 lines
Regards, Li Wang -- Mailing list info: https://lists.linux.it/listinfo/ltp
Quoted 19 lines
Quoted 7 lines · Petr Vorel
Quoted 1 line
Acked-by Jan Stancek <[email protected]>LGTM. Indeed only these 3 archs don't TCONF.
Acked-by Petr Vorel <[email protected]>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.ctest 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.
Quoted 8 lines
$ 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
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Quoted 37 lines · Petr Vorel
Quoted 20 lines
Quoted 7 lines · Petr Vorel
Quoted 1 line
Acked-by Jan Stancek <[email protected]>LGTM. Indeed only these 3 archs don't TCONF.
Acked-by Petr Vorel <[email protected]>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.ctest 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.
Quoted 8 lines
$ 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.hstatic 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");
Quoted 5 lines
#endif
I see. First IMHO the message in
include/lapi/tls.his 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
Quoted 6 lines
tst_brk(TCONF, "Test not supported only architecture");(i.e. to mention "test")
Also having arch listed in the test and also in
tls.his 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.
Signature · 6 lines
Regards, Li Wang -- Mailing list info: https://lists.linux.it/listinfo/ltp