From e25c5e40d54c4ba7a2a74e2f3ce3048d7ed70053 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 12 Nov 2023 22:11:52 +0100 Subject: [PATCH] Bug 476780 - Extend strlcat and strlcpy wrappers to GNU libc (part 2) Linux regtest --- .gitignore | 1 + memcheck/tests/linux/Makefile.am | 5 +++++ memcheck/tests/linux/strlcat_strlcpy.c | 1 + memcheck/tests/linux/strlcat_strlcpy.stderr.exp | 1 + memcheck/tests/linux/strlcat_strlcpy.vgtest | 4 ++++ 5 files changed, 12 insertions(+) create mode 120000 memcheck/tests/linux/strlcat_strlcpy.c create mode 120000 memcheck/tests/linux/strlcat_strlcpy.stderr.exp create mode 100644 memcheck/tests/linux/strlcat_strlcpy.vgtest diff --git a/.gitignore b/.gitignore index b48622c5b9..6dca0059a4 100644 --- a/.gitignore +++ b/.gitignore @@ -1158,6 +1158,7 @@ /memcheck/tests/linux/syslog-syscall /memcheck/tests/linux/timerfd-syscall /memcheck/tests/linux/proc-auxv +/memcheck/tests/linux/strlcat_strlcpy /memcheck/tests/linux/sys-openat /memcheck/tests/linux/sys-execveat /memcheck/tests/linux/check_execveat diff --git a/memcheck/tests/linux/Makefile.am b/memcheck/tests/linux/Makefile.am index 53c266e48f..fd99820aa2 100644 --- a/memcheck/tests/linux/Makefile.am +++ b/memcheck/tests/linux/Makefile.am @@ -34,6 +34,7 @@ EXTRA_DIST = \ with-space.stderr.exp with-space.stdout.exp with-space.vgtest \ proc-auxv.vgtest proc-auxv.stderr.exp getregset.vgtest \ getregset.stderr.exp getregset.stdout.exp \ + strlcat_strlpcy.vgtest strlcat_strlpcy.stderr.exp \ sys-preadv_pwritev.vgtest sys-preadv_pwritev.stderr.exp \ sys-preadv2_pwritev2.vgtest sys-preadv2_pwritev2.stderr.exp \ sys-execveat.vgtest sys-execveat.stderr.exp sys-execveat.stdout.exp \ @@ -89,6 +90,10 @@ if HAVE_SETCONTEXT check_PROGRAMS += stack_changes endif +if HAVE_STRLCAT + check_PROGRAMS += strlcat_strlcpy +endif + AM_CFLAGS += $(AM_FLAG_M3264_PRI) AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) diff --git a/memcheck/tests/linux/strlcat_strlcpy.c b/memcheck/tests/linux/strlcat_strlcpy.c new file mode 120000 index 0000000000..890912a38b --- /dev/null +++ b/memcheck/tests/linux/strlcat_strlcpy.c @@ -0,0 +1 @@ +../freebsd/strlcat_strlcpy.c \ No newline at end of file diff --git a/memcheck/tests/linux/strlcat_strlcpy.stderr.exp b/memcheck/tests/linux/strlcat_strlcpy.stderr.exp new file mode 120000 index 0000000000..1a3a51186d --- /dev/null +++ b/memcheck/tests/linux/strlcat_strlcpy.stderr.exp @@ -0,0 +1 @@ +../freebsd/strlcat_strlcpy.stderr.exp \ No newline at end of file diff --git a/memcheck/tests/linux/strlcat_strlcpy.vgtest b/memcheck/tests/linux/strlcat_strlcpy.vgtest new file mode 100644 index 0000000000..2719b06437 --- /dev/null +++ b/memcheck/tests/linux/strlcat_strlcpy.vgtest @@ -0,0 +1,4 @@ +prereq: test -e ./strlcat_strlcpy +prog: strlcat_strlcpy +vgopts: -q + -- 2.47.2