]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
FreeBSD regtest: make get_set_context platform independent with a filter
authorPaul Floyd <pjfloyd@wanadoo.fr>
Sat, 9 Mar 2024 14:34:52 +0000 (15:34 +0100)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Sat, 9 Mar 2024 14:34:52 +0000 (15:34 +0100)
Don't want to keep adding expecteds

memcheck/tests/freebsd/Makefile.am
memcheck/tests/freebsd/filter_context [new file with mode: 0755]
memcheck/tests/freebsd/get_set_context.stderr.exp
memcheck/tests/freebsd/get_set_context.stderr.exp-x86 [deleted file]
memcheck/tests/freebsd/get_set_context.vgtest

index a3bf0c660dc3d5954806ce74ebaa99371b433c46..99b971dc6d453ff6a57687fb34b391c1e0dac53b 100644 (file)
@@ -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 (executable)
index 0000000..d6decdb
--- /dev/null
@@ -0,0 +1,5 @@
+#! /bin/sh
+
+../filter_stderr "$@" |
+
+gsed 's/size ... free/size ... free/'
index 51a38a8e010713e7f5038bd2241d05923ef3fba8..29b1e6288ca10be3b81f18d1bcbf660e8b36d168 100644 (file)
@@ -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 (file)
index 2aa1e85..0000000
+++ /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)
-
index a547fb87b6cbad0281498a4d2591ce705efe5a31..811f303f3b7bc4061280eee8e56800f40ec092be 100644 (file)
@@ -1,2 +1,3 @@
 prog: get_set_context
 vgopts: -q
+stderr_filter: filter_context