From 3d5f0e4766b02363dc7e40c79d002ba49bdeee81 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 4 Nov 2024 13:49:22 +0100 Subject: [PATCH] tests: Add comments. * tests/test-aligned_alloc.c (main): Clarify that we test a zero size. * tests/test-posix_memalign.c (main): Likewise. --- ChangeLog | 6 ++++++ tests/test-aligned_alloc.c | 5 +++-- tests/test-posix_memalign.c | 5 +++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index c73909152a..8d0ab77a97 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2024-11-04 Bruno Haible + + tests: Add comments. + * tests/test-aligned_alloc.c (main): Clarify that we test a zero size. + * tests/test-posix_memalign.c (main): Likewise. + 2024-11-04 Bruno Haible malloc, calloc, realloc tests: Work around clang optimization bug. diff --git a/tests/test-aligned_alloc.c b/tests/test-aligned_alloc.c index e4aba98221..bf953fe85d 100644 --- a/tests/test-aligned_alloc.c +++ b/tests/test-aligned_alloc.c @@ -36,8 +36,9 @@ main (int argc, char *argv[]) #if HAVE_ALIGNED_ALLOC static size_t sizes[] = { - 13, 8, 17, 450, 320, 1, 99, 4, 15, 16, - 2, 76, 37, 127, 2406, 641, 5781, 0 + 13, 8, 17, 450, 320, 1, 99, 4, 15, 16, 2, 76, 37, 127, 2406, 641, 5781, + /* Test also a zero size. */ + 0 }; void *volatile aligned2_blocks[SIZEOF (sizes)]; void *volatile aligned4_blocks[SIZEOF (sizes)]; diff --git a/tests/test-posix_memalign.c b/tests/test-posix_memalign.c index b61ac4e2a0..a9a6fc1593 100644 --- a/tests/test-posix_memalign.c +++ b/tests/test-posix_memalign.c @@ -34,8 +34,9 @@ main (int argc, char *argv[]) #if HAVE_POSIX_MEMALIGN static size_t sizes[] = { - 13, 8, 17, 450, 320, 1, 99, 4, 15, 16, - 2, 76, 37, 127, 2406, 641, 5781, 0 + 13, 8, 17, 450, 320, 1, 99, 4, 15, 16, 2, 76, 37, 127, 2406, 641, 5781, + /* Test also a zero size. */ + 0 }; void *aligned2_blocks[SIZEOF (sizes)]; void *aligned4_blocks[SIZEOF (sizes)]; -- 2.39.5