From f263249382a5f1e03e16be6eacbbe23d49d49ab1 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 9 May 2024 16:30:01 +0200 Subject: [PATCH] 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. --- ChangeLog | 7 +++++++ tests/unistr/test-u16-strstr.c | 3 ++- tests/unistr/test-u32-strstr.c | 3 ++- tests/unistr/test-u8-strstr.c | 3 ++- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index c059f67670..b586aebdbf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 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. * tests/test-free.c (main): Skip mmap/munmap based test if ASAN is enabled. 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 (); -- 2.11.4.GIT