Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ PALTEST(file_io_GetFullPathNameA_test2_paltest_getfullpathnamea_test2, "file_io/
if (CloseHandle(hFile) != TRUE)
{
Trace("ERROR :%ld: CloseHandle failed close hFile=0x%lx.\n",
GetLastError());
GetLastError(),
hFile);
Comment on lines 92 to +94
goto terminate;
}

Expand Down Expand Up @@ -139,4 +140,3 @@ PALTEST(file_io_GetFullPathNameA_test2_paltest_getfullpathnamea_test2, "file_io/
return PASS;
}


Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ PALTEST(file_io_GetFullPathNameA_test3_paltest_getfullpathnamea_test3, "file_io/
if (CloseHandle(hFile) != TRUE)
{
Trace("ERROR :%ld: CloseHandle failed close hFile=0x%lx.\n",
GetLastError());
GetLastError(),
hFile);
Comment on lines 158 to +160
bRetVal = FAIL;
goto cleanUpThree;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ PALTEST(file_io_GetFullPathNameA_test4_paltest_getfullpathnamea_test4, "file_io/
if (CloseHandle(hFile) != TRUE)
{
Trace("ERROR :%ld: CloseHandle failed close hFile=0x%lx.\n",
GetLastError());
GetLastError(),
hFile);
Comment on lines 133 to +135
bRetVal = FAIL;
goto cleanUpTwo;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ PALTEST(file_io_GetFullPathNameW_test3_paltest_getfullpathnamew_test3, "file_io/
if (CloseHandle(hFile) != TRUE)
{
Trace("ERROR :%ld: CloseHandle failed close hFile=0x%lx.\n",
GetLastError());
GetLastError(),
hFile);
Comment on lines 161 to +163
bRetVal = FAIL;
goto cleanUpThree;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ PALTEST(file_io_GetFullPathNameW_test4_paltest_getfullpathnamew_test4, "file_io/
if (CloseHandle(hFile) != TRUE)
{
Trace("ERROR :%ld: CloseHandle failed close hFile=0x%lx.\n",
GetLastError());
GetLastError(),
hFile);
Comment on lines 133 to +135
bRetVal = FAIL;
goto cleanUpTwo;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ PALTEST(file_io_SetFilePointer_test2_paltest_setfilepointer_test2, "file_io/SetF
PAL_TerminateEx(FAIL);
return FAIL;
}
szBuffer[dwByteCount] = '\0';
szPtr = szText + 20;
if (strcmp(szPtr, szBuffer) != 0)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ PALTEST(file_io_SetFilePointer_test3_paltest_setfilepointer_test3, "file_io/SetF
PAL_TerminateEx(FAIL);
return FAIL;
}
szBuffer[dwByteCount] = '\0';
szPtr = szText + 20;;
if (strcmp(szPtr, szBuffer) != 0)
{
Expand Down Expand Up @@ -263,6 +264,7 @@ PALTEST(file_io_SetFilePointer_test3_paltest_setfilepointer_test3, "file_io/SetF
PAL_TerminateEx(FAIL);
return FAIL;
}
szBuffer[dwByteCount] = '\0';
szPtr = szText + 42;
if (strcmp(szPtr, szBuffer) != 0)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ BOOL validateResults_WriteFile_test3(const char* szString)
return FALSE;
}

szReadString[dwBytesRead] = '\0';
if (strcmp(szReadString, szString))
{
Trace("read = %s string = %s", szReadString, szString);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ PALTEST(filemapping_memmgt_CreateFileMappingW_test1_paltest_createfilemappingw_t
*/
if ( UnmapViewOfFile(lpMapViewAddress) == FALSE )
{
Trace("ERROR:%u: Failed to UnmapViewOfFile of \"%0x%lx\".\n",
Trace("ERROR:%u: Failed to UnmapViewOfFile of \"0x%lx\".\n",
GetLastError(),
lpMapViewAddress);
Comment on lines +138 to 140
RetVal = FAIL;
Expand Down Expand Up @@ -170,4 +170,3 @@ PALTEST(filemapping_memmgt_CreateFileMappingW_test1_paltest_createfilemappingw_t
PAL_TerminateEx(RetVal);
return RetVal;
}

Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ PALTEST(filemapping_memmgt_CreateFileMappingW_test3_paltest_createfilemappingw_t
*/
if ( UnmapViewOfFile(lpMapViewAddress) == FALSE )
{
Trace("ERROR:%u: Failed to UnmapViewOfFile of \"%0x%lx\".\n",
Trace("ERROR:%u: Failed to UnmapViewOfFile of \"0x%lx\".\n",
GetLastError(),
lpMapViewAddress);
Comment on lines +120 to 122
RetVal = FAIL;
Expand Down Expand Up @@ -152,4 +152,3 @@ PALTEST(filemapping_memmgt_CreateFileMappingW_test3_paltest_createfilemappingw_t
PAL_TerminateEx(RetVal);
return RetVal;
}

Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ PALTEST(filemapping_memmgt_CreateFileMappingW_test4_paltest_createfilemappingw_t
*/
if ( UnmapViewOfFile(lpMapViewAddress) == FALSE )
{
Trace("ERROR:%u: Failed to UnmapViewOfFile of \"%0x%lx\".\n",
Trace("ERROR:%u: Failed to UnmapViewOfFile of \"0x%lx\".\n",
GetLastError(),
lpMapViewAddress);
Comment on lines +145 to 147
RetVal = FAIL;
Expand Down Expand Up @@ -178,4 +178,3 @@ PALTEST(filemapping_memmgt_CreateFileMappingW_test4_paltest_createfilemappingw_t
return RetVal;
}


Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ PALTEST(filemapping_memmgt_CreateFileMappingW_test5_paltest_createfilemappingw_t
*/
if ( UnmapViewOfFile(lpMapViewRO) == FALSE )
{
Trace("ERROR:%u: Failed to UnmapViewOfFile of \"%0x%lx\".\n",
Trace("ERROR:%u: Failed to UnmapViewOfFile of \"0x%lx\".\n",
GetLastError(),
lpMapViewRO);
Comment on lines +144 to 146
RetVal = FAIL;
Expand All @@ -165,7 +165,7 @@ PALTEST(filemapping_memmgt_CreateFileMappingW_test5_paltest_createfilemappingw_t
*/
if ( UnmapViewOfFile(lpMapViewRW) == FALSE )
{
Trace("ERROR:%u: Failed to UnmapViewOfFile of \"%0x%lx\".\n",
Trace("ERROR:%u: Failed to UnmapViewOfFile of \"0x%lx\".\n",
GetLastError(),
lpMapViewRW);
Comment on lines +168 to 170
RetVal = FAIL;
Expand All @@ -190,4 +190,3 @@ PALTEST(filemapping_memmgt_CreateFileMappingW_test5_paltest_createfilemappingw_t
PAL_TerminateEx(RetVal);
return RetVal;
}

Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ PALTEST(filemapping_memmgt_CreateFileMappingW_test6_paltest_createfilemappingw_t
*/
if ( UnmapViewOfFile(lpMapViewRW2) == FALSE )
{
Trace("ERROR:%u: Failed to UnmapViewOfFile of \"%0x%lx\".\n",
Trace("ERROR:%u: Failed to UnmapViewOfFile of \"0x%lx\".\n",
GetLastError(),
lpMapViewRW2);
Comment on lines +127 to 129
RetVal = FAIL;
Expand All @@ -136,7 +136,7 @@ PALTEST(filemapping_memmgt_CreateFileMappingW_test6_paltest_createfilemappingw_t
*/
if ( UnmapViewOfFile(lpMapViewRW) == FALSE )
{
Trace("ERROR:%u: Failed to UnmapViewOfFile of \"%0x%lx\".\n",
Trace("ERROR:%u: Failed to UnmapViewOfFile of \"0x%lx\".\n",
GetLastError(),
lpMapViewRW);
Comment on lines +139 to 141
RetVal = FAIL;
Expand All @@ -161,4 +161,3 @@ PALTEST(filemapping_memmgt_CreateFileMappingW_test6_paltest_createfilemappingw_t
PAL_TerminateEx(RetVal);
return RetVal;
}

Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ PALTEST(filemapping_memmgt_CreateFileMappingW_test7_paltest_createfilemappingw_t
*/
if ( UnmapViewOfFile(lpMapViewRO) == FALSE )
{
Trace("ERROR:%u: Failed to UnmapViewOfFile of \"%0x%lx\".\n",
Trace("ERROR:%u: Failed to UnmapViewOfFile of \"0x%lx\".\n",
GetLastError(),
lpMapViewRO);
Comment on lines +127 to 129
RetVal = FAIL;
Expand All @@ -136,7 +136,7 @@ PALTEST(filemapping_memmgt_CreateFileMappingW_test7_paltest_createfilemappingw_t
*/
if ( UnmapViewOfFile(lpMapViewRW) == FALSE )
{
Trace("ERROR:%u: Failed to UnmapViewOfFile of \"%0x%lx\".\n",
Trace("ERROR:%u: Failed to UnmapViewOfFile of \"0x%lx\".\n",
GetLastError(),
lpMapViewRW);
RetVal = FAIL;
Expand All @@ -161,4 +161,3 @@ PALTEST(filemapping_memmgt_CreateFileMappingW_test7_paltest_createfilemappingw_t
PAL_TerminateEx(RetVal);
return RetVal;
}

Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ PALTEST(filemapping_memmgt_MapViewOfFile_test2_paltest_mapviewoffile_test2, "fil
Fail("");
}

readString[dwBytesRead] = '\0';
if (memcmp(buf, readString, strlen(readString)) != 0)
{
CloseHandle(hFile);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ PALTEST(filemapping_memmgt_MapViewOfFile_test3_paltest_mapviewoffile_test3, "fil
Fail("");
}

readString[dwBytesRead] = '\0';
if (memcmp(ch, readString, strlen(readString)) != 0)
{
CloseHandle(hFile);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ PALTEST(filemapping_memmgt_MapViewOfFile_test5_paltest_mapviewoffile_test5, "fil
{
Trace("ERROR:%u: Able to create a MapViewOfFile with "
"hFileMapping=0x%lx.\n",
GetLastError());
GetLastError(),
hFileMapping);
Comment on lines 55 to +58
UnmapViewOfFile(lpMapViewAddress);
Fail("");
}
Expand All @@ -75,7 +76,8 @@ PALTEST(filemapping_memmgt_MapViewOfFile_test5_paltest_mapviewoffile_test5, "fil
{
Trace("ERROR:%u: Able to create a MapViewOfFile with "
"hFileMapping=0x%lx.\n",
GetLastError());
GetLastError(),
hFileMapping);
UnmapViewOfFile(lpMapViewAddress);
Fail("");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ PALTEST(filemapping_memmgt_UnmapViewOfFile_test1_paltest_unmapviewoffile_test1,
Fail("");
}

readString[dwBytesRead] = '\0';
if (memcmp(ch, readString, strlen(readString)) != 0)
{
Trace("ERROR: Read string from file \"%s\", is "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ PALTEST(threading_CreateThread_test3_paltest_createthread_test3, "threading/Crea
if (0 == CloseHandle(hEvent_CreateThread_test3))
{
Trace("PALSUITE ERROR: Unable to execute CloseHandle(%p) during "
"clean up.\nGetLastError returned '%u'.\n", hEvent_CreateThread_test3);
"clean up.\nGetLastError returned '%u'.\n",
hEvent_CreateThread_test3,
GetLastError());
}
Fail("");
}
Expand Down Expand Up @@ -97,4 +99,3 @@ PALTEST(threading_CreateThread_test3_paltest_createthread_test3, "threading/Crea
PAL_Terminate();
return (PASS);
}

Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ BOOL ResetEventTest()

if (dwRet != WAIT_TIMEOUT)
{
Fail("ResetEventTest:WaitForSingleObject %s failed (%x)\n", GetLastError());
Fail("ResetEventTest:WaitForSingleObject failed (%x)\n", GetLastError());
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ PALTEST(threading_ResetEvent_test3_paltest_resetevent_test3, "threading/ResetEve
{
/* ERROR */
Fail( "FAIL:ResetEvent() call failed on a closed event handle "
"but returned an unexpected error result %lu\n" );
"but returned an unexpected error result %lu\n",
GetLastError() );
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ PALTEST(threading_SetEvent_test3_paltest_setevent_test3, "threading/SetEvent/tes
{
/* ERROR */
Fail( "FAIL:SetEvent() call failed on a closed event handle"
"but returned an unexpected error result %lu\n" );
"but returned an unexpected error result %lu\n",
GetLastError() );
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@ BOOL WaitMultipleDuplicateHandleTest_WFMOEx_test1()
}
else if (GetLastError() != ERROR_INVALID_PARAMETER)
{
Trace("WaitMultipleDuplicateHandleTest:WaitAll failed: unexpected last error (%x)\n");
Trace("WaitMultipleDuplicateHandleTest:WaitAll failed: unexpected last error (%x)\n",
GetLastError());
testResult = FALSE;
}

Expand Down
Loading