Skip to contentSkip to conversation

package/memcached: disable tests

PATCH New Fabrice Fontaine 2 participants 2 messages Jun 19, 2021 – Jul 18, 2021

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 package/memcached: disable tests

Disable tests to avoid the following build failure with -DNDEBUG which is raised since commit 5a8c50fe05afacc3cbe8e7347e238da9f242fab0

/home/giuliobenetti/autobuild/run/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/microblazeel-buildroot-linux-uclibc/9.3.0/../../../../microblazeel-buildroot-linux-uclibc/bin/ld: testapp.o: in function `cache_redzone_test':
(.text+0x2f48): undefined reference to `cache_error'

Fixes:
- http://autobuild.buildroot.org/results/c4ddd86bd4b74ba4e4857ee38e3a95bb9b019093

---
Changes V1 -> v2:
- Fix MEMCACHED_CONF_OPTS handling

 .../0001-configure.ac-add-disable-tests.patch | 57 +++++++++++++++++++
 package/memcached/memcached.mk                |  4 +-
 2 files changed, 60 insertions(+), 1 deletion(-)
 create mode 100644 package/memcached/0001-configure.ac-add-disable-tests.patch
package/memcached/0001-configure.ac-add-disable-tests.patch new file +57 -0
new file mode 100644
index 0000000000..bbe73b7292
@@ -0,0 +1,57 @@
+From c57efbce382bde6901859b79b222abfc9c3e1a87 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+Date: Thu, 10 Jun 2021 20:38:07 +0200
+Subject: [PATCH] configure.ac: add --disable-tests
+
+Add --disable-tests to avoid the following build failure with -DNDEBUG:
+
+/home/giuliobenetti/autobuild/run/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/microblazeel-buildroot-linux-uclibc/9.3.0/../../../../microblazeel-buildroot-linux-uclibc/bin/ld: testapp.o: in function `cache_redzone_test':
+(.text+0x2f48): undefined reference to `cache_error'
+
+Fixes:
+ - http://autobuild.buildroot.org/results/c4ddd86bd4b74ba4e4857ee38e3a95bb9b019093
+
+Signed-off-by: Fabrice Fontaine <[email protected]>
+---
+ Makefile.am  | 2 ++
+ configure.ac | 4 ++++
+ 2 files changed, 6 insertions(+)
+
+diff --git a/Makefile.am b/Makefile.am
+index 8ea4841..1d730b6 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,6 +1,8 @@
+ bin_PROGRAMS = memcached
+ pkginclude_HEADERS = protocol_binary.h
++if ENABLE_TESTS
+ noinst_PROGRAMS = memcached-debug sizes testapp timedrun
++endif
+ 
+ BUILT_SOURCES=
+ 
+diff --git a/configure.ac b/configure.ac
+index f497101..441d55b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -115,6 +115,9 @@ AC_ARG_ENABLE(static,
+ AC_ARG_ENABLE(unix_socket,
+   [AS_HELP_STRING([--disable-unix-socket], [Disable unix domain socket])])
+ 
++AC_ARG_ENABLE(tests,
++  [AS_HELP_STRING([--disable-tests], [Disable tests])],,enable_tests=yes)
++
+ dnl **********************************************************************
+ dnl DETECT_SASL_CB_GETCONF
+ dnl
+@@ -231,6 +234,7 @@ AM_CONDITIONAL([ENABLE_TLS],[test "$enable_tls" = "yes"])
+ AM_CONDITIONAL([ENABLE_ASAN],[test "$enable_asan" = "yes"])
+ AM_CONDITIONAL([ENABLE_STATIC],[test "$enable_static" = "yes"])
+ AM_CONDITIONAL([DISABLE_UNIX_SOCKET],[test "$enable_unix_socket" = "no"])
++AM_CONDITIONAL([ENABLE_TESTS],[test "$enable_tests" = "yes"])
+ 
+ 
+ AC_SUBST(DTRACE)
+-- 
+2.30.2
+
package/memcached/memcached.mk +3 -1
index 1c695411cd..198776de68 100644
@@ -8,10 +8,12 @@ MEMCACHED_VERSION = 1.6.9
 MEMCACHED_SITE = http://www.memcached.org/files
 MEMCACHED_DEPENDENCIES = libevent
 MEMCACHED_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99'
-MEMCACHED_CONF_OPTS = --disable-coverage
+MEMCACHED_CONF_OPTS = --disable-coverage --disable-tests
 MEMCACHED_LICENSE = BSD-3-Clause
 MEMCACHED_LICENSE_FILES = COPYING
 MEMCACHED_CPE_ID_VENDOR = memcached
+# We're patching configure.ac
+MEMCACHED_AUTORECONF = YES
 
 ifeq ($(BR2_ENDIAN),"BIG")
 MEMCACHED_CONF_ENV += ac_cv_c_endian=big
Signature · 1 line
2.30.2
#1 lore raw

PATCH v2 1/1 package/memcached: disable tests

Hello Fabrice,

Quoted 6 lines · On Sat, 19 Jun 2021 22:46:48 +0200 Fabrice Fontaine…

Disable tests to avoid the following build failure with -DNDEBUG which is raised since commit 5a8c50fe05afacc3cbe8e7347e238da9f242fab0

/home/giuliobenetti/autobuild/run/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/microblazeel-buildroot-linux-uclibc/9.3.0/../../../../microblazeel-buildroot-linux-uclibc/bin/ld: testapp.o: in function `cache_redzone_test':
(.text+0x2f48): undefined reference to `cache_error'

Quoted 7 lines

Fixes:
- http://autobuild.buildroot.org/results/c4ddd86bd4b74ba4e4857ee38e3a95bb9b019093

---
Changes V1 -> v2:
- Fix MEMCACHED_CONF_OPTS handling

Since -DNDEBUG is no longer passed following commit a1c7cff1a081765c082c196bd9e6c1e72ceee797, this failure no longer occurs. While disabling tests would still be useful, I don't think carrying a non-upstream patch that requires autoreconf really makes sense.

If you get the patch upstreamed, of course we should then be using --disable-tests.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com