#include "net_if_common.h"
#include "../../../../src/libs/zbxsysinfo/sysinfo.h"
void zbx_mock_test_entry_net_if_common(void **state, int net_if_func)
AGENT_RESULT param_result;
zbx_mock_handle_t param_handle;
const char *expected_param_value_string, *expected_return_string;
zbx_uint64_t expected_param_value = 0;
int expected_result = FAIL, actual_result = FAIL;
if (ZBX_MOCK_SUCCESS != (error = zbx_mock_out_parameter("return", ¶m_handle)) ||
ZBX_MOCK_SUCCESS != (error = zbx_mock_string(param_handle,&expected_return_string)))
fail_msg("Cannot get expected 'return' parameter from test case data: %s",
zbx_mock_error_string(error));
if (0 == strcmp("SYSINFO_RET_OK", expected_return_string))
expected_result = SYSINFO_RET_OK;
else if (0 == strcmp("SYSINFO_RET_FAIL", expected_return_string))
expected_result = SYSINFO_RET_FAIL;
fail_msg("Get unexpected 'return' parameter from test case data: %s", expected_return_string);
if (ZBX_MOCK_SUCCESS != (error = zbx_mock_in_parameter("param", ¶m_handle)) ||
ZBX_MOCK_SUCCESS != (error = zbx_mock_string(param_handle, &init_param)))
fail_msg("Cannot get input 'param' from test case data: %s", zbx_mock_error_string(error));
if (ZBX_MOCK_SUCCESS != (error = zbx_mock_out_parameter("result", ¶m_handle)) ||
ZBX_MOCK_SUCCESS != (error = zbx_mock_string(param_handle, &expected_param_value_string)))
fail_msg("Cannot get expected 'result' parameters from test case data: %s",
zbx_mock_error_string(error));