idenning2003 / cbase

Library of C data structures and tests
https://idenning2003.github.io/cbase/
GNU General Public License v3.0
2 stars 0 forks source link

Disable valgrind for raspberry pi runner #2

Closed idenning2003 closed 2 weeks ago

idenning2003 commented 2 weeks ago

Change src/test.c so that valgrind will not run on the raspberry pi runner, but will run on most other machines. This is because valgrind does not work properly on the raspberry pi with this issue.

One approach could be to check the version of valgrind and if it is 3.7.0 or older, remove it from the command. Though if there is any other way to accomplish this with preprocessor if statements, that would be prefered.

idenning2003 commented 2 weeks ago

My approach was wrong. While the actual raspberry pi itself will install valgrind 3.7.0, the alpine container is able to get 3.23.0. I will need to think of an approach which indicates whether the host machine is my raspberry pi and I have not come up with any good options yet.

I could check the output of uname -a which outputs Linux 509525d93b3e 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 Linux for the raspberry pi, but I don't want to disable it for all arm64 linux machines.

If I wanted something more specific to just my raspberry pi, I could check a hash of the public ssh key to see if it matches 9c55f619dba0eb1c0ccb6cc790b842dc.