From 078ba93d0d00c2a3cb62b99af2ba77a34c5212ac Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Mon, 21 Apr 2025 20:44:31 +0200 Subject: [PATCH] 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. --- none/tests/Makefile.am | 1 + .../fdleak_socketpair_xml.stderr.exp-illumos | 83 +++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 none/tests/fdleak_socketpair_xml.stderr.exp-illumos diff --git a/none/tests/Makefile.am b/none/tests/Makefile.am index 37c94515d..8f9018f46 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 000000000..f01a80440 --- /dev/null +++ b/none/tests/fdleak_socketpair_xml.stderr.exp-illumos @@ -0,0 +1,83 @@ + + + + +5 +none + + + Nulgrind, the minimal Valgrind tool + Copyright... + Using Valgrind... + Command: ./fdleak_socketpair + + +... +... +none + + + + ... + --command-line-only=yes + --memcheck:leak-check=no + --tool=none + --track-fds=yes + --xml=yes + --xml-fd=2 + + + ... + + + + + RUNNING + + + + + + FINISHED + + + + + 0x........ + ... + FdNotClosed + 5 + ... + + + 0x........ + ... + main + ... + fdleak_socketpair.c + 13 + + + + + + 0x........ + ... + FdNotClosed + 4 + ... + + + 0x........ + ... + main + ... + fdleak_socketpair.c + 13 + + + + + + + -- 2.47.3