]> 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:12:17 +0000 (01:12 +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 2201d9163aea9bb55a7d5980d46eb8d63dfce6e6..ff0dc26eccf5d0853a79acd5e51409ef33359abb 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 4906a96f23512c35bb06c67550ce5fa17c11d500..3ba2da2759d9c4ec7059d421c98e6dbb57093754 100644 (file)
@@ -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 21caa7842ff511da4f6337aff12907fbb1db5092..320ccfbe426a33c8e6c04092c3779cca3b2dde58 100644 (file)
@@ -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 791e1c97f4325f7c1aaaa3720102c28672f36e12..670a182d0c833d671f553a9e05337a4061211f20 100644 (file)
@@ -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 ();