diff mbox series

support: Add options list terminator to the test driver

Message ID 87o761g3lm.fsf@oldenburg.str.redhat.com
State New
Headers show
Series support: Add options list terminator to the test driver | expand

Commit Message

Florian Weimer Aug. 9, 2024, 2:42 p.m. UTC
This avoids crashes if a test is passed unknown options.

Tested on x86_64-linux-gnu.  Built with build-many-glibcs.py.

---
 support/test-driver.c | 1 +
 1 file changed, 1 insertion(+)


base-commit: a0ecbb45969e93ec5eb6ba0d1f0a5578bdb2e54c

Comments

Adhemerval Zanella Aug. 9, 2024, 2:57 p.m. UTC | #1
On 09/08/24 11:42, Florian Weimer wrote:
> This avoids crashes if a test is passed unknown options.
> 
> Tested on x86_64-linux-gnu.  Built with build-many-glibcs.py.

LGTM, I have this on my backlog for a long time.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

> 
> ---
>  support/test-driver.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/support/test-driver.c b/support/test-driver.c
> index f4c3e4d666..04ceebc08f 100644
> --- a/support/test-driver.c
> +++ b/support/test-driver.c
> @@ -155,6 +155,7 @@ main (int argc, char **argv)
>      {
>        CMDLINE_OPTIONS
>        TEST_DEFAULT_OPTIONS
> +      { 0, }
>      };
>    test_config.options = &options;
>  #endif
> 
> base-commit: a0ecbb45969e93ec5eb6ba0d1f0a5578bdb2e54c
>
diff mbox series

Patch

diff --git a/support/test-driver.c b/support/test-driver.c
index f4c3e4d666..04ceebc08f 100644
--- a/support/test-driver.c
+++ b/support/test-driver.c
@@ -155,6 +155,7 @@  main (int argc, char **argv)
     {
       CMDLINE_OPTIONS
       TEST_DEFAULT_OPTIONS
+      { 0, }
     };
   test_config.options = &options;
 #endif