From 5995aef383d5c0d6345454e66bee73cde13510a8 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 | 5 +++-- tests/unistr/test-u32-strstr.c | 5 +++-- tests/unistr/test-u8-strstr.c | 5 +++-- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index aec539e3e6..f881847db7 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 9c49aa0496..3ba2da2759 100644 --- a/tests/unistr/test-u16-strstr.c +++ b/tests/unistr/test-u16-strstr.c @@ -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 (); diff --git a/tests/unistr/test-u32-strstr.c b/tests/unistr/test-u32-strstr.c index 134a3c5366..320ccfbe42 100644 --- a/tests/unistr/test-u32-strstr.c +++ b/tests/unistr/test-u32-strstr.c @@ -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 (); diff --git a/tests/unistr/test-u8-strstr.c b/tests/unistr/test-u8-strstr.c index 39f831b2ea..670a182d0c 100644 --- a/tests/unistr/test-u8-strstr.c +++ b/tests/unistr/test-u8-strstr.c @@ -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 (); -- 2.39.5