All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] xeno-regression-test returns SUCCESS when Xenomai not available
@ 2013-08-20 12:45 Gernot Hillier
  2013-08-20 18:15 ` Gilles Chanteperdrix
  2013-08-20 18:50 ` Gilles Chanteperdrix
  0 siblings, 2 replies; 5+ messages in thread
From: Gernot Hillier @ 2013-08-20 12:45 UTC (permalink / raw)
  To: xenomai

Hi there!

I'm currently working on an automatic test environment for Xenomai
kernels. Sometimes, Xenomai integration into my kernel fails completely 
and I expected this to be detected in a xeno-regression-test run - however:

root@localhost:~# xeno-regression-test && echo Worked.
Started child 28231: /bin/bash 
/usr/lib/xenomai/testsuite/xeno-test-run-wrapper 
/usr/bin/xeno-regression-test
++ echo 0
/usr/bin/xeno-regression-test: line 38: /proc/xenomai/latency: No such 
file or directory
++ :
++ /usr/lib/xenomai/testsuite/arith
Xenomai: /dev/rtheap is missing
(chardev, major=10 minor=254)
Worked.

Looking into xeno-test-run.c, I see that a dead script child is not
causing an error exit of xeno-test-run in handle_script_child().

Is there any special reason for that behaviour or could we just add a
comparable EXIT_FAILURE branch as in handle_checked_child(), something
like

--- src/testsuite/xeno-test/xeno-test-run.c.orig        2013-08-20 
10:10:04.452067093 +0200
+++ src/testsuite/xeno-test/xeno-test-run.c     2013-08-20 
13:10:12.739924212 +0200
@@ -420,7 +418,14 @@ void handle_script_child(struct child *c
         int rc;

         if (child->dead) {
+               int status = child->exit_status;
                 child_cleanup(child);
+               if (WIFEXITED(status)) {
+                       fail_fprintf(stderr,
+                                  "child %d exited with status %d\n",
+                                  child->pid, WEXITSTATUS(status));
+                       exit(EXIT_FAILURE);
+               }
                 return;
         }

However, as I didn't really get the concept yet how script and checked
clients work together, I'm not sure whether this is the right way to 
fix(?) that behaviour.

-- 
With kind regards,
Gernot Hillier

Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux


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

end of thread, other threads:[~2013-08-22  9:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-20 12:45 [Xenomai] xeno-regression-test returns SUCCESS when Xenomai not available Gernot Hillier
2013-08-20 18:15 ` Gilles Chanteperdrix
2013-08-20 21:49   ` Gilles Chanteperdrix
2013-08-22  9:01     ` Gernot Hillier
2013-08-20 18:50 ` Gilles Chanteperdrix

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.