tests: Don't test invalid aligned allocations if avoiding UB

We can't exercise precondition check failures if GLib was (inadvisably)
compiled with -Dglib_checks=false, and we shouldn't necessarily exercise
precondition check failures when using QA tools like valgrind, so skip
these tests if run with -m no-undefined.

Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
Simon McVittie 2022-02-15 10:56:59 +00:00
parent 38cdfe3c02
commit b0f686a00e

View File

@ -965,6 +965,7 @@ test_aligned_mem (void)
g_assert_null (a);
#define CHECK_SUBPROCESS_FAIL(name,msg) do { \
if (g_test_undefined ()) \
{ \
g_test_message (msg); \
g_test_trap_subprocess ("/utils/aligned-mem/subprocess/" #name, 0, 0); \