]> Savannah Git Hosting - gnulib.git/commitdiff
unistr/u8-strstr tests: Avoid test failure with ASAN.
authorBruno Haible <bruno@clisp.org>
Thu, 9 May 2024 14:30:01 +0000 (16:30 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 17 May 2024 23:33:21 +0000 (01:33 +0200)
* tests/unistr/test-u8-strstr.c (main): Increase timeout to 50 sec.
* tests/unistr/test-u16-strstr.c (main): Likewise.
* tests/unistr/test-u32-strstr.c (main): Likewise.

ChangeLog
tests/unistr/test-u16-strstr.c
tests/unistr/test-u32-strstr.c
tests/unistr/test-u8-strstr.c

index aec539e3e621ee94cc0809e21293ca69a42a0253..f881847db764167fef5612e0165118f48489b462 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-05-09  Bruno Haible  <bruno@clisp.org>
+
+       unistr/u8-strstr tests: Avoid test failure with ASAN.
+       * tests/unistr/test-u8-strstr.c (main): Increase timeout to 50 sec.
+       * tests/unistr/test-u16-strstr.c (main): Likewise.
+       * tests/unistr/test-u32-strstr.c (main): Likewise.
+
 2024-05-09  Bruno Haible  <bruno@clisp.org>
 
        free tests: Avoid test failure with ASAN.
index 9c49aa0496a0baca587c8afdb77bff419c4de5c1..3ba2da2759d9c4ec7059d421c98e6dbb57093754 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of u16_strstr() function.
-   Copyright (C) 2011-2023 Free Software Foundation, Inc.
+   Copyright (C) 2011-2024 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -38,8 +38,9 @@ main (void)
 #if HAVE_DECL_ALARM
   /* Declare failure if test takes too long, by using default abort
      caused by SIGALRM.  */
+  int alarm_value = 50;
   signal (SIGALRM, SIG_DFL);
-  alarm (10);
+  alarm (alarm_value);
 #endif
 
   test_u_strstr ();
index 134a3c5366528d952a85bfcc99881bbc9bd50e2b..320ccfbe426a33c8e6c04092c3779cca3b2dde58 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of u32_strstr() function.
-   Copyright (C) 2011-2023 Free Software Foundation, Inc.
+   Copyright (C) 2011-2024 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -38,8 +38,9 @@ main (void)
 #if HAVE_DECL_ALARM
   /* Declare failure if test takes too long, by using default abort
      caused by SIGALRM.  */
+  int alarm_value = 50;
   signal (SIGALRM, SIG_DFL);
-  alarm (10);
+  alarm (alarm_value);
 #endif
 
   test_u_strstr ();
index 39f831b2ea0d19f6f3b72e33bd5c9e57022b5e5b..670a182d0c833d671f553a9e05337a4061211f20 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of u8_strstr() function.
-   Copyright (C) 2011-2023 Free Software Foundation, Inc.
+   Copyright (C) 2011-2024 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -41,8 +41,9 @@ main (void)
      case, we're assuming that we're running this test on the
      same system that we did the check to ensure it has linear
      performance characteristics.  */
+  int alarm_value = 50;
   signal (SIGALRM, SIG_DFL);
-  alarm (5);
+  alarm (alarm_value);
 #endif
 
   test_u_strstr ();