Created attachment 136093 [details] diff of several directories The other tools with smaller diffs so all lumped together. covers cachegrind/ callgrind/ dhat/ exp-bbv/ gdbserver_tests/ lackey/ massif/ mpi/ none/ perf/ shared/ No libdl on FreeBSD Adding defined(VGO_freebsd) to macroi tests Extra filters and expecteds (some large ones!) Different types of signals Missing headers Prevention of compiler optimizations New FreeBSD none tests Check that the auxv vector more or less gets passed to the client Check that the OS release is correctly handled
Created attachment 141841 [details] diff of cachegrind callgrind dhat exp-bb gdbserver_test massif
This patch makes cachegrind/tests/Makefile.am executable, which I think is wrong. The actual change looks fine though. As does the change to callgrind/main.c. In dhat/tests/copy.c, which test for && defined(__GNUC__)? Is mempcpy defined if __GNUC__ isn't on freebsd? In none/tests/Makefile.am is it deliberate that resolv doesn't get any LDADD flags anymore (asking because res_search still does). In none/tests/amd64/Makefile.am why is the dependency on $(srcdir)/gen_insn_test.pl removed for the .def.c target? none/tests/amd64/faultstatus.c changes the type of escape from jmp_buf to sigjmp_buf. This looks correct. I am just surprised this worked before. The none/tests/amd64/insn_ssse3.vgtest prereq change is ok too. This probably also should always have been this way. It is somewhat unfortunate we need none/tests/amd64/sse4-64.stdout.exp-freebsd-clang and none/tests/amd64/sse4-64.stdout.exp.freebsd, they are huge. The ssse3_misaligned look correct. There are a lot of extra none/tests/fdleak*exp.freebsd. It looks like freebsd doesn't provide the name of the file behind an fd. Is this a bug in the file descriptor leak checker on freebsd? Assuming everything under none/tests/freebsd is fine. I don't understand the none/tests/x86/gen_insn_test.pl change.
The changes in faultstatus.c make gdbserver_tests mcsignopass and mcsigpass fail because the line numbers changed. But rest of make regtest looks fine on Fedora 34 x86_64.
I'll try to deal with the other things tonight. For the change none/tests/x86/gen_insn_test.pl See here https://github.com/paulfloyd/freebsd_valgrind/issues/80 In short the generated code doesn't build with clang which complains about not having enough registers.
Created attachment 142035 [details] freebsd9 Patch that removes executable but from Makefile.am and adjusts the gdb_server test exp file. Tested on fedora 34 x86_64
(In reply to Mark Wielaard from comment #2) > This patch makes cachegrind/tests/Makefile.am executable, which I think is > wrong. Done. > In dhat/tests/copy.c, which test for && defined(__GNUC__)? > Is mempcpy defined if __GNUC__ isn't on freebsd? I think that it is not defined at all (it's nowhere in /usr/include), but clang has it as a builtin. > In none/tests/Makefile.am is it deliberate that resolv doesn't get any LDADD > flags anymore (asking because res_search still does). Looks like a copy/paste error. Fixed. > In none/tests/amd64/Makefile.am why is the dependency on > $(srcdir)/gen_insn_test.pl removed for the .def.c target? It wasn't there for x86. I'll put it back and add it to x86. > It is somewhat unfortunate we need > none/tests/amd64/sse4-64.stdout.exp-freebsd-clang and > none/tests/amd64/sse4-64.stdout.exp.freebsd, they are huge. Huge and largely the same. Haven't spent time analyzing these small differences, it just seems that each compiler/platform has to deviate a tiny bit. > There are a lot of extra none/tests/fdleak*exp.freebsd. It looks like > freebsd doesn't provide the name of the file behind an fd. Is this a bug in > the file descriptor leak checker on freebsd? I just tried fdleak_open without the freebsd expected and it passes. I remember spending some time debugging this and it seemed as though the KDE wm was passing an open socket to processes to be able to tell when they exit (maybe, I never realy understood what was happening). I'll check the others and update as necessary.
(In reply to Paul Floyd from comment #6) > (In reply to Mark Wielaard from comment #2) > > This patch makes cachegrind/tests/Makefile.am executable, which I think is > > wrong. > > Done. > > > In dhat/tests/copy.c, which test for && defined(__GNUC__)? > > Is mempcpy defined if __GNUC__ isn't on freebsd? > > I think that it is not defined at all (it's nowhere in /usr/include), but > clang has it as a builtin. __GNUC__ is a Clang built-in: $ cc -x c -dM -E /dev/null | grep GNUC #define __GNUC_MINOR__ 2 #define __GNUC_PATCHLEVEL__ 1 #define __GNUC_STDC_INLINE__ 1 #define __GNUC__ 4 mempcpy was added in: commit ee37f64cf875255338f917a9da76c643cf59786c Author: Konstantin Belousov <kib@FreeBSD.org> Date: Wed Jul 14 18:41:36 2021 +0300 libc: add mempcpy(3) and wmempcpy(3) Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D31180 Testing (defined(VGO_freebsd) && defined(__GNUC__)) seems a bit strange - probably the right thing to do is just drop the __GNUC__ condition now, and then also remove VGO_freebsd in several months, when all supported FreeBSD branches have mempcpy.
> Testing (defined(VGO_freebsd) && defined(__GNUC__)) seems a bit strange - > probably the right thing to do is just drop the __GNUC__ condition now, and > then also remove VGO_freebsd in several months, when all supported FreeBSD > branches have mempcpy. mempcpy doesn't seem very portable. I've already fixed this testcase on Solaris and macOS (which don't have it available). My FreeBSD commit message was Strangely GCC and clang do different things. I'll try to remember to update this, but it's only a regtest so not that important.
(In reply to Paul Floyd from comment #8) > > I'll try to remember to update this, but it's only a regtest so not that > important. Indeed, this is not a high priority and could be dealt with well in the future.
Created attachment 142189 [details] other directories missing shared and mpi directories
Created attachment 142193 [details] other dirs added mpi and shared
Created attachment 142195 [details] other directories Removed a couple of diff files
Code committed with commit 53dd9bd255d7add6f5a502ec9cd4895d3ed21452