Loading src/lib/kinetic_logger.c +4 −2 Original line number Diff line number Diff line Loading @@ -914,10 +914,12 @@ void KineticLogger_LogProtobuf(int log_level, const KineticProto_Message* msg) // * protobuf_c_boolean has_messages; // * ProtobufCBinaryData messages; if (cmd->body->getLog->has_messages) { BYTES_TO_CSTRING(tmpBuf, uint8_t* buf = malloc(cmd->body->getLog->messages.len * 4); BYTES_TO_CSTRING(buf, cmd->body->getLog->messages, 0, cmd->body->getLog->messages.len); KineticLogger_LogPrintf(log_level, "%smessages: '%s'", _indent, tmpBuf); KineticLogger_LogPrintf(log_level, "%smessages: '%s'", _indent, buf); free(buf); } // * KineticProto_Command_GetLog_Limits* limits; Loading test/support/system_test_fixture.h +0 −1 Original line number Diff line number Diff line Loading @@ -26,7 +26,6 @@ #ifndef SYSTEM_TEST_HOST #define SYSTEM_TEST_HOST "localhost" // #define SYSTEM_TEST_HOST "10.138.123.65" #endif typedef struct _SystemTestFixture { Loading test/system/test_system_get_log.c +4 −8 Original line number Diff line number Diff line Loading @@ -70,13 +70,9 @@ void test_GetLog_should_retrieve_utilizations_from_device(void) TEST_ASSERT_EQUAL_KineticStatus(KINETIC_STATUS_SUCCESS, Status); TEST_ASSERT_NOT_NULL(Info); TEST_ASSERT_NOT_NULL(Info->utilizations); TEST_ASSERT_EQUAL(4, Info->numUtilizations); TEST_ASSERT_NOT_NULL(Info->utilizations[0].name); TEST_ASSERT_NOT_NULL(Info->utilizations[1].name); TEST_ASSERT_NOT_NULL(Info->utilizations[2].name); TEST_ASSERT_NOT_NULL(Info->utilizations[3].name); for (size_t i = 0; i < 4; i++) { TEST_ASSERT_TRUE(Info->numUtilizations >= 4); for (size_t i = 0; i < Info->numUtilizations; i++) { TEST_ASSERT_NOT_NULL(Info->utilizations[i].name); KineticDeviceInfo_Utilization* utilization = &Info->utilizations[i]; LOGF0("info->utilizations[%zu]: %s = %.3f", i, utilization->name, utilization->value); } Loading Loading @@ -161,7 +157,7 @@ void test_GetLog_should_retrieve_statistics_from_device(void) } } uint8_t* Buffer[1024 * 1024 * 4]; uint8_t* Buffer[1024 * 1024 * 10]; void test_GetLog_should_retrieve_messages_from_device(void) { LOG_LOCATION; Loading Loading
src/lib/kinetic_logger.c +4 −2 Original line number Diff line number Diff line Loading @@ -914,10 +914,12 @@ void KineticLogger_LogProtobuf(int log_level, const KineticProto_Message* msg) // * protobuf_c_boolean has_messages; // * ProtobufCBinaryData messages; if (cmd->body->getLog->has_messages) { BYTES_TO_CSTRING(tmpBuf, uint8_t* buf = malloc(cmd->body->getLog->messages.len * 4); BYTES_TO_CSTRING(buf, cmd->body->getLog->messages, 0, cmd->body->getLog->messages.len); KineticLogger_LogPrintf(log_level, "%smessages: '%s'", _indent, tmpBuf); KineticLogger_LogPrintf(log_level, "%smessages: '%s'", _indent, buf); free(buf); } // * KineticProto_Command_GetLog_Limits* limits; Loading
test/support/system_test_fixture.h +0 −1 Original line number Diff line number Diff line Loading @@ -26,7 +26,6 @@ #ifndef SYSTEM_TEST_HOST #define SYSTEM_TEST_HOST "localhost" // #define SYSTEM_TEST_HOST "10.138.123.65" #endif typedef struct _SystemTestFixture { Loading
test/system/test_system_get_log.c +4 −8 Original line number Diff line number Diff line Loading @@ -70,13 +70,9 @@ void test_GetLog_should_retrieve_utilizations_from_device(void) TEST_ASSERT_EQUAL_KineticStatus(KINETIC_STATUS_SUCCESS, Status); TEST_ASSERT_NOT_NULL(Info); TEST_ASSERT_NOT_NULL(Info->utilizations); TEST_ASSERT_EQUAL(4, Info->numUtilizations); TEST_ASSERT_NOT_NULL(Info->utilizations[0].name); TEST_ASSERT_NOT_NULL(Info->utilizations[1].name); TEST_ASSERT_NOT_NULL(Info->utilizations[2].name); TEST_ASSERT_NOT_NULL(Info->utilizations[3].name); for (size_t i = 0; i < 4; i++) { TEST_ASSERT_TRUE(Info->numUtilizations >= 4); for (size_t i = 0; i < Info->numUtilizations; i++) { TEST_ASSERT_NOT_NULL(Info->utilizations[i].name); KineticDeviceInfo_Utilization* utilization = &Info->utilizations[i]; LOGF0("info->utilizations[%zu]: %s = %.3f", i, utilization->name, utilization->value); } Loading Loading @@ -161,7 +157,7 @@ void test_GetLog_should_retrieve_statistics_from_device(void) } } uint8_t* Buffer[1024 * 1024 * 4]; uint8_t* Buffer[1024 * 1024 * 10]; void test_GetLog_should_retrieve_messages_from_device(void) { LOG_LOCATION; Loading