Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndris Zeila <andris.zeila@zabbix.com>2021-09-29 13:00:55 +0300
committerAndris Zeila <andris.zeila@zabbix.com>2021-09-29 13:00:55 +0300
commitca84ea38079bc81ec65a8dcf4186483325b4d4b8 (patch)
tree4010638123e5ea0bf675e4b151481dffc1ff735c
parenta4969c350369027b8fc0d14f023a804913d1b7ae (diff)
.......... [ZBXNEXT-6923] fixed value cache tests
-rw-r--r--tests/libs/zbxdbcache/Makefile.am1
-rw-r--r--tests/mocks/valuecache/valuecache_mock.c6
2 files changed, 7 insertions, 0 deletions
diff --git a/tests/libs/zbxdbcache/Makefile.am b/tests/libs/zbxdbcache/Makefile.am
index 42bf097c01d..4cecca22612 100644
--- a/tests/libs/zbxdbcache/Makefile.am
+++ b/tests/libs/zbxdbcache/Makefile.am
@@ -81,6 +81,7 @@ COMMON_WRAP_FUNCS = \
-Wl,--wrap=zbx_mutex_create \
-Wl,--wrap=zbx_mutex_destroy \
-Wl,--wrap=zbx_mem_create \
+ -Wl,--wrap=zbx_mem_destroy \
-Wl,--wrap=__zbx_mem_malloc \
-Wl,--wrap=__zbx_mem_realloc \
-Wl,--wrap=__zbx_mem_free \
diff --git a/tests/mocks/valuecache/valuecache_mock.c b/tests/mocks/valuecache/valuecache_mock.c
index 323bc8fc773..227aa566a40 100644
--- a/tests/mocks/valuecache/valuecache_mock.c
+++ b/tests/mocks/valuecache/valuecache_mock.c
@@ -45,6 +45,7 @@ int __wrap_zbx_mutex_create(zbx_mutex_t *mutex, zbx_mutex_name_t name, char **er
void __wrap_zbx_mutex_destroy(zbx_mutex_t *mutex);
int __wrap_zbx_mem_create(zbx_mem_info_t **info, zbx_uint64_t size, const char *descr, const char *param,
int allow_oom, char **error);
+void __wrap_zbx_mem_destroy(zbx_mem_info_t *info);
void *__wrap___zbx_mem_malloc(const char *file, int line, zbx_mem_info_t *info, const void *old, size_t size);
void *__wrap___zbx_mem_realloc(const char *file, int line, zbx_mem_info_t *info, void *old, size_t size);
void __wrap___zbx_mem_free(const char *file, int line, zbx_mem_info_t *info, void *ptr);
@@ -537,6 +538,11 @@ int __wrap_zbx_mem_create(zbx_mem_info_t **info, zbx_uint64_t size, const char *
return SUCCEED;
}
+void __wrap_zbx_mem_destroy(zbx_mem_info_t *info)
+{
+ zbx_free(info);
+}
+
void *__wrap___zbx_mem_malloc(const char *file, int line, zbx_mem_info_t *info, const void *old, size_t size)
{
size_t *psize;