Conversation
Deal with binary API nuances. Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
|
|
||
| /// Patch vsnprintf with the given `replacement` in the given `scope`. | ||
| #define patch_vsnprintf(scope, replacement) patch( \ | ||
| scope, __vsnprintf_chk, [&](char * __str, size_t, int, size_t __size, \ |
There was a problem hiding this comment.
I think this kind of mocking is really fragile.
I prefer having less coverage and not doing this, but I guess it's not my call.
There was a problem hiding this comment.
I think this kind of mocking is really fragile.
Indeed mocking system libraries this way is fragile, but as of today the alternative is not having coverage at all. Perhaps, eventually we can migrate towards fault injection (which has its own share of ifs and buts, like Release binary and Debug binaries not being the same).
I prefer having less coverage
Generally speaking, I don't agree with reducing test coverage simply because it's inconvenient. I'd much rather look for a replacement if this becomes a pain point.
|
Thanks for the reviews! |
|
@hidmic the change introduced here is causing build failures in Release configuration on CentOS: There are several related errors but here's the first one: DetailsThe failure does not occur in Debug or None configurations, only Release and removing this commit unbreaks the build. However since this is a fix for an issue on tier 1 platforms I am not proposing a revert. |
|
This change also does not appear to address the test failures in the nightly_linux_thread_sanitizer job. |
|
Hmm, this is becoming increasingly painful. I'm surprised about |
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
This pull request deals with binary API nuances. Fixes regressions introduced by #272.
CI up to
rcutils: