| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Following Bruno's lead, I'm also happy with this change.
* m4/sigaltstack.m4: Change copyright notice: Write "Copyright (C) FSF"
instead of "Copyright (C) Eric Blake".
* tests/altstack-util.h: Likewise.
* tests/test-sigsegv-catch-stackoverflow1.c: Likewise.
* tests/test-sigsegv-catch-stackoverflow2.c: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/sigsegv.in.h: Change copyright notice: Write "Copyright (C) FSF"
instead of "Copyright (C) Bruno Haible".
* lib/sigsegv.c: Likewise.
* lib/stackvma.h: Likewise.
* lib/stackvma.c: Likewise.
* m4/sigaltstack.m4: Likewise.
* m4/stack-direction.m4: Likewise.
* tests/altstack-util.h: Likewise.
* tests/mmap-anon-util.h: Likewise.
* tests/test-sigsegv-catch-segv1.c: Likewise.
* tests/test-sigsegv-catch-segv2.c: Likewise.
* tests/test-sigsegv-catch-stackoverflow1.c: Likewise.
* tests/test-sigsegv-catch-stackoverflow2.c: Likewise.
|
|
|
|
|
|
|
| |
* tests/test-pipe-filter-ii2-main.c: Include binary-io.h.
(main): Avoid NL to CRLF conversion on standard output.
* tests/test-pipe-filter-ii2-child.c: Include <unistd.h>, binary-io.h.
(main): Avoid NL to CRLF conversion on standard output.
|
|
|
|
|
|
|
|
| |
Patch by Paul Eggert.
* tests/test-sigsegv-catch-stackoverflow2.c
(null_pointer_to_volatile_int): New variable.
(main): Use it.
|
|
|
|
|
| |
* lib/ptsname_r.c (__ptsname_r): Add implementation for DragonFly BSD.
* tests/test-ptsname_r.c (main): Treat Dragonfly BSD like Solaris.
|
|
|
|
|
|
|
|
|
| |
* tests/test-c32isalnum.c (main): On Dragonfly BSD, disable tests that
fail.
* tests/test-c32isalpha.c (main): Likewise.
* tests/test-c32islower.c (main): Likewise.
* tests/test-c32isupper.c (main): Likewise.
* tests/test-ptsname.c (main): Treat Dragonfly BSD like Solaris.
|
|
|
|
|
|
|
| |
* tests/test-regex.c (tests): Add test cases for *+ and ** regressions
fixed by the previous commit.
Link: https://lists.gnu.org/archive/html/bug-gnulib/2021-04/msg00134.html
|
|
|
|
|
|
|
|
| |
* tests/test-regex.c (tests): Remove the comment saying that some tests
are not used. That comment was copied along with tests from glibc
where some of these tests are commented out.
Fixes: 70b673eb7 ("regex: fix longstanding backref match bug")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/gen-uni-tables.c (output_library_license, output_tests_license):
New functions.
(output_predicate, output_category, output_combclass,
output_bidi_category, output_decimal_digit, output_digit,
output_numeric, output_mirror, output_joining_type,
output_joining_group, output_scripts, output_scripts_byname,
output_blocks, output_ident_category, output_lbrk_tables,
output_wbrk_tables, output_gbp_table, output_decomposition_tables,
output_composition_tables, output_simple_mapping, output_casing_rules):
Invoke output_library_license.
(output_predicate_test, output_decimal_digit_test, output_digit_test,
output_numeric_test, output_joining_type_test,
output_joining_group_test, output_gbp_test, output_simple_mapping_test):
Invoke output_tests_license.
* lib/uni*/*.h, lib/uni*/*.gperf: Regenerated.
* tests/uni*/*.h: Likewise.
|
|
|
|
|
|
| |
* tests/test-reallocarray.c (main): Don’t assume that
PTRDIFF_MAX / 2 + 1 <= SIZE_MAX. POSIX allows platforms
where this isn’t true, though I don’t know of any examples.
|
|
|
|
|
|
|
|
|
| |
* lib/dfa.c (addtok_mb, realloc_trans_if_necessary, enlist):
* lib/readtokens.c (readtokens):
* tests/uninorm/test-u32-normalize-big.c:
(read_normalization_test_file):
Prefer xreallocarray to the equivalent xnrealloc.
The newer name follows the glibc lead of ‘reallocarray’.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* m4/sigaltstack.m4 (SV_SIGALTSTACK): Don’t attempt to override
SIGSTKSZ. Instead, use an array that is plenty large, while
checking that it’s large enough. Also, be consistent about
putting that array in static storage rather than on the stack.
* tests/altstack-util.h (SIGSTKSZ): Don’t define.
(MYSTACK_SIZE): New macro, used consistently instead of SIGSTKSZ.
(mystack_storage, mystack): Now static.
(prepare_alternate_stack) [defined SIGSTKSZ]:
Check that MYSTACK_SIZE is large enough.
|
|
|
|
|
|
|
|
|
|
|
| |
* tests/test-sigsegv-catch-segv1.c: New file, from GNU libsigsegv with
modifications.
* tests/test-sigsegv-catch-segv2.c: Likewise.
* tests/test-sigsegv-catch-stackoverflow1.c: Likewise.
* tests/test-sigsegv-catch-stackoverflow2.c: Likewise.
* tests/altstack-util.h: Likewise.
* tests/mmap-anon-util.h: Likewise.
* modules/sigsegv-tests: New file.
|
|
|
|
|
|
|
|
| |
* tests/test-realloc-gnu.c (main): if MALLOC_CHECK_ env var
is set then don't check ENOMEM is returned from realloc().
See https://sourceware.org/bugzilla/show_bug.cgi?id=27870
Note it doesn't suffice to unsetenv() this var within the program,
as the hooks have already been set up at that stage.
|
|
|
|
|
|
|
|
|
| |
Reported by Nicholas Gaya <nicholasgaya@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2021-05/msg00014.html>.
* tests/test-fcntl.c (main): Close fd 10 before assuming that it is
closed.
* tests/test-execute-main.c: Update comment.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tests/test-malloc-gnu.c: Include "macros.h".
(main): Use ASSERT.
* tests/test-calloc-gnu.c: Include "macros.h".
(main): Use ASSERT.
* tests/test-realloc-gnu.c: Include "macros.h".
(main): Use ASSERT.
* tests/test-reallocarray.c: Include "macros.h".
(main): Use ASSERT.
* modules/malloc-gnu-tests (Files): Add tests/macros.h.
* modules/calloc-gnu-tests (Files): Likewise.
* modules/realloc-gnu-tests (Files): Likewise.
* modules/reallocarray-tests (Files): Likewise.
|
|
|
|
| |
* tests/test-reallocarray.c (main): Accept EOVERFLOW error code.
|
|
|
|
|
|
|
|
| |
* tests/test-malloc-gnu.c: Include <errno.h>.
(main): Verify that, when an allocation larger than PTRDIFF_MAX failed,
errno is ENOMEM.
* tests/test-realloc-gnu.c: Likewise.
* tests/test-calloc-gnu.c: Likewise.
|
|
|
|
| |
* tests/test-free.c (main): Skip the hairy test on glibc < 2.15.
|
|
|
|
|
|
|
|
|
| |
This problem affects only platforms where xalloc_oversized
divides a number by the size arg. Fix this by defining
xalloc_oversized (n, s) to work even if s == 0.
* lib/malloca.h, lib/xalloc-oversized.h: Document new behavior.
* lib/xalloc-oversized.h (__xalloc_oversized): Do not crash if S==0.
* tests/test-reallocarray.c (main): Test for the bug.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* doc/glibc-functions/reallocarray.texi (reallocarray):
Mention ptrdiff_t overflow.
* lib/reallocarray.c (reallocarray): Reindent as per usual GNU.
* lib/stdlib.in.h (reallocarray): Allow reallocarray to be replaced.
* m4/reallocarray.m4 (gl_FUNC_REALLOCARRAY):
Check for ptrdiff_t overflow.
* m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Set up REPLACE_REALLOCARRAY.
* modules/reallocarray (Files): Add malloc.m4.
(configure.ac): Also test REPLACE_REALLOCARRAY.
* modules/reallocarray-tests (Depends-on): Add stdint.
* modules/stdlib (stdlib.h): Substitute REPLACE_REALLOCARRAY.
* tests/test-reallocarray.c: Include stdint.h.
(main): Check for ptrdiff_t overflow.
|
|
|
|
|
|
| |
* tests/test-calloc-gnu.c (identity): New function, replacing ‘eight’.
(main): Do 2 * log2(SIZE_MAX) tests instead of just two tests.
Don’t bother to free on failure.
|
|
|
|
|
|
| |
* tests/test-execute-main.c (main): Use 0x7DEADBEE rather than
0xDEADBEEF for nonces, to avoid provoking AIX XLC compiler warning
that the latter is out of int range.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In some more test locations, store the result of malloc etc. into
a volatile pointer so that clang doesn’t optimize away the malloc
and thus bypass the test. This fixes a malloc-gnu test failure on
macOS 11.2.3 with clang 12.0.0 on ARM.
* tests/test-alloca-opt.c (do_allocation):
* tests/test-malloc-gnu.c (main):
* tests/test-malloca.c (do_allocation):
* tests/test-realloc-gnu.c (main):
* tests/test-reallocarray.c (main):
* tests/test-aligned-malloc.c (main):
* tests/test-aligned_alloc.c (main):
Store malloc etc. results into a volatile pointer.
|
|
|
|
|
|
|
|
| |
* tests/test-malloc-gnu.c (main):
* tests/test-realloc-gnu.c (main): Hide true intentions from GCC,
to prevent diagnostics like “warning: argument 1 value
‘9223372036854775808’ exceeds maximum object size
9223372036854775807 [-Walloc-size-larger-than=]”.
|
|
|
|
|
|
|
|
|
| |
* modules/calloc-gnu-tests (Depends-on):
* modules/malloc-gnu-tests (Depends-on):
* modules/realloc-gnu-tests (Depends-on): Add stdint.
* tests/test-calloc-gnu.c (main):
* tests/test-malloc-gnu.c (main):,
* tests/test-realloc-gnu.c (main): Test for ptrdiff_t overflow.
|
|
|
|
|
|
|
|
|
| |
Reported by Dmitry V. Levin <ldv@altlinux.org> in
<https://lists.gnu.org/archive/html/bug-gnulib/2021-04/msg00082.html>.
* tests/test-execute-main.c (main): Close file descriptors 3..19.
* tests/test-execute-child.c (main): Remove NetBSD workaround.
* modules/execute-tests (configure.ac): Test for close_range function.
|
|
|
|
|
|
|
|
|
|
|
| |
Reported by Bruno Haible in
<https://lists.gnu.org/archive/html/bug-gnulib/2021-04/msg00047.html>
after a Coverity run.
* lib/hamt.c (bucket_do_while, hamt_iterator): Add missing
derefencing operator and silence a bogus warning on uninitialized
variables.
* tests/test-hamt.c (test_general): Replace two errorneous
assignment operators with comparison operators.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tests/test-array_list.c (check_equals_by_forward_iteration,
check_equals_by_backward_iteration): New functions.
(main): Invoke them.
* tests/test-carray_list.c: Likewise.
* tests/test-linked_list.c: Likewise.
* tests/test-linkedhash_list.c: Likewise.
* tests/test-avltree_list.c: Likewise.
* tests/test-avltreehash_list.c: Likewise.
* tests/test-rbtree_list.c: Likewise.
* tests/test-rbtreehash_list.c: Likewise.
|
|
|
|
|
|
|
|
|
|
| |
This module provides (persistent) hash array mapped tries.
* MODULES.html.sh: Add hamt.
* lib/hamt.c: New file.
* lib/hamt.h: New file.
* modules/hamt: New file.
* modules/hamt-tests: New file.
* tests/test-hamt.c: New file.
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/stdlib.in.h (strtoll): Override if REPLACE_STRTOLL is 1.
* m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_STRTOLL.
* m4/strtoll.m4 (gl_FUNC_STRTOLL): Test whether strtoll works. Set
REPLACE_STRTOLL.
* modules/stdlib (Makefile.am): Substitute REPLACE_STRTOLL.
* modules/strtoll (configure.ac): Test REPLACE_STRTOLL.
* tests/test-strtoll.c (main): Add tests of hexadecimal integer syntax.
* doc/posix-functions/strtoll.texi: Mention the bug.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/stdlib.in.h (strtol): New declaration.
* m4/stdlib_h.m4 (gl_STDLIB_H): Test whether strtol is declared.
(gl_STDLIB_H_DEFAULTS): Initialize GNULIB_STRTOL, HAVE_STRTOL,
REPLACE_STRTOL.
* m4/strtol.m4 (gl_FUNC_STRTOL): Require gl_STDLIB_H_DEFAULTS. Test
whether strtol works. Set REPLACE_STRTOL.
* modules/stdlib (Makefile.am): Substitute GNULIB_STRTOL, HAVE_STRTOL,
REPLACE_STRTOL.
* modules/strtol (Status, Notice): Remove.
(Depends-on): Add stdlib.
(configure.ac): Test HAVE_STRTOL and REPLACE_STRTOL. Invoke
gl_STDLIB_MODULE_INDICATOR.
* tests/test-strtol.c (main): Add tests of hexadecimal integer syntax.
* doc/posix-functions/strtol.texi: Mention the bug.
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/stdlib.in.h (strtoull): Override if REPLACE_STRTOULL is 1.
* m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_STRTOULL.
* m4/strtoull.m4 (gl_FUNC_STRTOULL): Test whether strtoull works. Set
REPLACE_STRTOULL.
* modules/stdlib (Makefile.am): Substitute REPLACE_STRTOULL.
* modules/strtoull (configure.ac): Test REPLACE_STRTOULL.
* tests/test-strtoull.c (main): Add tests of hexadecimal integer syntax.
* doc/posix-functions/strtoull.texi: Mention the bug.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reported by Eric Blake <eblake@redhat.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00082.html>.
* lib/stdlib.in.h (strtoul): New declaration.
* m4/stdlib_h.m4 (gl_STDLIB_H): Test whether strtoul is declared.
(gl_STDLIB_H_DEFAULTS): Initialize GNULIB_STRTOUL, HAVE_STRTOUL,
REPLACE_STRTOUL.
* m4/strtoul.m4 (gl_FUNC_STRTOUL): Require gl_STDLIB_H_DEFAULTS. Test
whether strtoul works. Set REPLACE_STRTOUL.
* modules/stdlib (Makefile.am): Substitute GNULIB_STRTOUL, HAVE_STRTOUL,
REPLACE_STRTOUL.
* modules/strtoul (Status, Notice): Remove.
(Depends-on): Add stdlib.
(configure.ac): Test HAVE_STRTOUL and REPLACE_STRTOUL. Invoke
gl_STDLIB_MODULE_INDICATOR.
* tests/test-strtoul.c (main): Add tests of hexadecimal integer syntax.
* doc/posix-functions/strtoul.texi: Mention the bug.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tests/test-asyncsafe-linked_list-strong.c: Renamed from
tests/test-asyncsafe-linked_list.c.
* tests/test-asyncsafe-linked_list-strong.sh: Renamed from
tests/test-asyncsafe-linked_list.sh.
* tests/test-asyncsafe-linked_list-weak.c: New file, based on
tests/test-asyncsafe-linked_list.c.
* tests/test-asyncsafe-linked_list-weak.sh: New file, based on
tests/test-asyncsafe-linked_list.sh.
* modules/linked-list-tests (Files): Add
tests/test-asyncsafe-linked_list-weak.*,
tests/test-asyncsafe-linked_list-strong.*.
(Makefile.am): Arrange to test also
tests/test-asyncsafe-linked_list-weak.sh. Mark
test-asyncsafe-linked_list-weak.sh and
test-asyncsafe-linked_list-strong.sh as expected failures.
|
|
|
|
|
| |
* tests/test-renameatu.c (main): Add test for identical rename with
RENAME_NOREPLACE.
|
|
|
|
|
|
|
| |
* tests/test-dynarray.c (value_at): Avoid undefined behavior
in signed integer multiplication.
* tests/test-scratch-buffer.c (byte_at): Likewise, for the
theoretically-possible case where size_t is narrower than int.
|
|
|
|
|
|
|
| |
Reported by Tom G. Christensen <tgc@jupiterrise.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00085.html>.
* tests/test-simple-atomic.c (yield): Define only after all #includes.
|
|
|
|
|
|
|
| |
Reported by Thomas Klausner <tk@giga.or.at> in
<https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00069.html>.
* tests/test-parse-datetime.c (main): Skip two tests on NetBSD.
|
|
|
|
|
|
|
|
|
|
| |
* lib/lc-charset-dispatch.c: Test GNULIB_WCHAR_SINGLE_LOCALE instead of
GNULIB_WCHAR_SINGLE.
* lib/wcwidth.c: Likewise.
* tests/test-wcwidth.c: Likewise.
* doc/multithread.texi: Document GNULIB_WCHAR_SINGLE_LOCALE instead of
GNULIB_WCHAR_SINGLE.
* NEWS: Document the change.
|
|
|
|
|
| |
* tests/test-dynarray.c: New file.
* modules/dynarray-tests: New file.
|
|
|
|
|
|
| |
* modules/string-buffer (License): Change to LGPL.
* tests/test-string-buffer.c (main): Add another sb_appendf call, that
is more likely to fail.
|
|
|
|
|
| |
* tests/test-string-buffer.c: New file.
* modules/string-buffer-tests: New file.
|
|
|
|
|
|
|
|
|
| |
* tests/test-asyncsafe-linked_list.sh: New file.
* tests/test-asyncsafe-linked_list.c: New file.
* modules/linked-list-tests (Files): Add them.
(Depends-on): Add thread, yield, nanosleep, sigaction, sigprocmask.
(Makefile.am): Arrange to compile test-asyncsafe-linked_list.c and run
test-asyncsafe-linked_list.sh.
|
|
|
|
|
| |
* tests/test-simple-atomic.c: New file.
* modules/simple-atomic-tests: New file.
|
|
|
|
|
| |
* tests/test-posixtm.c (main): Convert two 'time_t' values to 'long' for
printing.
|
|
|
|
|
| |
* tests/test-immutable.c (install_segv_handler): On FreeBSD, install the
handler also for SIGBUS.
|
|
|
|
|
|
|
|
|
| |
* tests/test-c32isalnum.c (main): On FreeBSD, disable tests that fail on
MidnightBSD 1.1.
* tests/test-c32isalpha.c (main): Likewise.
* tests/test-c32isblank.c (main): Likewise.
* tests/test-c32islower.c (main): Likewise.
* tests/test-c32isupper.c (main): Likewise.
|
|
|
|
| |
* tests/test-regex.c (main): New test case for glibc bug 11053.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a longstanding glibc bug concerning backreferences
<https://sourceware.org/11053> (2009-12-04).
* lib/regexec.c (proceed_next_node, push_fail_stack)
(pop_fail_stack): Push and pop the previous registers
as well as the current ones. All callers changed.
(set_regs): Also pop if CUR_NODE has already been checked,
so that it does not get added as a duplicate set entry.
(update_regs): Fix comment location.
* tests/test-regex.c (tests): New constant.
(bug_regex11): New test function.
(main): Bump alarm value. Call new test function.
|