]> git.ipfire.org Git - thirdparty/glibc.git/commit
assert: ensure posix compliance, add tests for such
authorDJ Delorie <dj@redhat.com>
Thu, 14 Nov 2024 20:12:57 +0000 (15:12 -0500)
committerDJ Delorie <dj@redhat.com>
Sat, 21 Dec 2024 03:44:01 +0000 (22:44 -0500)
commite79e5c4899e82eff1032b1f8e530234c8fcbd8b9
treeeeda6f5356f5f0c5b261e776f1a05bbbe803b2da
parentb3a7a15d99065fe2fc20f40da4ba20eb946b1f52
assert: ensure posix compliance, add tests for such

Fix assert.c so that even the fallback
case conforms to POSIX, although not exactly the same as
the default case so a test can tell the difference.

Add a test that verifies that abort is called, and that the
message printed to stderr has all the info that POSIX requires.
Verify this even when malloc isn't usable.

Reviewed-by: Paul Eggert <eggert@cs.ucla.edu>
assert/Makefile
assert/assert.c
assert/test-assert-2.c [new file with mode: 0644]