Skip to contentSkip to conversation

testsuite/smokey/gdb: Skip test if gdb is not available

PATCH In review Jan Kiszka 1 participant 2 messages Apr 4, 2023

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 testsuite/smokey/gdb: Skip test if gdb is not available

From: Jan Kiszka <[email protected]>

Make gdb optional so that we do not need define it as dependency of the xenomai-runtime package. Can be changed again in the future when factoring out a separate xenomai-testsuite package.

---

This could go into master and stable for now.

 testsuite/smokey/gdb/gdb.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
testsuite/smokey/gdb/gdb.c +4 -1
index eabf75e6a2..ff15dadf8d 100644
@@ -75,7 +75,10 @@ static void handle_sigchld(int signum)
 	int status;
 
 	wait(&status);
-	check("gdb execution", WEXITSTATUS(status), 0);
+	if (WEXITSTATUS(status) == ESRCH)
+		smokey_note("gdb: skipped (gdb not available)");
+	else
+		check("gdb execution", WEXITSTATUS(status), 0);
 	child_terminated = 1;
 }
 
Signature · 1 line
2.35.3
author
#1 lore raw
Quoted 20 lines · Jan Kiszka

From: Jan Kiszka <[email protected]>

Make gdb optional so that we do not need define it as dependency of the xenomai-runtime package. Can be changed again in the future when factoring out a separate xenomai-testsuite package.

---

This could go into master and stable for now.

 testsuite/smokey/gdb/gdb.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
testsuite/smokey/gdb/gdb.c +0 -0
index eabf75e6a2..ff15dadf8d 100644
@@ -75,7 +75,10 @@ static void handle_sigchld(int signum)
 	int status;

testsuite/smokey/gdb/gdb.c static void handle_sigchld(int signum) · line 84

Quoted 10 lines
testsuite/smokey/gdb/gdb.c +4 -1
 
 	wait(&status);
-	check("gdb execution", WEXITSTATUS(status), 0);
+	if (WEXITSTATUS(status) == ESRCH)
+		smokey_note("gdb: skipped (gdb not available)");
+	else
+		check("gdb execution", WEXITSTATUS(status), 0);
 	child_terminated = 1;
 }
 

It's broken, will provide a v2 later.

Jan

Signature · 2 lines
Siemens AG, Technology
Competence Center Embedded Linux