support: Add options list terminator to the test driver

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

Checks

Context Check Description
redhat-pt-bot/TryBot-32bit success Build for i686
redhat-pt-bot/TryBot-apply_patch success Patch applied to master at the time it was sent
linaro-tcwg-bot/tcwg_glibc_build--master-arm warning Patch is already merged
linaro-tcwg-bot/tcwg_glibc_build--master-aarch64 warning Patch is already merged

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 Netto 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
>
  

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