<div dir="ltr"><div>I'm curious to know the reasoning why RunSafely.sh adds "exit $exitval" to the end of the standard output capture ($OUTFILE) instead of creating another file that is just the exit value of the program:<br><br>echo "$exitval" > $OUTFILE.exitval<br><br></div><div>I've encountered two scenarios where this method has complicated things.<br></div><div><br></div><div>First, a co-worker and I were trying to compare SPEC runs in test-suite to SPEC runs executed outside of test. Patching SPEC to add "exit 0" to output is a no-no and post-processing the output files is a bit hackish.<br><br></div><div>Second, we have a couple of tests failing here that convert their output to an MD5 sum for comparisons. We have to add the "exit 0" to the output of manual execution runs before generating the MD5 to match.<br><br></div><div>Finally, any code or program that greps for "^exit " to locate the exit code in a *.out file might run into false positives if the literal word "exit" is generated by the test itself.<br></div><div><br></div><div>All in all I'd prefer these two pieces of data to be stored separately. It'd make it easier to write scripts/tools to first check for an exit code and if it's 0 then process the output file.<br><br></div><div>Outside of test-suite i have no idea what programs or tools expect "exit" to be in *.out files of a test.<br></div><div><br>Thoughts?<br></div><div>-Brian<br></div></div>