Fix EH Client LL unit tests memory leak and remove extra filters projects in the build folder

This commit is contained in:
dcristoloveanu 2016-02-07 19:46:36 -08:00
Родитель 5d9eb3cbd5
Коммит 1a431a4236
8 изменённых файлов: 2 добавлений и 314 удалений

Просмотреть файл

@ -1,43 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\tests\hmacsha256_unittests\hmacsha256_unittests.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\src\hmacsha256.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\src\hmac.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\src\usha.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\src\sha1.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\src\sha224.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\src\sha384-512.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\src\gballoc.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\adapters\lock_c11.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\src\buffer.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\tests\hmacsha256_unittests\CMakeLists.txt" />
</ItemGroup>
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{E0219E58-08BA-43B6-A697-717EF0361C40}</UniqueIdentifier>
</Filter>
</ItemGroup>
</Project>

Просмотреть файл

@ -1,27 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\ctest\src\ctest.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\ctest\inc\ctest.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\ctest\inc\ctest_macros.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\ctest\CMakeLists.txt" />
</ItemGroup>
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{E0219E58-08BA-43B6-A697-717EF0361C40}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{C273AE31-C91C-47C2-AF1F-C68D88F79513}</UniqueIdentifier>
</Filter>
</ItemGroup>
</Project>

Просмотреть файл

@ -1,40 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\ctest\unittests\ctestunittests\assertfailurestests.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\ctest\unittests\ctestunittests\assertsuccesstests.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\ctest\unittests\ctestunittests\ctestunittests.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\ctest\unittests\ctestunittests\simpletestsuiteonetest.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\ctest\unittests\ctestunittests\simpletestsuitetwotests.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\ctest\unittests\ctestunittests\testfunctioncleanuptests.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\ctest\unittests\ctestunittests\testfunctioninitializetests.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\ctest\unittests\ctestunittests\testsuiteinitializecleanuptests.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\ctest\unittests\ctestunittests\simpletestsuiteonetestcpp.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\ctest\unittests\ctestunittests\CMakeLists.txt" />
</ItemGroup>
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{E0219E58-08BA-43B6-A697-717EF0361C40}</UniqueIdentifier>
</Filter>
</ItemGroup>
</Project>

Просмотреть файл

@ -1,126 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\micromock\src\micromockcharstararenullterminatedstrings.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\micromock\src\micromockexception.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\micromock\src\micromocktestmutex.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\micromock\src\mockcallrecorder.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\micromock\src\mockmethodcallbase.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\micromock\src\mockvaluebase.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\micromock\src\timediscretemicromock.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\micromock\inc\globalmock.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\micromock\inc\macro_utils.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\micromock\inc\micromock.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\micromock\inc\micromockcallmacros.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\micromock\inc\micromockcharstararenullterminatedstrings.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\micromock\inc\micromockcommon.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\micromock\inc\micromockenumtostring.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\micromock\inc\micromockexception.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\micromock\inc\micromocktestmutex.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\micromock\inc\micromocktestrunnerhooks.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\micromock\inc\mock.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\micromock\inc\mockcallargument.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\micromock\inc\mockcallargumentbase.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\micromock\inc\mockcallcomparer.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\micromock\inc\mockcallrecorder.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\micromock\inc\mockmethodcall.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\micromock\inc\mockmethodcallbase.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\micromock\inc\mockresultvalue.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\micromock\inc\mockvalue.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\micromock\inc\mockvaluebase.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\micromock\inc\nicecallcomparer.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\micromock\inc\runtimemock.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\micromock\inc\stdafx.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\micromock\inc\strictorderedcallcomparer.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\micromock\inc\strictunorderedcallcomparer.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\micromock\inc\targetver.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\micromock\inc\threadsafeglobalmock.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\micromock\inc\timediscretemicromock.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\micromock\inc\timediscretemicromockcallmacros.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="G:\Repos\azure-event-hubs\c\azure-c-shared-utility\c\testtools\micromock\CMakeLists.txt" />
</ItemGroup>
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{E0219E58-08BA-43B6-A697-717EF0361C40}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{C273AE31-C91C-47C2-AF1F-C68D88F79513}</UniqueIdentifier>
</Filter>
</ItemGroup>
</Project>

Просмотреть файл

@ -1,27 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="G:\Repos\azure-event-hubs\c\eventhub_client\samples\send_batch\send_batch.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="G:\Repos\azure-event-hubs\c\eventhub_client\samples\send_batch\windows\main.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="G:\Repos\azure-event-hubs\c\eventhub_client\samples\send_batch\send_batch.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="G:\Repos\azure-event-hubs\c\eventhub_client\samples\send_batch\CMakeLists.txt" />
</ItemGroup>
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{E0219E58-08BA-43B6-A697-717EF0361C40}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{C273AE31-C91C-47C2-AF1F-C68D88F79513}</UniqueIdentifier>
</Filter>
</ItemGroup>
</Project>

Просмотреть файл

@ -1,27 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="G:\Repos\azure-event-hubs\c\eventhub_client\samples\sendasync\sendasync.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="G:\Repos\azure-event-hubs\c\eventhub_client\samples\sendasync\windows\main.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="G:\Repos\azure-event-hubs\c\eventhub_client\samples\sendasync\sendasync.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="G:\Repos\azure-event-hubs\c\eventhub_client\samples\sendasync\CMakeLists.txt" />
</ItemGroup>
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{E0219E58-08BA-43B6-A697-717EF0361C40}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{C273AE31-C91C-47C2-AF1F-C68D88F79513}</UniqueIdentifier>
</Filter>
</ItemGroup>
</Project>

Просмотреть файл

@ -649,7 +649,7 @@ EVENTHUBCLIENT_RESULT EventHubClient_LL_SendAsync(EVENTHUBCLIENT_LL_HANDLE event
}
else
{
EVENTHUB_EVENT_LIST *newEntry = (EVENTHUB_EVENT_LIST*)malloc(sizeof(EVENTHUB_EVENT_LIST));
EVENTHUB_EVENT_LIST* newEntry = (EVENTHUB_EVENT_LIST*)malloc(sizeof(EVENTHUB_EVENT_LIST));
if (newEntry == NULL)
{
result = EVENTHUBCLIENT_ERROR;

Просмотреть файл

@ -139,9 +139,6 @@ static bool g_setProperty = false;
static bool g_includeProperties = false;
static DLIST_ENTRY* saved_pending_list;
static size_t currentmalloc_call;
static size_t whenShallmalloc_fail;
static size_t g_current_pn_messenger_call;
static size_t g_when_pn_messenger_fail;
@ -353,24 +350,7 @@ public:
/* gballoc mocks */
MOCK_STATIC_METHOD_1(, void*, gballoc_malloc, size_t, size)
void* result2;
currentmalloc_call++;
if (whenShallmalloc_fail>0)
{
if (currentmalloc_call == whenShallmalloc_fail)
{
result2 = (void*)NULL;
}
else
{
result2 = BASEIMPLEMENTATION::gballoc_malloc(size);
}
}
else
{
result2 = BASEIMPLEMENTATION::gballoc_malloc(size);
}
MOCK_METHOD_END(void*, result2);
MOCK_METHOD_END(void*, BASEIMPLEMENTATION::gballoc_malloc(size));
MOCK_STATIC_METHOD_2(, void*, gballoc_realloc, void*, ptr, size_t, size)
MOCK_METHOD_END(void*, BASEIMPLEMENTATION::gballoc_realloc(ptr, size));
@ -579,8 +559,6 @@ BEGIN_TEST_SUITE(eventhubclient_ll_unittests)
saved_saslclientio_parameters = NULL;
saved_sasl_mechanism_create_parameters = NULL;
currentmalloc_call = 0;
whenShallmalloc_fail = 0;
g_setProperty = false;
g_currentEventClone_call = 0;