You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As inspired by #239 (review) and related reply, we currently have a handful of asserts across the code-base - libkmod, shared, testsuite, tools.
From a library POV asserts are not wanted, since it would lead to crashes. From a test POV, the crash (or crash-like) behaviour is exactly what we want. In addition meson (since v0.50 or thereabouts) sets -DNDEBUG for --buildtype=release, thus the asserts get removed.
Seemingly we have two conflicting needs... Ideally we'll nuke all the asserts and/or replace them with something more suitable. As an alternative we could build the assert containing code twice - normal + one for our code/test coverage (always undefine NDEBUG)
Rough list of ideas/tasks:
list all asserts and their use-case - test, oh-shit-we-might-break-it-in-the-future, other
remove any genuinely unwanted asserts
check/augment the tests so the oh-shit-we-might-break-it-in-the-future cases are covered
add wrapper for each use-case and/or build assert containing code twice, other
The text was updated successfully, but these errors were encountered:
As inspired by #239 (review) and related reply, we currently have a handful of asserts across the code-base - libkmod, shared, testsuite, tools.
From a library POV asserts are not wanted, since it would lead to crashes. From a test POV, the crash (or crash-like) behaviour is exactly what we want. In addition meson (since v0.50 or thereabouts) sets
-DNDEBUG
for--buildtype=release
, thus the asserts get removed.Seemingly we have two conflicting needs... Ideally we'll nuke all the asserts and/or replace them with something more suitable. As an alternative we could build the assert containing code twice - normal + one for our code/test coverage (always undefine
NDEBUG
)Rough list of ideas/tasks:
oh-shit-we-might-break-it-in-the-future
cases are coveredThe text was updated successfully, but these errors were encountered: