]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
meson: undefine NDEBUG in the tests
authorEmil Velikov <emil.l.velikov@gmail.com>
Mon, 11 Nov 2024 13:08:20 +0000 (13:08 +0000)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Tue, 12 Nov 2024 00:22:01 +0000 (18:22 -0600)
When using -D b_ndebug=true or inheriting CFLAGS="-DNDEBUG" from the
environment, the asserts will be no-op thus the checks in the
LD_PRELOADED libraries will be omitted.

Explicitly undefine the macro, so we don't accidentally shoot ourselves
in the foot.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/238
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
testsuite/meson.build

index e82f6082130d011229cd97d7e9a2bbe86edb3895..fdfa6eb121389c8e6551ca11bd3379546ccf17c3 100644 (file)
@@ -62,6 +62,7 @@ foreach mod : _test_override_mods
 endforeach
 
 testsuite_c_args = [
+  '-UNDEBUG',
   '-DTESTSUITE_ROOTFS="@0@/testsuite/rootfs/"'.format(meson.project_build_root()),
   '-DTOOLS_DIR="@0@/"'.format(meson.project_build_root()),
   '-DOVERRIDE_LIBDIR="@0@/testsuite/"'.format(meson.project_build_root()),