New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revert "curl_xml plugin: Fixed tautological pointer comparison error." #935
Conversation
Fixes collectd#931 This reverts commit 0afea60.
Change-Id: I9a3fc3ded9566bd68c80e5fbce2d8b717ea1848d
As suggested by @mfournier, rather than reverting the patch I fixed the test. NotesSorry if any or all of these seem obvious to the reader:
ConclusionI suggest using one of the following solutions:
The first solution seems to be the best approach, however due to lacking test suite it would be safer to use the second: it would fix the clang error and not change the plugin functionally |
Thanks for taking care of this @faxm0dem ! I grabbed the opportunity to test out this CI system I working on, and these 2 patches together build fine on a range of gcc and clang versions, with I'd favor the 1st option too. As you seem to be familiar with this issue, would you mind sharing some XML and corresponding collectd config snippets, both with and without the xpath table (ie: some way to test the different conditions which would pass through this block of code) ? Thanks ! |
I'll do that ASAP. Shall I create a directory maybe in |
@faxm0dem mmh, I don't think it's a good idea to start adding random bits of input/output/config to the git repo, without the tests that go with them. If you're able to prove this patchset doesn't change the functionnality of the plugin with a couple of xml & config snippets (shared as comments in this PR would be sufficient AFAIC), it would be great! You're of course welcome to add some actual tests. But I didn't dig into this much yet, so I won't be of much help. Maybe @octo could give some guidance on how this would be done in this case ? |
See collectd#935 Change-Id: I930f4bf00c8d14bf6784c6372e8b7386d6ecd971
See collectd#935 Change-Id: I930f4bf00c8d14bf6784c6372e8b7386d6ecd971
Okay, no problem just thought we could start adding some fixtures there. |
Discovered while testing the previous 2 commits. NB: valgrind already complained about these before 0afea60 was applied, so this isn't related to issue collectd#935.
Thanks @faxm0dem, this was very helpful ! I noticed that the examples you provided triggered a couple of resource leaks I corrected in af8f87e. Are you able to test curl_xml with this last patch on other configs than the 2 you provided above ? Other than that, I tested this patchset on a couple of different distros, with different libxml versions, built both with clang and gcc with So just waiting for your feedback on af8f87e before merging this branch. |
Unfortunately although slightly stripped down this is the only use-case I h̶a̶v̶e̶had. |
Fixes #931
This reverts commit 0afea60.