-
Notifications
You must be signed in to change notification settings - Fork 2
feat: add regression tests for instrument hooks #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add regression tests for instrument hooks #14
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't totally match what we want.
We need to check the build of this library against multiple compilers: clang, GCC, and a few of their versions. I think using zig cc instead of those compilers is a big discrepancy with what happens in the consumers
Checking against multiple targets is interesting, though, and a good first step. However, if that becomes a blocker to support those with the compilers, we should prioritize checking aarch64 and x86_64.
To use newer versions of GCC and clang, you can use the Docker images and the GitHub actions integration:
https://hub.docker.com/_/gcc
Didn't find anything for clang/LLVM, but I guess we can find something
|
Actually for clang/llvm: https://hub.docker.com/r/silkeh/clang |
760b81b to
77c1ad3
Compare
|
@art049 Added compilation tests of the C example using clang+gcc with the docker images you linked. Works quite well. Also disabled the mandb to make the tests with valgrind a bit faster. |
art049
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking much better!
-Wno-builtin-declaration-mismatch \
-Werror \
-Wno-incompatible-library-redeclaration \
-Werror \
Is it expected to have different flags for each compiler? It might complicate each integration if we have to conditionnaly swp flags.
In this workflow we could just have a var INSTRUMENT_HOOKS_CFLAGS
9f90f1b to
505dbda
Compare
The reason we had this, was because clang and gcc have different errors/flags. But I realized that we could remove the root issue (passing the wrong types to printf) to solve this. Now we only get an error in clang about the format string security which can be ignored. I also added it to GCC to be sure it works (but we don't need it). EDIT: Also enabled |
7d627d7 to
e5b3064
Compare
e5b3064 to
8d979d7
Compare
art049
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can group those in a global variable or a define to clearly state that these are the expected flags but otherwise lgtm
0ad3ac3 to
9916862
Compare
9916862 to
b260b17
Compare
zig cccompiler (based on clang) to easily cross-compile