From: Bruno Haible Date: Thu, 13 May 2021 10:11:04 +0000 (+0200) Subject: reallocarray tests: Avoid test failure on NetBSD. X-Git-Tag: v1.0~2898 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b4cd76a8e64d4b70e2aff61cbca77df056ffcf4;p=thirdparty%2Fgnulib.git reallocarray tests: Avoid test failure on NetBSD. * tests/test-reallocarray.c (main): Accept EOVERFLOW error code. --- diff --git a/ChangeLog b/ChangeLog index 0a1f3cc076..0bcb9e6485 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2021-05-13 Bruno Haible + + reallocarray tests: Avoid test failure on NetBSD. + * tests/test-reallocarray.c (main): Accept EOVERFLOW error code. + 2021-05-12 Bruno Haible gnulib-tool: Fail properly if the 'join' program is not found. diff --git a/tests/test-reallocarray.c b/tests/test-reallocarray.c index 6de355e6bd..8067542d58 100644 --- a/tests/test-reallocarray.c +++ b/tests/test-reallocarray.c @@ -41,7 +41,8 @@ main () p = reallocarray (p, SIZE_MAX / n + 1, n); if (p) return 3; - if (errno != ENOMEM) + if (!(errno == ENOMEM + || errno == EOVERFLOW /* NetBSD */)) return 4; /* Reallocarray should not crash with zero sizes. */