diff options
author | Niels de Vos <ndevos@redhat.com> | 2015-03-03 00:27:34 +0100 |
---|---|---|
committer | Kaleb KEITHLEY <kkeithle@redhat.com> | 2015-03-31 04:11:17 -0700 |
commit | 9c37b68bc15c503a0ad5cc2fb04be7b917496d90 (patch) | |
tree | 0f8436ca340035c164a727144eba34fdf983d539 | |
parent | 6df8d1d8781f59fbab46c4b016dde0b2d33dd189 (diff) |
build: require cmocka >= 1.0.1
Our mem-pool unit test does a funky realloc(ptr, 0) as an alternative to
free(ptr). cmocka 1.0.0 has a bug where this is not handled correctly
and thinks to detect a memory leak. The next cmocka release will have
this bug fixed, making our unit tests require cmocka >= 1.0.1.
URL: https://cmocka.org/archive/cmocka/2015-02/0000059.html
Change-Id: I3d7f9b4cf7ace3f958158425ecbcc8f176579122
BUG: 1067059
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/9801
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Andreas Schneider <asn@fedoraproject.org>
Tested-by: Andreas Schneider <asn@fedoraproject.org>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
-rw-r--r-- | configure.ac | 11 | ||||
-rw-r--r-- | glusterfs.spec.in | 4 |
2 files changed, 5 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac index 7392b706bb8..5fe304abf4d 100644 --- a/configure.ac +++ b/configure.ac @@ -1196,14 +1196,9 @@ AC_ARG_ENABLE([cmocka], [Enable cmocka build options.])) if test "x$enable_cmocka" = "xyes"; then BUILD_UNITTEST="yes" - PKG_CHECK_MODULES([UNITTEST], [cmocka], [],[ - AC_CHECK_LIB([cmocka], [mock_assert], [ - UNITTEST_LDFLAGS="-lcmocka -lgcov" - UNITTEST_CFLAGS="-Wall -Werror" - ], [ - AC_MSG_ERROR([cmocka library is required to build glusterfs]) - ]) - ]) + PKG_CHECK_MODULES([UNITTEST], [cmocka >= 1.0.1], [BUILD_UNITTEST="yes"], + [AC_MSG_ERROR([cmocka library is required to build glusterfs])] + ) fi AM_CONDITIONAL([UNITTEST], [test x$BUILD_UNITTEST = xyes]) diff --git a/glusterfs.spec.in b/glusterfs.spec.in index f71ba1a1903..9390bb24137 100644 --- a/glusterfs.spec.in +++ b/glusterfs.spec.in @@ -204,8 +204,8 @@ BuildRequires: libaio-devel libacl-devel BuildRequires: python-devel BuildRequires: python-ctypes BuildRequires: userspace-rcu-devel >= 0.7 -%if ( 0%{?_with_cmocka:0} ) -BuildRequires: libcmocka-devel >= 1.0.0 +%if ( 0%{?_with_cmocka:1} ) +BuildRequires: libcmocka-devel >= 1.0.1 %endif BuildRequires: sqlite-devel %if ( 0%{!?_without_systemtap:1} ) |