From: Paul Floyd Date: Wed, 28 Feb 2024 18:57:05 +0000 (+0100) Subject: FreeBSD regtest: add a test with sanity lvel 3 and threads X-Git-Tag: VALGRIND_3_23_0~132 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bff903be312e7f29308c8be8cc18e83d62963134;p=thirdparty%2Fvalgrind.git FreeBSD regtest: add a test with sanity lvel 3 and threads --- diff --git a/.gitignore b/.gitignore index f3c5805e2a..c190a322eb 100644 --- a/.gitignore +++ b/.gitignore @@ -2192,6 +2192,7 @@ /none/tests/freebsd/fexecve /none/tests/freebsd/hello_world /none/tests/freebsd/452275 +/none/tests/freebsd/sanity_level_thread /none/tests/freebsd/usrstack /none/tests/freebsd/proc_pid_file diff --git a/none/tests/freebsd/Makefile.am b/none/tests/freebsd/Makefile.am index 40da29ccd7..2025a54684 100644 --- a/none/tests/freebsd/Makefile.am +++ b/none/tests/freebsd/Makefile.am @@ -15,9 +15,6 @@ EXTRA_DIST = \ osrel.vgtest \ osrel.stderr.exp \ osrel.stdout.exp \ - swapcontext.vgtest \ - swapcontext.stderr.exp \ - swapcontext.stdout.exp \ fexecve_hw1.vgtest \ fexecve_hw1.stdout.exp \ fexecve_hw1.stderr.exp \ @@ -33,9 +30,6 @@ EXTRA_DIST = \ fexecve_txt.stderr.exp \ 452275.vgtest \ 452275.stderr.exp \ - usrstack.vgtest \ - usrstack.stderr.exp \ - usrstack.stdout.exp \ proc_pid_file.vgtest \ proc_pid_file.stderr.exp \ bash_test.vgtest \ @@ -50,12 +44,20 @@ EXTRA_DIST = \ ksh_test.ksh \ ksh_test.stderr.exp \ ksh_test.stdout.exp \ + sanity_level_thread.vgtest \ + sanity_level_thread.stderr.exp \ + swapcontext.vgtest \ + swapcontext.stderr.exp \ + swapcontext.stdout.exp \ umtx_op_timeout.vgtest \ - umtx_op_timeout.stderr.exp + umtx_op_timeout.stderr.exp \ + usrstack.vgtest \ + usrstack.stderr.exp \ + usrstack.stdout.exp check_PROGRAMS = \ auxv osrel swapcontext hello_world fexecve 452275 usrstack \ - proc_pid_file + proc_pid_file sanity_level_thread AM_CFLAGS += $(AM_FLAG_M3264_PRI) AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) @@ -67,3 +69,6 @@ swapcontext_CFLAGS = ${AM_CFLAGS} hello_world_SOURCES = hello_world.cpp proc_pid_file_SOURCES = proc_pid_file.cpp + +sanity_level_thread_SOURCES = sanity_level_thread.cpp +sanity_level_thread_LDFLAGS = ${AM_LDFLAGS} -pthread diff --git a/none/tests/freebsd/sanity_level_thread.cpp b/none/tests/freebsd/sanity_level_thread.cpp new file mode 100644 index 0000000000..c45cbeadee --- /dev/null +++ b/none/tests/freebsd/sanity_level_thread.cpp @@ -0,0 +1,21 @@ +#include +#include +#include + +using namespace std; + +ofstream output("output.txt"); + +void task(string msg) +{ + output << "task msg: " << msg; +} + +int main() +{ + thread t1(task, "Hello\n"); + thread t2(task, "World\n"); + + t1.join(); + t2.join(); +} diff --git a/none/tests/freebsd/sanity_level_thread.stderr.exp b/none/tests/freebsd/sanity_level_thread.stderr.exp new file mode 100644 index 0000000000..e69de29bb2 diff --git a/none/tests/freebsd/sanity_level_thread.vgtest b/none/tests/freebsd/sanity_level_thread.vgtest new file mode 100644 index 0000000000..260c61370b --- /dev/null +++ b/none/tests/freebsd/sanity_level_thread.vgtest @@ -0,0 +1,3 @@ +prog: sanity_level_thread +vgopts: -q --sanity-level=3 +cleanup: rm -f output.txt