Closed kloczek closed 2 years ago
+ cd smc-tools-1.8.1 + /usr/bin/make -O -j48 V=1 VERBOSE=1 check if type -p cppcheck >/dev/null; then \ echo "Running cppcheck"; \ cppcheck . 2>&1; \ else \ echo "cppcheck not available"; \ fi Running cppcheck Checking dev.c ... Checking dev.c: SMCD... Checking dev.c: SMCD;SMCR... Checking dev.c: SMCR... 1/12 files checked 12% done Checking info.c ... Checking info.c: SMCD... Checking info.c: SMCR... 2/12 files checked 16% done Checking libnetlink.c ... 3/12 files checked 22% done Checking linkgroup.c ... Checking linkgroup.c: SMCD... Checking linkgroup.c: SMCD;SMCR... Checking linkgroup.c: SMCR... 4/12 files checked 38% done Checking seid.c ... 5/12 files checked 43% done Checking smc-preload.c ... 6/12 files checked 45% done Checking smc.c ... Checking smc.c: SMCD... Checking smc.c: SMCR... 7/12 files checked 48% done Checking smc_pnet.c ... 8/12 files checked 55% done Checking smcss.c ... 9/12 files checked 64% done Checking stats.c ... Checking stats.c: SMCD... Checking stats.c: SMCR... 10/12 files checked 91% done Checking ueid.c ... 11/12 files checked 97% done Checking util.c ... 12/12 files checked 100% done if type -p valgrind >/dev/null; then \ echo "Running valgrind"; \ valgrind --leak-check=full --show-leak-kinds=all ./smcss 2>&1; \ valgrind --leak-check=full --show-leak-kinds=all ./smc_pnet 2>&1; \ valgrind --leak-check=full --show-leak-kinds=all ./smc 2>&1; \ else \ echo "valgrind not available"; \ fi Running valgrind ==398547== Memcheck, a memory error detector ==398547== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al. ==398547== Using Valgrind-3.19.0 and LibVEX; rerun with -h for copyright info ==398547== Command: ./smcss ==398547== RTNETLINK answers: Success State UID Inode Local Address Peer Address Intf Mode ==398547== ==398547== HEAP SUMMARY: ==398547== in use at exit: 0 bytes in 0 blocks ==398547== total heap usage: 3 allocs, 3 frees, 8,664 bytes allocated ==398547== ==398547== All heap blocks were freed -- no leaks are possible ==398547== ==398547== For lists of detected and suppressed errors, rerun with: -s ==398547== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) ==398548== Memcheck, a memory error detector ==398548== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al. ==398548== Using Valgrind-3.19.0 and LibVEX; rerun with -h for copyright info ==398548== Command: ./smc_pnet ==398548== smc_pnet: SMC module not loaded ==398548== ==398548== HEAP SUMMARY: ==398548== in use at exit: 0 bytes in 0 blocks ==398548== total heap usage: 9 allocs, 9 frees, 21,312 bytes allocated ==398548== ==398548== All heap blocks were freed -- no leaks are possible ==398548== ==398548== For lists of detected and suppressed errors, rerun with: -s ==398548== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) valgrind: ./smc: No such file or directory make: *** [Makefile:194: check] Error 127
BTW small patch which detaches from which command
which
--- a/Makefile +++ b/Makefile @@ -189,14 +189,14 @@ endif check: - if which cppcheck >/dev/null; then \ + if type -p cppcheck >/dev/null; then \ echo "Running cppcheck"; \ cppcheck . 2>&1; \ else \ echo "cppcheck not available"; \ fi @echo; - if which valgrind >/dev/null; then \ + if type -p valgrind >/dev/null; then \ echo "Running valgrind"; \ valgrind --leak-check=full --show-leak-kinds=all ./smcss 2>&1; \ valgrind --leak-check=full --show-leak-kinds=all ./smc_pnet 2>&1; \
Thanks for reporting! Will look into this soon!
Just pushed a new commit that addresses this: 088eb2fb9052 "Makefile: Fix target 'check'"
command instead type .. hmm seems you are right 👍
BTW small patch which detaches from
which
command