Skip to content

Commit f1e348c

Browse files
committed
Change the exit status used for valgrind errors and check for it in tests
1 parent a113174 commit f1e348c

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

mk/platform.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ ifdef CFG_UNIXY
114114
endif
115115
ifdef CFG_VALGRIND
116116
CFG_VALGRIND += --leak-check=full \
117-
--error-exitcode=1 \
117+
--error-exitcode=100 \
118118
--quiet --suppressions=$(CFG_SRC_DIR)src/etc/x86.supp
119119
endif
120120
endif

src/test/compiletest/procsrv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ fn run(handle: &handle, lib_path: &str, prog: &str, args: &[str],
6666
writeclose(resp.infd, input);
6767
let output = readclose(resp.outfd);
6868
let errput = readclose(resp.errfd);
69-
let status = os::waitpid(resp.pid);
69+
let status = run::waitpid(resp.pid);
7070
ret {status: status, out: output, err: errput};
7171
}
7272

src/test/compiletest/runtest.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,7 @@ fn run_rfail_test(cx: &cx, props: &test_props, testfile: &str) {
5555
fatal_procres("run-fail test didn't produce an error!", procres);
5656
}
5757

58-
// This is the value valgrind returns on failure
59-
// FIXME: Why is this value neither the value we pass to
60-
// valgrind as --error-exitcode (1), nor the value we see as the
61-
// exit code on the command-line (137)?
62-
const valgrind_err: int = 9;
58+
const valgrind_err: int = 100;
6359
if procres.status == valgrind_err {
6460
fatal_procres("run-fail test isn't valgrind-clean!", procres);
6561
}

0 commit comments

Comments
 (0)