From: Bruno Haible Date: Thu, 9 May 2024 14:30:01 +0000 (+0200) Subject: unistr/u8-strstr tests: Avoid test failure with ASAN. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=65c362ff2b70fb647a94aa25037850bf1e71bdbb;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index 2201d9163a..ff0dc26ecc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2024-05-09 Bruno Haible + + 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 free tests: Avoid test failure with ASAN. diff --git a/tests/unistr/test-u16-strstr.c b/tests/unistr/test-u16-strstr.c index 4906a96f23..3ba2da2759 100644 --- a/tests/unistr/test-u16-strstr.c +++ b/tests/unistr/test-u16-strstr.c @@ -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 (); diff --git a/tests/unistr/test-u32-strstr.c b/tests/unistr/test-u32-strstr.c index 21caa7842f..320ccfbe42 100644 --- a/tests/unistr/test-u32-strstr.c +++ b/tests/unistr/test-u32-strstr.c @@ -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 (); diff --git a/tests/unistr/test-u8-strstr.c b/tests/unistr/test-u8-strstr.c index 791e1c97f4..670a182d0c 100644 --- a/tests/unistr/test-u8-strstr.c +++ b/tests/unistr/test-u8-strstr.c @@ -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 ();