Fix: Tests: missing stream redirect causes test failure
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Thu, 16 Jan 2020 01:52:39 +0000 (20:52 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 17 Jan 2020 18:27:39 +0000 (13:27 -0500)
The following commit enforced the use of options (instead of arguments)
in the `gen-ust-events` test application:
  commit 6c4a91d639747f260ab46decebc50998ef063712
  Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  Date:   Mon Aug 26 14:22:06 2019 -0400

      tests: gen-ust-events: use options instead of arguments

This makes tests exit (and abort since commit 56d4838) when arguments
are passed to the test application. It currently fails with the
following error:
  ./gen-ust-events -i 32 -w 21 \
    --sync-after-first-event /tmp/allo.hi \
    --sync-before-last-event /tmp/allo.bye /dev/null
  Error: takes long options only.
  zsh: abort (core dumped)  ./gen-ust-events -i 32 -w 21 --sync-after-first-event /tmp/allo.hi

The `/dev/null` at the end of the command line is not associated with an
option so it triggers the sanity check. The `/dev/null` most probably
meant to redirect STDOUT to `/dev/null`.

This commit adds the missing `>` so to overcome the sanity check
problem.

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Change-Id: I3e4d4066079055a542438a63ef4df5c5c4c080cf
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
tests/destructive/metadata-regeneration

index de0d3dec0212088d50b00527e19199961f344d38..db4976302d5a045a364c798ee982e4ddace273b9 100755 (executable)
@@ -129,7 +129,7 @@ function test_ust_local ()
 
        $TESTAPP_BIN -i $NR_ITER -w $NR_USEC_WAIT \
                --sync-after-first-event ${file_sync_after_first} \
 
        $TESTAPP_BIN -i $NR_ITER -w $NR_USEC_WAIT \
                --sync-after-first-event ${file_sync_after_first} \
-               --sync-before-last-event ${file_sync_before_last} /dev/null 2>&1 &
+               --sync-before-last-event ${file_sync_before_last} /dev/null 2>&1 &
 
        start_lttng_tracing_ok $SESSION_NAME
 
 
        start_lttng_tracing_ok $SESSION_NAME
 
@@ -167,7 +167,7 @@ function test_ust_streaming ()
 
        $TESTAPP_BIN -i $NR_ITER -w $NR_USEC_WAIT \
                --sync-after-first-event ${file_sync_after_first} \
 
        $TESTAPP_BIN -i $NR_ITER -w $NR_USEC_WAIT \
                --sync-after-first-event ${file_sync_after_first} \
-               --sync-before-last-event ${file_sync_before_last} /dev/null 2>&1 &
+               --sync-before-last-event ${file_sync_before_last} /dev/null 2>&1 &
 
        start_lttng_tracing_ok $SESSION_NAME
 
 
        start_lttng_tracing_ok $SESSION_NAME
 
This page took 0.032222 seconds and 4 git commands to generate.