https://bugs.kde.org/show_bug.cgi?id=459031

            Bug ID: 459031
           Summary: Documentation of --error-exitcode is incomplete.
           Product: valgrind
           Version: 3.18.1
          Platform: Ubuntu Packages
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: jsew...@acm.org
          Reporter: dave...@gmail.com
  Target Milestone: ---

SUMMARY
***
Documentation on --error-exitcode incomplete
***


STEPS TO REPRODUCE
1.   valgrind --error-exitcode=1  /tmp/myprogram
2.   When myprogram exits with 1 determine if the failure
      was valgrind or the program.
3. 

Seen on Ubuntu 22.04 man page
and http://www.valgrind.org/docs/manual/index.html
ADDITIONAL INFORMATION

neither says anything explicitly about what exit code is returned
if valgrind does not find an error. AFAICT.

In my tests, it appears that when valgrind
finds no problem valgrind returns the exit code
of the application under test if --error-exitcode is set non-zero.
I suggest that the web page and man page should say that clearly.

in html version:
"Specifies an alternative exit code to return if Valgrind reported any errors
in the run. 
When set to the default value (zero), the return value from Valgrind will
always be the
 return value of the process being simulated. When set to a nonzero value, that
value 
is returned instead, if Valgrind detects any errors. This is useful for using
Valgrind as 
part of an automated test suite, since it makes it easy to detect test cases
for which 
Valgrind has reported errors, just by inspecting return codes."

Which fails to clearly state that  " if Valgrind detects no errors the return
code of the
process being simulated is returned by Valgrind".

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to