]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
regtest: rename memcheck wcpncpy
authorPaul Floyd <pjfloyd@wanadoo.fr>
Mon, 3 Nov 2025 20:43:17 +0000 (21:43 +0100)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Mon, 3 Nov 2025 20:43:17 +0000 (21:43 +0100)
The perl script filter_memcheck removes callstack elements that
are not of interest and changes vg_replace_strmem.c/vg_replace_malloc.c
line numbers to '...'. It protects lines containing the testcase
name.

When the testcase name is the same as the C function being tested
that's not really what we want. My perl isn't really good enough
to be able to only change the line numbers when it is a 'tool file'.
Instead I'm renaming the testcase.

memcheck/tests/Makefile.am
memcheck/tests/wcpncpy.stderr.exp [deleted file]
memcheck/tests/wcpncpy.vgtest [deleted file]
memcheck/tests/wcpncpy1.c [moved from memcheck/tests/wcpncpy.c with 100% similarity]
memcheck/tests/wcpncpy1.stderr.exp [new file with mode: 0644]
memcheck/tests/wcpncpy1.vgtest [new file with mode: 0644]

index 755f422ee548b9092a50e8e1fc3791c99f55ad5a..6343b1b7c863e05d945f1907f97390a61f4c0a28 100644 (file)
@@ -461,7 +461,7 @@ EXTRA_DIST = \
        vcpu_fnfns.stdout.exp-darwin vcpu_fnfns.stdout.exp-solaris \
        vcpu_fnfns.stdout.exp-illumos \
        vcpu_fnfns.stderr.exp vcpu_fnfns.vgtest \
-       wcpncpy.stderr.exp wcpncpy.vgtest \
+       wcpncpy1.stderr.exp wcpncpy1.vgtest \
        wcs.vgtest wcs.stderr.exp wcs.stdout.exp \
        wcscat.vgtest wcscat.stderr.exp wcscat.stdout.exp \
        wcsncpy.vgtest wcsncpy.stderr.exp \
@@ -656,7 +656,7 @@ check_PROGRAMS += threadname
 endif
 
 if HAVE_WCPNCPY
-check_PROGRAMS += wcpncpy
+check_PROGRAMS += wcpncpy1
 endif
 
 # are there still pre-C99 C compilers?
diff --git a/memcheck/tests/wcpncpy.stderr.exp b/memcheck/tests/wcpncpy.stderr.exp
deleted file mode 100644 (file)
index 0ff9e5c..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-Conditional jump or move depends on uninitialised value(s)
-   at 0x........: wcpncpy (vg_replace_strmem.c:2427)
-   by 0x........: main (wcpncpy.c:14)
-
-Invalid write of size 4
-   at 0x........: wcpncpy (vg_replace_strmem.c:2427)
-   by 0x........: main (wcpncpy.c:27)
- Address 0x........ is 20 bytes inside a block of size 22 alloc'd
-   at 0x........: malloc (vg_replace_malloc.c:...)
-   by 0x........: main (wcpncpy.c:10)
-
-Source and destination overlap in wcpncpy(0x........, 0x........)
-   at 0x........: wcpncpy (vg_replace_strmem.c:2427)
-   by 0x........: main (wcpncpy.c:35)
-
-Source and destination overlap in wcpncpy(0x........, 0x........)
-   at 0x........: wcpncpy (vg_replace_strmem.c:2427)
-   by 0x........: main (wcpncpy.c:43)
-
diff --git a/memcheck/tests/wcpncpy.vgtest b/memcheck/tests/wcpncpy.vgtest
deleted file mode 100644 (file)
index f4edd4b..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-prereq: test -e ./wcpncpy
-prog: wcpncpy
-vgopts: -q
diff --git a/memcheck/tests/wcpncpy1.stderr.exp b/memcheck/tests/wcpncpy1.stderr.exp
new file mode 100644 (file)
index 0000000..1b7fd22
--- /dev/null
@@ -0,0 +1,19 @@
+Conditional jump or move depends on uninitialised value(s)
+   at 0x........: wcpncpy (vg_replace_strmem.c:...)
+   by 0x........: main (wcpncpy1.c:14)
+
+Invalid write of size 4
+   at 0x........: wcpncpy (vg_replace_strmem.c:...)
+   by 0x........: main (wcpncpy1.c:27)
+ Address 0x........ is 20 bytes inside a block of size 22 alloc'd
+   at 0x........: malloc (vg_replace_malloc.c:...)
+   by 0x........: main (wcpncpy1.c:10)
+
+Source and destination overlap in wcpncpy(0x........, 0x........)
+   at 0x........: wcpncpy (vg_replace_strmem.c:...)
+   by 0x........: main (wcpncpy1.c:35)
+
+Source and destination overlap in wcpncpy(0x........, 0x........)
+   at 0x........: wcpncpy (vg_replace_strmem.c:...)
+   by 0x........: main (wcpncpy1.c:43)
+
diff --git a/memcheck/tests/wcpncpy1.vgtest b/memcheck/tests/wcpncpy1.vgtest
new file mode 100644 (file)
index 0000000..052393a
--- /dev/null
@@ -0,0 +1,3 @@
+prereq: test -e ./wcpncpy1
+prog: wcpncpy1
+vgopts: -q