|
From: Carl L. <ca...@so...> - 2019-04-05 20:05:28
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=7804ba3debb0ee990aaa49949d2629445c103d2b commit 7804ba3debb0ee990aaa49949d2629445c103d2b Author: Carl Love <ca...@us...> Date: Fri Apr 5 15:04:23 2019 -0500 PPC64, fix test_isa_3_0_other.c test Valgrind ppc64 test_isa_3_0_other test will attempt to display all of the bits of the XER as part of the test case results. The tests have no existing logic to clear those bits, so this can pick up straggling values that cascade into a testcase failure. This adds some code to correct this in two directions; - Print only the bits that are expected by the tests. This is currently just the OV and OV32 bits. - print all of the bits when run under higher verbosity levels. Bugzilla 406198 - none/tests/ppc64/test_isa_3_0_other test sporadically including CA bit in output Patch submitted by Will Schmidt <wil...@vn...> Patch reviewed, committed by: Carl Love <ce...@us...> Diff: --- NEWS | 2 ++ none/tests/ppc64/ppc64_helpers.h | 18 +++++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 8e5ea70..9a1e9dd 100644 --- a/NEWS +++ b/NEWS @@ -137,6 +137,8 @@ where XXXXXX is the bug number as listed below. 405734 PPC64, vrlwnm, vrlwmi, vrldrm, vrldmi do not work properly when me < mb 405782 "VEX temporary storage exhausted" when attempting to debug slic3r-pe 405722 Support arm64 core dump +406198 none/tests/ppc64/test_isa_3_0_other test sporadically including CA + bit in output. n-i-bz add syswrap for PTRACE_GET|SET_THREAD_AREA on amd64. n-i-bz Fix callgrind_annotate non deterministic order for equal total diff --git a/none/tests/ppc64/ppc64_helpers.h b/none/tests/ppc64/ppc64_helpers.h index 5b8f314..36c4737 100644 --- a/none/tests/ppc64/ppc64_helpers.h +++ b/none/tests/ppc64/ppc64_helpers.h @@ -405,12 +405,28 @@ static void dissect_xer_raw(unsigned long local_xer) { printf(" %s", xer_strings[i]); } } +/* Display only the XER contents that are relevant for our tests. + * this is currently the OV and OV32 bits. */ +static void dissect_xer_valgrind(unsigned long local_xer) { + int i; + long mybit; + i = 33; // OV + mybit = 1ULL << (63 - i); + if (mybit & local_xer) printf(" %s", xer_strings[i]); + i = 44; // OV32 + mybit = 1ULL << (63 - i); + if (mybit & local_xer) printf(" %s", xer_strings[i]); +} + /* */ static void dissect_xer(unsigned long local_xer) { if (verbose > 1) printf(" [[ xer:%lx ]]", local_xer); - dissect_xer_raw(local_xer); + if (verbose > 2 ) + dissect_xer_raw(local_xer); + else + dissect_xer_valgrind(local_xer); } |