From: Paul Floyd Date: Sat, 9 Mar 2024 14:34:52 +0000 (+0100) Subject: FreeBSD regtest: make get_set_context platform independent with a filter X-Git-Tag: VALGRIND_3_23_0~121 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f049be77fe93120f3f19350594e934461cd5b5d;p=thirdparty%2Fvalgrind.git FreeBSD regtest: make get_set_context platform independent with a filter Don't want to keep adding expecteds --- diff --git a/memcheck/tests/freebsd/Makefile.am b/memcheck/tests/freebsd/Makefile.am index a3bf0c660d..99b971dc6d 100644 --- a/memcheck/tests/freebsd/Makefile.am +++ b/memcheck/tests/freebsd/Makefile.am @@ -3,7 +3,7 @@ include $(top_srcdir)/Makefile.tool-tests.am dist_noinst_SCRIPTS = filter_stderr filter_pts dump_stdout filter_sigwait \ filter_scalar filter_realpathat filter_fstat filter_eventfd2 \ - toucher1 toucher2 filter_getfsstat + toucher1 toucher2 filter_getfsstat filter_context EXTRA_DIST = \ access.vgtest \ @@ -53,7 +53,6 @@ EXTRA_DIST = \ file_locking_wait6.stderr.exp \ get_set_context.vgtest \ get_set_context.stderr.exp \ - get_set_context.stderr.exp-x86 \ get_set_login.vgtest \ get_set_login.stderr.exp \ getfh.vgtest \ diff --git a/memcheck/tests/freebsd/filter_context b/memcheck/tests/freebsd/filter_context new file mode 100755 index 0000000000..d6decdbef0 --- /dev/null +++ b/memcheck/tests/freebsd/filter_context @@ -0,0 +1,5 @@ +#! /bin/sh + +../filter_stderr "$@" | + +gsed 's/size ... free/size ... free/' diff --git a/memcheck/tests/freebsd/get_set_context.stderr.exp b/memcheck/tests/freebsd/get_set_context.stderr.exp index 51a38a8e01..29b1e6288c 100644 --- a/memcheck/tests/freebsd/get_set_context.stderr.exp +++ b/memcheck/tests/freebsd/get_set_context.stderr.exp @@ -1,7 +1,7 @@ Syscall param setcontext(ucp) points to unaddressable byte(s) ... by 0x........: main (get_set_context.c:47) - Address 0x........ is 0 bytes inside a block of size 880 free'd + Address 0x........ is 0 bytes inside a block of size ... free'd at 0x........: free (vg_replace_malloc.c:...) by 0x........: main (get_set_context.c:46) Block was alloc'd at @@ -11,7 +11,7 @@ Syscall param setcontext(ucp) points to unaddressable byte(s) Syscall param swapcontext(ucp) points to unaddressable byte(s) ... by 0x........: main (get_set_context.c:48) - Address 0x........ is 0 bytes inside a block of size 880 free'd + Address 0x........ is 0 bytes inside a block of size ... free'd at 0x........: free (vg_replace_malloc.c:...) by 0x........: main (get_set_context.c:46) Block was alloc'd at @@ -21,7 +21,7 @@ Syscall param swapcontext(ucp) points to unaddressable byte(s) Syscall param swapcontext(oucp) points to unaddressable byte(s) ... by 0x........: main (get_set_context.c:48) - Address 0x........ is 0 bytes inside a block of size 880 free'd + Address 0x........ is 0 bytes inside a block of size ... free'd at 0x........: free (vg_replace_malloc.c:...) by 0x........: main (get_set_context.c:46) Block was alloc'd at @@ -31,7 +31,7 @@ Syscall param swapcontext(oucp) points to unaddressable byte(s) Syscall param getcontext(ucp) points to unaddressable byte(s) ... by 0x........: main (get_set_context.c:49) - Address 0x........ is 0 bytes inside a block of size 880 free'd + Address 0x........ is 0 bytes inside a block of size ... free'd at 0x........: free (vg_replace_malloc.c:...) by 0x........: main (get_set_context.c:46) Block was alloc'd at diff --git a/memcheck/tests/freebsd/get_set_context.stderr.exp-x86 b/memcheck/tests/freebsd/get_set_context.stderr.exp-x86 deleted file mode 100644 index 2aa1e85b5d..0000000000 --- a/memcheck/tests/freebsd/get_set_context.stderr.exp-x86 +++ /dev/null @@ -1,40 +0,0 @@ -Syscall param setcontext(ucp) points to unaddressable byte(s) - ... - by 0x........: main (get_set_context.c:47) - Address 0x........ is 0 bytes inside a block of size 704 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (get_set_context.c:46) - Block was alloc'd at - at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (get_set_context.c:45) - -Syscall param swapcontext(ucp) points to unaddressable byte(s) - ... - by 0x........: main (get_set_context.c:48) - Address 0x........ is 0 bytes inside a block of size 704 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (get_set_context.c:46) - Block was alloc'd at - at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (get_set_context.c:45) - -Syscall param swapcontext(oucp) points to unaddressable byte(s) - ... - by 0x........: main (get_set_context.c:48) - Address 0x........ is 0 bytes inside a block of size 704 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (get_set_context.c:46) - Block was alloc'd at - at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (get_set_context.c:45) - -Syscall param getcontext(ucp) points to unaddressable byte(s) - ... - by 0x........: main (get_set_context.c:49) - Address 0x........ is 0 bytes inside a block of size 704 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (get_set_context.c:46) - Block was alloc'd at - at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (get_set_context.c:45) - diff --git a/memcheck/tests/freebsd/get_set_context.vgtest b/memcheck/tests/freebsd/get_set_context.vgtest index a547fb87b6..811f303f3b 100644 --- a/memcheck/tests/freebsd/get_set_context.vgtest +++ b/memcheck/tests/freebsd/get_set_context.vgtest @@ -1,2 +1,3 @@ prog: get_set_context vgopts: -q +stderr_filter: filter_context