0
當被測試的可執行文件退出時,爲什麼Valgrind的退出碼爲1?當被測試的可執行文件退出時,爲什麼Valgrind的退出碼爲1?
$ ./test
Starting tests...
ALL TESTS PASSED
Tests run: 1
$ valgrind --error-exitcode=123 test
==27705== Memcheck, a memory error detector
==27705== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==27705== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==27705== Command: test
==27705==
==27705==
==27705== HEAP SUMMARY:
==27705== in use at exit: 0 bytes in 0 blocks
==27705== total heap usage: 30 allocs, 30 frees, 3,681 bytes allocated
==27705==
==27705== All heap blocks were freed -- no leaks are possible
==27705==
==27705== For counts of detected and suppressed errors, rerun with: -v
==27705== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
$ echo $?
1