Loading Makefile +1 −1 Original line number Diff line number Diff line Loading @@ -259,7 +259,7 @@ update_simulator: cp vendor/kinetic-java/kinetic-simulator/target/*.jar vendor/kinetic-java-simulator/ start_simulator: ./vendor/kinetic-simulator/startSimulator.sh ./vendor/kinetic-simulator/start2Simulators.sh stop_simulator: ./vendor/kinetic-simulator/stopSimulator.sh Loading RELEASE.md +4 −0 Original line number Diff line number Diff line v0.10.1 (kinetic-protocol 3.0.5) * Fixed regression in 0.10.0 where a GET with metadataOnly=true would result in a crash if a value field was not provided * Added system tests for P2P operations v0.10.0 (kinetic-protocol 3.0.5) ------------------------------- * Added put_nonblocking and get_nonblocking examples Loading src/lib/kinetic_operation.c +9 −4 Original line number Diff line number Diff line Loading @@ -277,11 +277,16 @@ static KineticStatus get_cb(const char *cmd_name, KineticOperation* const operat return KINETIC_STATUS_BUFFER_OVERRUN; } } if (!operation->entry->metadataOnly && !ByteBuffer_IsNull(operation->entry->value)) { ByteBuffer_AppendArray(&operation->entry->value, (ByteArray){ .data = operation->response->value, .len = operation->response->header.valueLength, }); } } return status; } Loading src/lib/kinetic_types_internal.c +0 −23 Original line number Diff line number Diff line Loading @@ -222,20 +222,6 @@ bool Copy_KineticProto_Command_KeyValue_to_KineticEntry(KineticProto_Command_Key bool bufferOverflow = false; if (keyValue != NULL && entry != NULL) { ByteBuffer_Reset(&entry->newVersion); if (keyValue->has_newVersion && keyValue->newVersion.len > 0) { if (entry->newVersion.array.data == NULL || entry->newVersion.array.len < keyValue->newVersion.len) { entry->newVersion.bytesUsed = keyValue->newVersion.len; LOG1(" BUFFER_OVERRUN: newVersion"); bufferOverflow = true; } else { ByteBuffer_Append(&entry->newVersion, keyValue->newVersion.data, keyValue->newVersion.len); } } ByteBuffer_Reset(&entry->dbVersion); if (keyValue->has_dbVersion && keyValue->dbVersion.len > 0) { if (entry->dbVersion.array.data == NULL || entry->dbVersion.array.len < keyValue->dbVersion.len) { Loading Loading @@ -277,15 +263,6 @@ bool Copy_KineticProto_Command_KeyValue_to_KineticEntry(KineticProto_Command_Key KineticAlgorithm_from_KineticProto_Command_Algorithm( keyValue->algorithm); } if (keyValue->has_synchronization) { entry->synchronization = KineticSynchronization_from_KineticProto_Command_Synchronization( keyValue->synchronization); } entry->metadataOnly = keyValue->has_metadataOnly ? keyValue->metadataOnly : false; entry->force = keyValue->has_force ? keyValue->force : false; } return !bufferOverflow; Loading test/support/system_test_fixture.c +6 −6 Original line number Diff line number Diff line Loading @@ -24,11 +24,10 @@ #include "kinetic_logger.h" uint8_t data[KINETIC_OBJ_SIZE]; KineticClient * client; void SystemTestSetup(SystemTestFixture* fixture, int log_level) { client = KineticClient_Init("stdout", log_level); KineticClient * client = KineticClient_Init("stdout", log_level); TEST_ASSERT_NOT_NULL_MESSAGE(fixture, "System test fixture is NULL!"); Loading @@ -49,8 +48,9 @@ void SystemTestSetup(SystemTestFixture* fixture, int log_level) }, .connected = fixture->connected, .testIgnored = false, .client = client, }; status = KineticClient_CreateConnection(&fixture->session, client); status = KineticClient_CreateConnection(&fixture->session, fixture->client); TEST_ASSERT_EQUAL_KineticStatus(KINETIC_STATUS_SUCCESS, status); fixture->expectedSequence = 0; fixture->connected = true; Loading @@ -60,8 +60,8 @@ void SystemTestSetup(SystemTestFixture* fixture, int log_level) } // Erase the drive // status = KineticClient_InstantSecureErase(&fixture->session); // TEST_ASSERT_EQUAL_KineticStatus(KINETIC_STATUS_SUCCESS, status); status = KineticClient_InstantSecureErase(&fixture->session); TEST_ASSERT_EQUAL_KineticStatus(KINETIC_STATUS_SUCCESS, status); // TEST_ASSERT_EQUAL_MESSAGE( // fixture->expectedSequence, Loading @@ -85,7 +85,7 @@ void SystemTestTearDown(SystemTestFixture* fixture) KineticStatus status = KineticClient_DestroyConnection(&fixture->session); TEST_ASSERT_EQUAL_MESSAGE(KINETIC_STATUS_SUCCESS, status, "Error when disconnecting client!"); KineticClient_Shutdown(client); KineticClient_Shutdown(fixture->client); } bool SystemTestIsUnderSimulator(void) Loading Loading
Makefile +1 −1 Original line number Diff line number Diff line Loading @@ -259,7 +259,7 @@ update_simulator: cp vendor/kinetic-java/kinetic-simulator/target/*.jar vendor/kinetic-java-simulator/ start_simulator: ./vendor/kinetic-simulator/startSimulator.sh ./vendor/kinetic-simulator/start2Simulators.sh stop_simulator: ./vendor/kinetic-simulator/stopSimulator.sh Loading
RELEASE.md +4 −0 Original line number Diff line number Diff line v0.10.1 (kinetic-protocol 3.0.5) * Fixed regression in 0.10.0 where a GET with metadataOnly=true would result in a crash if a value field was not provided * Added system tests for P2P operations v0.10.0 (kinetic-protocol 3.0.5) ------------------------------- * Added put_nonblocking and get_nonblocking examples Loading
src/lib/kinetic_operation.c +9 −4 Original line number Diff line number Diff line Loading @@ -277,11 +277,16 @@ static KineticStatus get_cb(const char *cmd_name, KineticOperation* const operat return KINETIC_STATUS_BUFFER_OVERRUN; } } if (!operation->entry->metadataOnly && !ByteBuffer_IsNull(operation->entry->value)) { ByteBuffer_AppendArray(&operation->entry->value, (ByteArray){ .data = operation->response->value, .len = operation->response->header.valueLength, }); } } return status; } Loading
src/lib/kinetic_types_internal.c +0 −23 Original line number Diff line number Diff line Loading @@ -222,20 +222,6 @@ bool Copy_KineticProto_Command_KeyValue_to_KineticEntry(KineticProto_Command_Key bool bufferOverflow = false; if (keyValue != NULL && entry != NULL) { ByteBuffer_Reset(&entry->newVersion); if (keyValue->has_newVersion && keyValue->newVersion.len > 0) { if (entry->newVersion.array.data == NULL || entry->newVersion.array.len < keyValue->newVersion.len) { entry->newVersion.bytesUsed = keyValue->newVersion.len; LOG1(" BUFFER_OVERRUN: newVersion"); bufferOverflow = true; } else { ByteBuffer_Append(&entry->newVersion, keyValue->newVersion.data, keyValue->newVersion.len); } } ByteBuffer_Reset(&entry->dbVersion); if (keyValue->has_dbVersion && keyValue->dbVersion.len > 0) { if (entry->dbVersion.array.data == NULL || entry->dbVersion.array.len < keyValue->dbVersion.len) { Loading Loading @@ -277,15 +263,6 @@ bool Copy_KineticProto_Command_KeyValue_to_KineticEntry(KineticProto_Command_Key KineticAlgorithm_from_KineticProto_Command_Algorithm( keyValue->algorithm); } if (keyValue->has_synchronization) { entry->synchronization = KineticSynchronization_from_KineticProto_Command_Synchronization( keyValue->synchronization); } entry->metadataOnly = keyValue->has_metadataOnly ? keyValue->metadataOnly : false; entry->force = keyValue->has_force ? keyValue->force : false; } return !bufferOverflow; Loading
test/support/system_test_fixture.c +6 −6 Original line number Diff line number Diff line Loading @@ -24,11 +24,10 @@ #include "kinetic_logger.h" uint8_t data[KINETIC_OBJ_SIZE]; KineticClient * client; void SystemTestSetup(SystemTestFixture* fixture, int log_level) { client = KineticClient_Init("stdout", log_level); KineticClient * client = KineticClient_Init("stdout", log_level); TEST_ASSERT_NOT_NULL_MESSAGE(fixture, "System test fixture is NULL!"); Loading @@ -49,8 +48,9 @@ void SystemTestSetup(SystemTestFixture* fixture, int log_level) }, .connected = fixture->connected, .testIgnored = false, .client = client, }; status = KineticClient_CreateConnection(&fixture->session, client); status = KineticClient_CreateConnection(&fixture->session, fixture->client); TEST_ASSERT_EQUAL_KineticStatus(KINETIC_STATUS_SUCCESS, status); fixture->expectedSequence = 0; fixture->connected = true; Loading @@ -60,8 +60,8 @@ void SystemTestSetup(SystemTestFixture* fixture, int log_level) } // Erase the drive // status = KineticClient_InstantSecureErase(&fixture->session); // TEST_ASSERT_EQUAL_KineticStatus(KINETIC_STATUS_SUCCESS, status); status = KineticClient_InstantSecureErase(&fixture->session); TEST_ASSERT_EQUAL_KineticStatus(KINETIC_STATUS_SUCCESS, status); // TEST_ASSERT_EQUAL_MESSAGE( // fixture->expectedSequence, Loading @@ -85,7 +85,7 @@ void SystemTestTearDown(SystemTestFixture* fixture) KineticStatus status = KineticClient_DestroyConnection(&fixture->session); TEST_ASSERT_EQUAL_MESSAGE(KINETIC_STATUS_SUCCESS, status, "Error when disconnecting client!"); KineticClient_Shutdown(client); KineticClient_Shutdown(fixture->client); } bool SystemTestIsUnderSimulator(void) Loading