mptcpd icon indicating copy to clipboard operation
mptcpd copied to clipboard

Add support for running units tests with valgrind.

Open ossama-othman opened this issue 3 years ago • 4 comments

Leverage the Autoconf Archive macro AX_VALGRIND_CHECK to enable support for running the mptcpd unit tests through valgrind, e.g.:

    ./configure --enable-valgrind
    make check-valgrind

ossama-othman avatar Dec 06 '21 20:12 ossama-othman

Pull Request Test Coverage Report for Build 1831551729

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 53.266%

Totals Coverage Status
Change from base Build 1790578941: 0.0%
Covered Lines: 1060
Relevant Lines: 1990

💛 - Coveralls

coveralls avatar Dec 06 '21 20:12 coveralls

The Valgrind build is failing because of legitimate memory leaks in two unit tests. The changes are behaving as expected.

ossama-othman avatar Dec 06 '21 20:12 ossama-othman

It would definitely help to document that autoconf dependency!

Good point. It's really only needed if someone is building mptcpd from a git repository or is modifying the autoconf/automake files shipped with the mptcpd tar archive. A mptcpd tar archive created through make dist or make distcheck doesn't have this issue since the macro content is placed into the generated configure script shipped with the tar archive. This assumes that the person that created the tar archive had the updated AX_VALGRIND_CHECK macro installed when creating it.

Does autoconf give any way to check the serial number of the m4 file? If someone decides to try out this feature it would be good to provide some information, since it will take a while (years?) for the autoconf-archive fix to show up in distros.

The Automake manual mentions that the aclocal Perl script take into account the serial number when deciding which copy of a M4 file to use, but I'm not aware of any features in Autoconf or Automake that would allow one to check the serial number. We'd likely have to roll our own serial check.

ossama-othman avatar Dec 07 '21 01:12 ossama-othman

I should probably bump the copyright year on the modified files.

ossama-othman avatar Feb 11 '22 21:02 ossama-othman