Skip to content

Conversation

furiel
Copy link
Collaborator

@furiel furiel commented Jan 12, 2018

This pull request is the continuation of #1080. Thank you @bkil-syslogng for the investigation and putting together the original pull request.

I moved most of the commits from the original pull request here. One notable exception is the travis part. Unfortunately the valgrind execution of the unit test set is too long to execute in travis.

Besides autotools, cmake support is added as well.

Usage:

  • autotools

    • configure with --enable-valgrind option
    • make check-valgrind-tool #optionally add VALGRIND_TOOL=memcheck
  • cmake
    After the usual compile: one can execute

    • ctest -T memcheck

@kira-syslogng
Copy link
Contributor

Build SUCCESS, the tests were executed on test branch: master and test suite: functions

Copy link
Collaborator

@Kokan Kokan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvement.
I would make a note about cmake, it is possible to trigger the test from make command:

make ExperimentalMemCheck

Of course this calls in the background the ctest -T memcheck.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove.

@furiel furiel force-pushed the unit-test-valgrind branch from 7c71d1e to 7a2f130 Compare January 31, 2018 09:30
@kira-syslogng
Copy link
Contributor

Build SUCCESS, the tests were executed on test branch: master and test suite: functions

bkil-syslogng and others added 7 commits January 31, 2018 11:18
One cannot deserialize into a cleared message: the deserialization
code always allocates new array for sdata, while clear only sets the
number of stored sdata to 0, leaving the pointer alone.

An assert is added to the deserialization code to make this hidden
dependency sure.

Signed-off-by: Antal Nemes <[email protected]>
Appending null to g_string in single cluster case. "" should be used
in the cluster name instead of NULL.
Signed-off-by: Antal Nemes <[email protected]>
Usage: make check-valgrind-tool (optional VALGRIND_TOOL=memcheck)
Signed-off-by: bkil-syslogng <[email protected]>
Execution: ctest -T memcheck
Signed-off-by: Antal Nemes <[email protected]>
@furiel furiel force-pushed the unit-test-valgrind branch from 7a2f130 to b549709 Compare January 31, 2018 10:34
@kira-syslogng
Copy link
Contributor

Build SUCCESS, the tests were executed on test branch: master and test suite: functions

@Kokan Kokan merged commit fe381b4 into syslog-ng:master Jan 31, 2018
@furiel furiel deleted the unit-test-valgrind branch May 8, 2018 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants