tests: gen-ust-events: abort() on argument error
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 22 Nov 2019 20:00:38 +0000 (15:00 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 19 Dec 2019 23:55:56 +0000 (18:55 -0500)
Facilitates test transition: quickly identify tests which were not
updated.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Idec886cc565c4cb7f1de89e7f3f765c882f4b988
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
tests/utils/testapp/gen-ust-events/gen-ust-events.c

index 353523b7c2c3ccd18d8f4fcf0b8f908dc35a0065..8f2acdbabbfbb28ab8a72b4bb5c4f03dfa8960d4 100644 (file)
@@ -109,6 +109,17 @@ int main(int argc, char **argv)
 
        if (optind != argc) {
                fprintf(stderr, "Error: takes long options only.\n");
+
+               /*
+                * Aborting the test program for now because callers typically don't check
+                * the test program return value, and the transition from positional
+                * arguments to getopt causes hangs when caller scripts are not updated.
+                * An abort is easier to diagnose and fix. This is a temporary solution:
+                * we should eventually ensure that all scripts test and report the test
+                * app return values.
+                */
+               abort();
+
                ret = -1;
                goto end;
        }
This page took 0.025687 seconds and 4 git commands to generate.