Fix: Tests: `gen-ust-events` doesn't error out on invalid option
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Wed, 4 Mar 2020 21:18:37 +0000 (16:18 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 25 Mar 2020 19:19:12 +0000 (15:19 -0400)
commit4fc5fb103c790b3e97b6241e12780a7b1748a05d
tree05605fb3fcc58480fbc75a9943fd6a435d81d6ee
parentf2489409aa5ac1d21a40790399f1218c93227491
Fix: Tests: `gen-ust-events` doesn't error out on invalid option

Issue
=====
When running `gen-ust-events` with an invalid option:
  ./gen-ust-events -h

The `getopt_long()` function prints the following error:
  ./gen-ust-events: invalid option -- 'h'

which is very kind of it.

The problem is that the process keep running and go on to generate
events. It should exit right away.

Solution
========
Remove the `break` statement and so that we execute the `goto end`
right away.

Apply the same changes to `gen-ust-nevents`.

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Change-Id: Ib1c96f4c9ed8f98395bf842215f858a69db2bbf0
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
tests/utils/testapp/gen-ust-events/gen-ust-events.c
tests/utils/testapp/gen-ust-nevents/gen-ust-nevents.c
This page took 0.026882 seconds and 4 git commands to generate.