diff mbox series

[v2,4/5] sbrk03: Convert to detect support with flags

Message ID 20240521105348.126316-5-pvorel@suse.cz
State Accepted
Headers show
Series .needs_abi_bits + rewrite fork14 to new API | expand

Commit Message

Petr Vorel May 21, 2024, 10:53 a.m. UTC
.needs_abi_bits and .supported_archs are doc friendly.
Also, it does tst_brk() (in case of more run with -i).

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
New in v2

 testcases/kernel/syscalls/sbrk/sbrk03.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

Comments

Cyril Hrubis May 21, 2024, 3:12 p.m. UTC | #1
Hi!
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
diff mbox series

Patch

diff --git a/testcases/kernel/syscalls/sbrk/sbrk03.c b/testcases/kernel/syscalls/sbrk/sbrk03.c
index 80d2020ff..875815629 100644
--- a/testcases/kernel/syscalls/sbrk/sbrk03.c
+++ b/testcases/kernel/syscalls/sbrk/sbrk03.c
@@ -39,7 +39,6 @@ 
 
 static void sbrk_test(void)
 {
-#if defined(__s390__) && defined(TST_ABI32)
 	void *ret1, *ret2;
 
 	/* set bkr to 0x10000000 */
@@ -59,13 +58,15 @@  static void sbrk_test(void)
 	}
 
 	tst_res(TPASS, "sbrk verify: %p", ret2);
-#else
-	tst_res(TCONF, "Only works in 32bit on s390 series system");
-#endif
 }
 
 static struct tst_test test = {
 	.test_all = sbrk_test,
+	.supported_archs = (const char *const []) {
+		"s390",
+		NULL
+	},
+	.needs_abi_bits = 32,
 	.tags = (const struct tst_tag[]) {
 		{"linux-git", "473a06572fcd"},
 		{}