| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some of GLib's unit tests are under an apparently GLib-specific
permissive license, vaguely similar to the BSD/MIT family but with the
GPL's lack-of-warranty wording. This is not on SPDX's list of
well-known licenses, so we need to use a custom license name prefixed
with LicenseRef if we want to represent this in SPDX/REUSE syntax.
Most of the newer tests seem to be licensed under LGPL-2.1-or-later
instead.
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
|
|
|
|
|
| |
This makes calls to test subprocesses with default behaviour more
self-documenting.
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
|
|
|
| |
We want to test the API contract, by checking the return value for
zero-sized allocations, invalid alignments, and overflows.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Include the base URI in the `g_test_bug()` calls instead. This resolves
inconsistencies between the old bug base (bugzilla.gnome.org) and the
new bug base (gitlab.gnome.org). It also has the advantage that the URI
passed to `g_test_bug()` is now clickable in the code editor, rather
than being split across two locations.
See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/275#note_303175
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes the following warning, by making the compiler checks for the
`pop` match those for the `push`:
```
[221/1124] Compiling C object 'glib/tests/d796b50@@mem-overflow@exe/mem-overflow.c.o'.
../glib/tests/mem-overflow.c:204:24: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
#pragma GCC diagnostic pop
```
Signed-off-by: Philip Withnall <withnall@endlessm.com>
|
|
|
|
|
|
| |
The `alloc-size-larger-than` warning is available starting with GCC 7,
and using it in a pragma will generate a warning on older versions of
GCC.
|
|
|
|
|
|
|
| |
We know we are overflowing the maximum allocation: it's what we're
testing for.
https://bugzilla.gnome.org/show_bug.cgi?id=794732
|
|
|
|
|
|
|
| |
Remove uses of using empty arrays in initialization and structs, and build
tests that rely on GCCisms on GCC only.
https://bugzilla.gnome.org/show_bug.cgi?id=711047
|
| |
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=679683
|
|
|
|
| |
This reverts commit ea06ec80634ff8f22882f3bc92effb10ac294e41.
|
|
|
|
|
|
| |
(or, in a few cases, to g_test_expect_message())
https://bugzilla.gnome.org/show_bug.cgi?id=679683
|
|
|
|
|
|
|
|
|
|
|
| |
Some of the GLib tests deliberately provoke warnings (or even fatal
errors) in a forked child. Normally, this is fine, but under valgrind
it's somewhat undesirable. We do want to follow fork(), so we can check
for leaks in child processes that exit gracefully; but we don't want to
be told about "leaks" in processes that are crashing, because there'd
be no point in cleaning those up anyway.
https://bugzilla.gnome.org/show_bug.cgi?id=666116
|
|
|
|
|
|
|
|
|
| |
These don't really matter, since it's test code, but they do obscure
real leaks in the library.
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=666115
Acked-by: Matthias Clasen <mclasen@redhat.com>
|
| |
|
| |
|
|
New public API:
g_malloc_n
g_malloc0_n
g_realloc_n
g_try_malloc_n
g_try_malloc0_n
g_try_realloc_n
|