From 8aaa1412415f0ee367fd950e199276082833cba1 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Thu, 30 Oct 2025 21:29:28 +0100 Subject: [PATCH] Darwin regtest: various filters Use -q to hide Darwin leaks in HEAP SUMMARY The pcmpgt test uses uint64_t whish is unsigned long long on Darwin but unsigned long on all other amd64 OSes Swap malloc_zone_memalign with posix_memalign --- memcheck/tests/amd64/Makefile.am | 2 +- memcheck/tests/amd64/bug492210_1.vgtest | 1 + memcheck/tests/amd64/bug492210_2.vgtest | 1 + memcheck/tests/amd64/filter_malloc_zone | 4 ++++ memcheck/tests/amd64/filter_pcmpgt | 7 +++++++ memcheck/tests/amd64/pcmpgt.vgtest | 2 +- memcheck/tests/amd64/sh-mem-vec128-plo-no.vgtest | 3 ++- memcheck/tests/amd64/sh-mem-vec128-plo-yes.vgtest | 3 ++- .../common/sh-mem-vec128-plo-no.stderr.exp-64bit-le | 11 ----------- .../common/sh-mem-vec128-plo-yes.stderr.exp-64bit-le | 11 ----------- 10 files changed, 19 insertions(+), 26 deletions(-) create mode 100755 memcheck/tests/amd64/filter_malloc_zone create mode 100755 memcheck/tests/amd64/filter_pcmpgt diff --git a/memcheck/tests/amd64/Makefile.am b/memcheck/tests/amd64/Makefile.am index 98f3f78fa1..4b25e1dcfc 100644 --- a/memcheck/tests/amd64/Makefile.am +++ b/memcheck/tests/amd64/Makefile.am @@ -1,7 +1,7 @@ include $(top_srcdir)/Makefile.tool-tests.am -dist_noinst_SCRIPTS = filter_stderr +dist_noinst_SCRIPTS = filter_stderr filter_malloc_zone filter_pcmpgt INSN_TESTS = insn_basic insn_mmx insn_sse insn_sse2 insn_fpu diff --git a/memcheck/tests/amd64/bug492210_1.vgtest b/memcheck/tests/amd64/bug492210_1.vgtest index e80be84ec8..9a50eaf72a 100644 --- a/memcheck/tests/amd64/bug492210_1.vgtest +++ b/memcheck/tests/amd64/bug492210_1.vgtest @@ -1,3 +1,4 @@ +prereq: test -e bug492210 prog: bug492210 vgopts: -q diff --git a/memcheck/tests/amd64/bug492210_2.vgtest b/memcheck/tests/amd64/bug492210_2.vgtest index 1c4e3614f8..159e836bf2 100644 --- a/memcheck/tests/amd64/bug492210_2.vgtest +++ b/memcheck/tests/amd64/bug492210_2.vgtest @@ -1,3 +1,4 @@ +prereq: test -e bug492210 prog: bug492210 vgopts: -q --expensive-definedness-checks=yes diff --git a/memcheck/tests/amd64/filter_malloc_zone b/memcheck/tests/amd64/filter_malloc_zone new file mode 100755 index 0000000000..442d2c46f5 --- /dev/null +++ b/memcheck/tests/amd64/filter_malloc_zone @@ -0,0 +1,4 @@ +#! /bin/sh + +./filter_stderr "$@" | +sed 's/malloc_zone_memalign/posix_memalign/' diff --git a/memcheck/tests/amd64/filter_pcmpgt b/memcheck/tests/amd64/filter_pcmpgt new file mode 100755 index 0000000000..8243e1bf4a --- /dev/null +++ b/memcheck/tests/amd64/filter_pcmpgt @@ -0,0 +1,7 @@ +#! /bin/sh + +../filter_allocs "$@" | + +# on Darwin "uint64_t" becomes unsigned long long +# on other platforms it is unsigned long +sed 's/unsigned long long/unsigned long/' diff --git a/memcheck/tests/amd64/pcmpgt.vgtest b/memcheck/tests/amd64/pcmpgt.vgtest index 15e0d76051..6b7deafe62 100644 --- a/memcheck/tests/amd64/pcmpgt.vgtest +++ b/memcheck/tests/amd64/pcmpgt.vgtest @@ -1,3 +1,3 @@ prog: pcmpgt amd64 prereq: test -e pcmpgt -stderr_filter: ../filter_allocs +stderr_filter: filter_pcmpgt diff --git a/memcheck/tests/amd64/sh-mem-vec128-plo-no.vgtest b/memcheck/tests/amd64/sh-mem-vec128-plo-no.vgtest index 160b95b28b..e167b251bb 100644 --- a/memcheck/tests/amd64/sh-mem-vec128-plo-no.vgtest +++ b/memcheck/tests/amd64/sh-mem-vec128-plo-no.vgtest @@ -1,3 +1,4 @@ prog: sh-mem-vec128 args: -q -vgopts: --partial-loads-ok=no +vgopts: --partial-loads-ok=no -q +stderr_filter: filter_malloc_zone diff --git a/memcheck/tests/amd64/sh-mem-vec128-plo-yes.vgtest b/memcheck/tests/amd64/sh-mem-vec128-plo-yes.vgtest index 76585dd373..c4216eb2cf 100644 --- a/memcheck/tests/amd64/sh-mem-vec128-plo-yes.vgtest +++ b/memcheck/tests/amd64/sh-mem-vec128-plo-yes.vgtest @@ -1,3 +1,4 @@ prog: sh-mem-vec128 args: -q -vgopts: --partial-loads-ok=yes +vgopts: --partial-loads-ok=yes -q +stderr_filter: filter_malloc_zone diff --git a/memcheck/tests/common/sh-mem-vec128-plo-no.stderr.exp-64bit-le b/memcheck/tests/common/sh-mem-vec128-plo-no.stderr.exp-64bit-le index 5edfff1a5d..e778627240 100644 --- a/memcheck/tests/common/sh-mem-vec128-plo-no.stderr.exp-64bit-le +++ b/memcheck/tests/common/sh-mem-vec128-plo-no.stderr.exp-64bit-le @@ -1,4 +1,3 @@ - sh-mem-vec128: config: little-endian, 64-bit word size 20537 136 171 75 38 63 139 23 5 110 66 421 194 86 232 115 @@ -529,13 +528,3 @@ Invalid read of size 16 dddddddddddddddd - -HEAP SUMMARY: - in use at exit: 0 bytes in 0 blocks - total heap usage: 33 allocs, 33 frees, 82,048 bytes allocated - -For a detailed leak analysis, rerun with: --leak-check=full - -Use --track-origins=yes to see where uninitialised values come from -For lists of detected and suppressed errors, rerun with: -s -ERROR SUMMARY: 66 errors from 66 contexts (suppressed: 0 from 0) diff --git a/memcheck/tests/common/sh-mem-vec128-plo-yes.stderr.exp-64bit-le b/memcheck/tests/common/sh-mem-vec128-plo-yes.stderr.exp-64bit-le index d05ac5e826..86abd93cce 100644 --- a/memcheck/tests/common/sh-mem-vec128-plo-yes.stderr.exp-64bit-le +++ b/memcheck/tests/common/sh-mem-vec128-plo-yes.stderr.exp-64bit-le @@ -1,4 +1,3 @@ - sh-mem-vec128: config: little-endian, 64-bit word size 20537 136 171 75 38 63 139 23 5 110 66 421 194 86 232 115 @@ -436,13 +435,3 @@ Invalid read of size 16 dddddddddddddddd - -HEAP SUMMARY: - in use at exit: 0 bytes in 0 blocks - total heap usage: 33 allocs, 33 frees, 82,048 bytes allocated - -For a detailed leak analysis, rerun with: --leak-check=full - -Use --track-origins=yes to see where uninitialised values come from -For lists of detected and suppressed errors, rerun with: -s -ERROR SUMMARY: 51 errors from 51 contexts (suppressed: 0 from 0) -- 2.47.3