From: Paul F. <pa...@so...> - 2025-04-21 19:05:52
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=078ba93d0d00c2a3cb62b99af2ba77a34c5212ac commit 078ba93d0d00c2a3cb62b99af2ba77a34c5212ac Author: Paul Floyd <pj...@wa...> Date: Mon Apr 21 20:44:31 2025 +0200 Illumos regtest: add an expected for none/tests/fdleak_socketpair_xml.stderr illumos socketpair doesn't get the next two fds (3 and 4), instead it gets 4 and 5. That looks like it's because this is done in two steps in libc. so_socket gets called twice returnning fds 3 and 4 the so_socketpair takes those and does some rebinding(?) resulting in fds 4 and 5. Diff: --- none/tests/Makefile.am | 1 + .../tests/fdleak_socketpair_xml.stderr.exp-illumos | 83 ++++++++++++++++++++++ 2 files changed, 84 insertions(+) diff --git a/none/tests/Makefile.am b/none/tests/Makefile.am index 37c94515d6..8f9018f46a 100644 --- a/none/tests/Makefile.am +++ b/none/tests/Makefile.am @@ -165,6 +165,7 @@ EXTRA_DIST = \ fdleak_pipe_xml.stderr.exp fdleak_pipe_xml.vgtest \ fdleak_socketpair.stderr.exp fdleak_socketpair.vgtest \ fdleak_socketpair_xml.stderr.exp fdleak_socketpair_xml.vgtest \ + fdleak_socketpair_xml.stderr.exp-illumos \ floored.stderr.exp floored.stdout.exp floored.vgtest \ fork.stderr.exp fork.stdout.exp fork.vgtest \ fucomip.stderr.exp fucomip.vgtest \ diff --git a/none/tests/fdleak_socketpair_xml.stderr.exp-illumos b/none/tests/fdleak_socketpair_xml.stderr.exp-illumos new file mode 100644 index 0000000000..f01a80440a --- /dev/null +++ b/none/tests/fdleak_socketpair_xml.stderr.exp-illumos @@ -0,0 +1,83 @@ +<?xml version="1.0"?> + +<valgrindoutput> + +<protocolversion>5</protocolversion> +<protocoltool>none</protocoltool> + +<preamble> + <line>Nulgrind, the minimal Valgrind tool</line> + <line>Copyright...</line> + <line>Using Valgrind...</line> + <line>Command: ./fdleak_socketpair</line> +</preamble> + +<pid>...</pid> +<ppid>...</ppid> +<tool>none</tool> + +<args> + <vargv> + <exe>...</exe> + <arg>--command-line-only=yes</arg> + <arg>--memcheck:leak-check=no</arg> + <arg>--tool=none</arg> + <arg>--track-fds=yes</arg> + <arg>--xml=yes</arg> + <arg>--xml-fd=2</arg> + </vargv> + <argv> + <exe>...</exe> + </argv> +</args> + +<status> + <state>RUNNING</state> + <time>...</time> +</status> + + +<status> + <state>FINISHED</state> + <time>...</time> +</status> + +<error> + <unique>0x........</unique> + <tid>...</tid> + <kind>FdNotClosed</kind> + <fd>5</fd> + <what>...</what> + <stack> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>main</fn> + <dir>...</dir> + <file>fdleak_socketpair.c</file> + <line>13</line> + </frame> + </stack> +</error> + +<error> + <unique>0x........</unique> + <tid>...</tid> + <kind>FdNotClosed</kind> + <fd>4</fd> + <what>...</what> + <stack> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>main</fn> + <dir>...</dir> + <file>fdleak_socketpair.c</file> + <line>13</line> + </frame> + </stack> +</error> + + +</valgrindoutput> + |