diff options
author | Andris Zeila <andris.zeila@zabbix.com> | 2022-01-17 12:27:43 +0300 |
---|---|---|
committer | Andris Zeila <andris.zeila@zabbix.com> | 2022-01-17 12:27:43 +0300 |
commit | 1a92b34b2ab3df712a2d0a7d2171d0fe458b8197 (patch) | |
tree | 46066ae7999c28a793ae8a96eae90d0f8b3dccfe /tests | |
parent | 35e168e5de2e159934504bc2e16175061a223b59 (diff) |
.......... [ZBXNEXT-7411] fixed cmocka test building on freebsd using clang compiler
Diffstat (limited to 'tests')
-rw-r--r-- | tests/libs/zbxserver/macro_fmttime.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/tests/libs/zbxserver/macro_fmttime.c b/tests/libs/zbxserver/macro_fmttime.c index 6ff357093b9..a2e8bee1eb1 100644 --- a/tests/libs/zbxserver/macro_fmttime.c +++ b/tests/libs/zbxserver/macro_fmttime.c @@ -25,10 +25,52 @@ #include "common.h" #include "macrofunc.h" #include "log.h" +#include "zbxserver.h" #include "valuecache.h" #include "mocks/valuecache/valuecache_mock.h" +int __wrap_substitute_simple_macros(zbx_uint64_t *actionid, const DB_EVENT *event, const DB_EVENT *r_event, + zbx_uint64_t *userid, const zbx_uint64_t *hostid, const DC_HOST *dc_host, const DC_ITEM *dc_item, + DB_ALERT *alert, const DB_ACKNOWLEDGE *ack, const zbx_service_alarm_t *service_alarm, + const DB_SERVICE *service, const char *tz, char **data, int macro_type, char *error, + int maxerrlen); + +int __wrap_DCget_data_expected_from(zbx_uint64_t itemid, int *seconds); + +int __wrap_substitute_simple_macros(zbx_uint64_t *actionid, const DB_EVENT *event, const DB_EVENT *r_event, + zbx_uint64_t *userid, const zbx_uint64_t *hostid, const DC_HOST *dc_host, const DC_ITEM *dc_item, + DB_ALERT *alert, const DB_ACKNOWLEDGE *ack, const zbx_service_alarm_t *service_alarm, + const DB_SERVICE *service, const char *tz, char **data, int macro_type, char *error, + int maxerrlen) +{ + ZBX_UNUSED(actionid); + ZBX_UNUSED(event); + ZBX_UNUSED(r_event); + ZBX_UNUSED(userid); + ZBX_UNUSED(hostid); + ZBX_UNUSED(dc_host); + ZBX_UNUSED(dc_item); + ZBX_UNUSED(alert); + ZBX_UNUSED(ack); + ZBX_UNUSED(tz); + ZBX_UNUSED(data); + ZBX_UNUSED(macro_type); + ZBX_UNUSED(error); + ZBX_UNUSED(maxerrlen); + ZBX_UNUSED(service_alarm); + ZBX_UNUSED(service); + + return SUCCEED; +} + +int __wrap_DCget_data_expected_from(zbx_uint64_t itemid, int *seconds) +{ + ZBX_UNUSED(itemid); + *seconds = zbx_vcmock_get_ts().sec - 600; + return SUCCEED; +} + void zbx_mock_test_entry(void **state) { const size_t macro_pos = 1, macro_pos_end = 6, func_pos = 8, func_param_pos = 15; |