From ba15b8fe7d6fabfb73424a616de18a752a56430a Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Sat, 23 Nov 2024 21:28:13 +0100 Subject: [PATCH 05/11] Add exp and supp patterns for missing main frame for ppc64le In some cases on ppc64le we are missing the main frame. Add alternative .exp-ppc64le variants for socket_close_xml, fdleak_cmsg_xml and fdleak_ipv4_xml. And extra suppressions without a main frame for fdleak_cmsg_supp. See also commit 04d30049b "Filter away "main" differences in filter_fdleak" (cherry picked from commit e6960c2e41b103ab8d393cbe13dc6473fb89bffc) --- none/tests/fdleak_cmsg_supp.supp | 47 ++++++ none/tests/fdleak_cmsg_xml.stderr.exp-ppc64le | 147 ++++++++++++++++++ none/tests/fdleak_ipv4_xml.stderr.exp-ppc64le | 139 +++++++++++++++++ .../tests/socket_close_xml.stderr.exp-ppc64le | 98 ++++++++++++ 4 files changed, 431 insertions(+) create mode 100644 none/tests/fdleak_cmsg_xml.stderr.exp-ppc64le create mode 100644 none/tests/fdleak_ipv4_xml.stderr.exp-ppc64le create mode 100644 none/tests/socket_close_xml.stderr.exp-ppc64le diff --git a/none/tests/fdleak_cmsg_supp.supp b/none/tests/fdleak_cmsg_supp.supp index 92fbacabdb78..a169fd888bcc 100644 --- a/none/tests/fdleak_cmsg_supp.supp +++ b/none/tests/fdleak_cmsg_supp.supp @@ -12,6 +12,13 @@ fun:server fun:main } +{ + sup2-ppc64le + CoreError:FdNotClosed + fun:socket + fun:server + #fun:main +} { sup3 CoreError:FdNotClosed @@ -42,3 +49,43 @@ fun:client fun:main } +{ + sup6-ppc64le + CoreError:FdNotClosed + fun:socket + fun:client + #fun:main +} +{ + sup7 + CoreError:FdNotClosed + fun:_so_socket + fun:__xnet_socket + fun:client + fun:main +} +{ + sup8 + CoreError:FdNotClosed + fun:__so_recvmsg + fun:__xnet_recvmsg + fun:client + fun:main +} +{ + sup9 + CoreError:FdNotClosed + fun:_so_socket + fun:__xnet_socket + fun:server + fun:main +} +{ + sup10 + CoreError:FdNotClosed + fun:__so_accept + fun:accept + fun:server + fun:main +} + diff --git a/none/tests/fdleak_cmsg_xml.stderr.exp-ppc64le b/none/tests/fdleak_cmsg_xml.stderr.exp-ppc64le new file mode 100644 index 000000000000..6294094eb92e --- /dev/null +++ b/none/tests/fdleak_cmsg_xml.stderr.exp-ppc64le @@ -0,0 +1,147 @@ + + + + +5 +none + + + Nulgrind, the minimal Valgrind tool + Copyright... + Using Valgrind... + Command: ./fdleak_cmsg + + +... +... +none + + + + ... + --command-line-only=yes + --memcheck:leak-check=no + --tool=none + --track-fds=all + --xml=yes + --xml-fd=2 + --child-silent-after-fork=yes + + + ... + + + + + RUNNING + + + + + + FINISHED + + + + + 0x........ + ... + FdNotClosed + 5 + ... + ... + + + 0x........ + ... + client + ... + fdleak_cmsg.c + 133 + + + 0x........ + ... + main + ... + fdleak_cmsg.c + 174 + + + + + + 0x........ + ... + FdNotClosed + 4 + ... + ... + + + 0x........ + ... + client + ... + fdleak_cmsg.c + 133 + + + 0x........ + ... + main + ... + fdleak_cmsg.c + 174 + + + + + + 0x........ + ... + FdNotClosed + 3 + ... + + + 0x........ + ... + client + ... + fdleak_cmsg.c + 112 + + + + + + 0x........ + ... + FdNotClosed + 2 + ... + ... + + + + 0x........ + ... + FdNotClosed + 1 + ... + ... + + + + 0x........ + ... + FdNotClosed + 0 + ... + ... + + + + + diff --git a/none/tests/fdleak_ipv4_xml.stderr.exp-ppc64le b/none/tests/fdleak_ipv4_xml.stderr.exp-ppc64le new file mode 100644 index 000000000000..df413b62895c --- /dev/null +++ b/none/tests/fdleak_ipv4_xml.stderr.exp-ppc64le @@ -0,0 +1,139 @@ + + + + +5 +none + + + Nulgrind, the minimal Valgrind tool + Copyright... + Using Valgrind... + Command: ./fdleak_ipv4 + + +... +... +none + + + + ... + --command-line-only=yes + --memcheck:leak-check=no + --tool=none + --track-fds=yes + --xml=yes + --xml-fd=2 + --child-silent-after-fork=yes + + + ... + + + + + RUNNING + + + + + 0x........ + ... + FdBadClose + 4 + ... + + + 0x........ + ... + client + ... + fdleak_ipv4.c + 70 + + + 0x........ + ... + main + ... + fdleak_ipv4.c + 90 + + + Previously closed + + + 0x........ + ... + client + ... + fdleak_ipv4.c + 69 + + + 0x........ + ... + main + ... + fdleak_ipv4.c + 90 + + + Originally opened + + + 0x........ + ... + client + ... + fdleak_ipv4.c + 68 + + + 0x........ + ... + main + ... + fdleak_ipv4.c + 90 + + + + + + + FINISHED + + + + + 0x........ + ... + FdNotClosed + 3 + ... + + + 0x........ + ... + client + ... + fdleak_ipv4.c + 51 + + + + + + + 1 + 0x........ + + + + + + + + diff --git a/none/tests/socket_close_xml.stderr.exp-ppc64le b/none/tests/socket_close_xml.stderr.exp-ppc64le new file mode 100644 index 000000000000..2f2bc9831e79 --- /dev/null +++ b/none/tests/socket_close_xml.stderr.exp-ppc64le @@ -0,0 +1,98 @@ + + + + +5 +none + + + Nulgrind, the minimal Valgrind tool + Copyright... + Using Valgrind... + Command: ./socket_close + + +... +... +none + + + + ... + --command-line-only=yes + --memcheck:leak-check=no + --tool=none + -q + --track-fds=yes + --xml=yes + --xml-fd=2 + + + ... + + + + + RUNNING + + + +Open socket 3 +close socket_fd 3 +and close the socket again 3 + + 0x........ + ... + FdBadClose + 3 + ... + + + 0x........ + ... + main + ... + socket_close.c + 40 + + + Previously closed + + + 0x........ + ... + main + ... + socket_close.c + 36 + + + Originally opened + + + 0x........ + ... + open_socket + ... + socket_close.c + 17 + + + + + + + FINISHED + + + + + + 1 + 0x........ + + + + + + -- 2.47.0