Change the exit status used for valgrind errors and check for it in tests
This commit is contained in:
parent
a1131748c2
commit
f1e348ce6a
|
@ -114,7 +114,7 @@ ifdef CFG_UNIXY
|
|||
endif
|
||||
ifdef CFG_VALGRIND
|
||||
CFG_VALGRIND += --leak-check=full \
|
||||
--error-exitcode=1 \
|
||||
--error-exitcode=100 \
|
||||
--quiet --suppressions=$(CFG_SRC_DIR)src/etc/x86.supp
|
||||
endif
|
||||
endif
|
||||
|
|
|
@ -66,7 +66,7 @@ fn run(handle: &handle, lib_path: &str, prog: &str, args: &[str],
|
|||
writeclose(resp.infd, input);
|
||||
let output = readclose(resp.outfd);
|
||||
let errput = readclose(resp.errfd);
|
||||
let status = os::waitpid(resp.pid);
|
||||
let status = run::waitpid(resp.pid);
|
||||
ret {status: status, out: output, err: errput};
|
||||
}
|
||||
|
||||
|
|
|
@ -55,11 +55,7 @@ fn run_rfail_test(cx: &cx, props: &test_props, testfile: &str) {
|
|||
fatal_procres("run-fail test didn't produce an error!", procres);
|
||||
}
|
||||
|
||||
// This is the value valgrind returns on failure
|
||||
// FIXME: Why is this value neither the value we pass to
|
||||
// valgrind as --error-exitcode (1), nor the value we see as the
|
||||
// exit code on the command-line (137)?
|
||||
const valgrind_err: int = 9;
|
||||
const valgrind_err: int = 100;
|
||||
if procres.status == valgrind_err {
|
||||
fatal_procres("run-fail test isn't valgrind-clean!", procres);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue