[valgrind] [Bug 328563] make track-fds support xml output

2024-04-18 Thread Mark Wielaard
https://bugs.kde.org/show_bug.cgi?id=328563

Mark Wielaard  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|CONFIRMED   |RESOLVED

--- Comment #7 from Mark Wielaard  ---
commit 09b5ad416c5ddf1375f269f6ea2253e90fa08f01
Author: Alexandra Hájková 
Date:   Thu Apr 18 05:21:49 2024 -0400

Improve file descriptor xml output, add fd and path elements

Add needs_xml_output to none tool so it can also output xml when
--track-fds enabled.

Use xml protocolversion 5 when clo_track_fds is enabled

Split OpenFD pathname and description. Add description when a file
descriptor is closed so it can be used in a future error. On error
print  element and (if known) a  element.

Add docs/internals/xml-output-protocol5.txt.

https://bugs.kde.org/show_bug.cgi?id=328563

Co-Authored-By: Mark Wielaard 

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 328563] make track-fds support xml output

2024-04-18 Thread Alexandra Hajkova
https://bugs.kde.org/show_bug.cgi?id=328563

--- Comment #6 from Alexandra Hajkova  ---
Created attachment 168646
  --> https://bugs.kde.org/attachment.cgi?id=168646=edit
patch

follow up for the previous patch, Improve file descriptor xml output, add fd
and path elements

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 328563] make track-fds support xml output

2024-04-15 Thread Alexandra Hajkova
https://bugs.kde.org/show_bug.cgi?id=328563

--- Comment #5 from Alexandra Hajkova  ---
Created attachment 168547
  --> https://bugs.kde.org/attachment.cgi?id=168547=edit
patch

This xml support is based on the patch in 362680:
https://bugs.kde.org/show_bug.cgi?id=362680 and that it doesn't include the
extras in Evan's patch yet.

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 328563] make track-fds support xml output

2023-11-22 Thread Alexandra Hajkova
https://bugs.kde.org/show_bug.cgi?id=328563

Alexandra Hajkova  changed:

   What|Removed |Added

 CC||ahajk...@redhat.com

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 328563] make track-fds support xml output

2023-11-22 Thread Mark Wielaard
https://bugs.kde.org/show_bug.cgi?id=328563

Mark Wielaard  changed:

   What|Removed |Added

 Attachment #127438|0   |1
is obsolete||
 CC||m...@klomp.org

--- Comment #4 from Mark Wielaard  ---
Created attachment 163356
  --> https://bugs.kde.org/attachment.cgi?id=163356=edit
Patch - Adds support for xml output of --track-fds

This is a rebase of the patch to current (VALGRIND_3_22_0-61-gb748cc9e1) git.

It seems to work, but I haven't fully reviewed it yet.
It would also need a bit of documentation about the proposed xml structure
output.
And indeed some tests would be nice. It is a pity the none tool doesn't do xml
output.
Maybe it should? or should we just stick some new tests under the memcheck
tool?

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 328563] make track-fds support xml output

2020-04-10 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=328563

--- Comment #3 from e...@ozhiker.com ---
Created attachment 127438
  --> https://bugs.kde.org/attachment.cgi?id=127438=edit
Patch - Adds support for xml output of --track-fds

Patch enables xml output for --track-fds
modifies show_open_fds() and getsockdetails()

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 328563] make track-fds support xml output

2020-04-10 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=328563

e...@ozhiker.com changed:

   What|Removed |Added

 Ever confirmed|0   |1
Version|3.9.0   |3.15 SVN
 CC||e...@ozhiker.com
 Status|REPORTED|CONFIRMED

--- Comment #2 from e...@ozhiker.com ---
Hi Valgrind architects,

I have implemented a fix for this feature request, but have a question:

Where should I put the tests for this feature? 
Other tests for --track-fds are in /none/tests/ however 
this will not work for xml tests, since Nulgrind does not 
have VG_(needs).output_xml, hence (clo_xml) will get unset.

 Would you prefer:
   a) Move track-fds tests to another tool test 
  directory which does support xml?

   b) Set VG(needs).output_xml in Nulgrind?

   c) Add a new dunmy tool that VG_(needs) everything
  but just provides minimal stubs.

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 328563] make track-fds support xml output

2016-09-02 Thread Hideaki Kimura via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=328563

Hideaki Kimura  changed:

   What|Removed |Added

 CC||hideaki.kim...@gmail.com

--- Comment #1 from Hideaki Kimura  ---
I'm also hitting this, but in a bit different form from the original comment
probably due to version difference (mine is 3.11.0).

When I enable track-fds and xml output, valgrind _does_ output open-at-exit
file descriptors information in XML. However, the output is far from ideal.

For example,

// test.c
#include 
int main(void) {
  open("bluh", O_CREAT, 0);
  return 0;
}

Then
gcc test.c; rm -f bluh; valgrind --xml=yes --xml-file=out.xml --track-fds=yes
--leak-check=full --error-exitcode=1 ./a.out

a.out emits no error code:
> echo $?
0

The out.xml would look like:



4
memcheck
...snip...
20082
25595
memcheck

  
/usr/bin/valgrind
--xml=yes
--xml-file=out.xml
--track-fds=yes
--leak-check=full
--error-exitcode=1
  
  
./a.out
  


  RUNNING
  00:00:00:00.056 


  FINISHED
  00:00:00:00.242 

  

  0x4F27490
  /usr/lib64/libc-2.22.so
  __open_nocancel


  0x400552
  /home/kimurhid/a.out
  main

  





This is it. The  element shows where the open-at-exit FD was made, which
is useful but the way the xml shows it is very user-unfriendly. It doesn't even
say what this  element is about!

In my case, this is also causing an issue to integrate with other tools like
Continuous Integration (Jenkins) and CTest because the output/exit-code looks
normal even when there are leaked FDs. Jenkins/CTest just report that there
were no errors.. even when I have leaked FDs!

In sum, I suggest the following:

1. In XML, make the leaked-FD output as beefy as usual memory-leak errors,
ideally follow the same format.

2. Add an option to emit error exit-code on observing leaked-FDs, again just
like usual memory-leak errors.

-- 
You are receiving this mail because:
You are watching all bug changes.