From: Carl Love Date: Fri, 5 Apr 2019 20:04:23 +0000 (-0500) Subject: PPC64, fix test_isa_3_0_other.c test X-Git-Tag: VALGRIND_3_15_0~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7804ba3debb0ee990aaa49949d2629445c103d2b;p=thirdparty%2Fvalgrind.git 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 Patch reviewed, committed by: Carl Love --- diff --git a/NEWS b/NEWS index 8e5ea704ac..9a1e9dd480 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 5b8f31413a..36c473710b 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); }