diff --git a/src/coreclr/dlls/mscordac/mscordac_unixexports.src b/src/coreclr/dlls/mscordac/mscordac_unixexports.src index 2a529b2f4a779..a518b2dca2c8c 100644 --- a/src/coreclr/dlls/mscordac/mscordac_unixexports.src +++ b/src/coreclr/dlls/mscordac/mscordac_unixexports.src @@ -65,7 +65,6 @@ nativeStringResourceTable_mscorrc #PAL_wcsrchr #PAL_wcscmp #PAL_wcschr -#PAL_wcscspn #PAL_wcscat #PAL_wcsstr #PAL__open diff --git a/src/coreclr/pal/inc/pal.h b/src/coreclr/pal/inc/pal.h index 237b75275cec9..bc531d4367174 100644 --- a/src/coreclr/pal/inc/pal.h +++ b/src/coreclr/pal/inc/pal.h @@ -3934,8 +3934,6 @@ PAL_GetCurrentThreadAffinitySet(SIZE_T size, UINT_PTR* data); #define wcspbrk PAL_wcspbrk #define wcscmp PAL_wcscmp #define wcsncpy PAL_wcsncpy -#define wcstok PAL_wcstok -#define wcscspn PAL_wcscspn #define realloc PAL_realloc #define fopen PAL_fopen #define strtok PAL_strtok @@ -4125,8 +4123,6 @@ PALIMPORT DLLEXPORT const WCHAR * __cdecl PAL_wcschr(const WCHAR *, WCHAR); PALIMPORT DLLEXPORT const WCHAR * __cdecl PAL_wcsrchr(const WCHAR *, WCHAR); PALIMPORT WCHAR _WConst_return * __cdecl PAL_wcspbrk(const WCHAR *, const WCHAR *); PALIMPORT DLLEXPORT WCHAR _WConst_return * __cdecl PAL_wcsstr(const WCHAR *, const WCHAR *); -PALIMPORT WCHAR * __cdecl PAL_wcstok(WCHAR *, const WCHAR *); -PALIMPORT DLLEXPORT size_t __cdecl PAL_wcscspn(const WCHAR *, const WCHAR *); PALIMPORT int __cdecl PAL_swprintf(WCHAR *, const WCHAR *, ...); PALIMPORT int __cdecl PAL_vswprintf(WCHAR *, const WCHAR *, va_list); PALIMPORT int __cdecl PAL_swscanf(const WCHAR *, const WCHAR *, ...); diff --git a/src/coreclr/pal/inc/palprivate.h b/src/coreclr/pal/inc/palprivate.h index 097229eb64ef4..f90352b32355e 100644 --- a/src/coreclr/pal/inc/palprivate.h +++ b/src/coreclr/pal/inc/palprivate.h @@ -203,8 +203,6 @@ CompareFileTime( IN CONST FILETIME *lpFileTime1, IN CONST FILETIME *lpFileTime2); -PALIMPORT char * __cdecl _fullpath(char *, const char *, size_t); - /* These are from the file in windows. They are needed for _open_osfhandle.*/ #define _O_RDONLY 0x0000 diff --git a/src/coreclr/pal/src/CMakeLists.txt b/src/coreclr/pal/src/CMakeLists.txt index 4f071b21046b0..afab5e6518455 100644 --- a/src/coreclr/pal/src/CMakeLists.txt +++ b/src/coreclr/pal/src/CMakeLists.txt @@ -123,7 +123,6 @@ set(SOURCES cruntime/malloc.cpp cruntime/math.cpp cruntime/misc.cpp - cruntime/path.cpp cruntime/printf.cpp cruntime/printfcpp.cpp cruntime/silent_printf.cpp @@ -131,7 +130,6 @@ set(SOURCES cruntime/stringtls.cpp cruntime/thread.cpp cruntime/wchar.cpp - cruntime/wchartls.cpp debug/debug.cpp exception/seh.cpp exception/signal.cpp diff --git a/src/coreclr/pal/src/cruntime/path.cpp b/src/coreclr/pal/src/cruntime/path.cpp deleted file mode 100644 index c25636771bc61..0000000000000 --- a/src/coreclr/pal/src/cruntime/path.cpp +++ /dev/null @@ -1,113 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -/*++ - - - -Module Name: - - path.c - -Abstract: - - Implementation of path functions part of Windows runtime library. - -Revision History: - - - ---*/ - -#include "pal/palinternal.h" -#include "pal/dbgmsg.h" -#include "pal/file.h" -#include "pal/printfcpp.hpp" - -#include -#include -#include -#include -#include - -SET_DEFAULT_DEBUG_CHANNEL(CRT); - -/*++ -Function: - _fullpath - -See MSDN doc. - ---*/ -char * -__cdecl -_fullpath( - char *absPath, - const char *relPath, - size_t maxLength) -{ - char realpath_buf[PATH_MAX+1]; - char path_copy[PATH_MAX+1]; - char *retval = NULL; - DWORD cPathCopy = sizeof(path_copy)/sizeof(path_copy[0]); - size_t min_length; - BOOL fBufAllocated = FALSE; - - PERF_ENTRY(_fullpath); - ENTRY("_fullpath (absPath=%p, relPath=%p (%s), maxLength = %lu)\n", - absPath, relPath ? relPath:"NULL", relPath ? relPath:"NULL", maxLength); - - if (strncpy_s(path_copy, sizeof(path_copy), relPath ? relPath : ".", cPathCopy) != SAFECRT_SUCCESS) - { - TRACE("_fullpath: strncpy_s failed!\n"); - goto fullpathExit; - } - - FILEDosToUnixPathA(path_copy); - - if(NULL == realpath(path_copy, realpath_buf)) - { - ERROR("realpath() failed; problem path is '%s'. errno is %d (%s)\n", - realpath_buf, errno, strerror(errno)); - goto fullpathExit; - } - - TRACE("real path is %s\n", realpath_buf); - min_length = strlen(realpath_buf)+1; // +1 for the NULL terminator - - if(NULL == absPath) - { - absPath = static_cast( - PAL_malloc(_MAX_PATH * sizeof(char))); - if (!absPath) - { - ERROR("PAL_malloc failed with error %d\n", errno); - goto fullpathExit; - } - maxLength = _MAX_PATH; - fBufAllocated = TRUE; - } - - if(min_length > maxLength) - { - ERROR("maxLength is %lu, we need at least %lu\n", - maxLength, min_length); - if (fBufAllocated) - { - PAL_free(absPath); - fBufAllocated = FALSE; - } - goto fullpathExit; - } - - strcpy_s(absPath, maxLength, realpath_buf); - retval = absPath; - -fullpathExit: - LOGEXIT("_fullpath returns char * %p\n", retval); - PERF_EXIT(_fullpath); - return retval; -} - - - diff --git a/src/coreclr/pal/src/cruntime/wchar.cpp b/src/coreclr/pal/src/cruntime/wchar.cpp index 5c21d7bd01533..3d887aecdb883 100644 --- a/src/coreclr/pal/src/cruntime/wchar.cpp +++ b/src/coreclr/pal/src/cruntime/wchar.cpp @@ -3,8 +3,6 @@ /*++ - - Module Name: wchar.c @@ -13,11 +11,8 @@ Module Name: Implementation of wide char string functions. - - --*/ - #include "pal/palinternal.h" #include "pal/cruntime.h" #include "pal/dbgmsg.h" @@ -25,7 +20,6 @@ Module Name: #include "pal/thread.hpp" #include "pal/threadsusp.hpp" - #if HAVE_CONFIG_H #include "config.h" #endif @@ -950,46 +944,3 @@ PAL_wcstod( const wchar_16 * nptr, wchar_16 **endptr ) PERF_EXIT(wcstod); return RetVal; } - -/*++ -Function: - PAL_wcscspn - -Finds the number of consecutive characters from the start of the string -that are not in the set. - -Return value: - -The number of characters from the start of the string that are not in -the set. - -Parameters: -string String -strCharSet Set of delimiter characters - ---*/ -size_t -__cdecl -PAL_wcscspn(const wchar_16 *string, const wchar_16 *strCharSet) -{ - const wchar_16 *temp; - size_t count = 0; - - PERF_ENTRY(wcscspn); - - while(*string != 0) - { - for(temp = strCharSet; *temp != 0; temp++) - { - if (*string == *temp) - { - PERF_EXIT(wcscspn); - return count; - } - } - count++; - string++; - } - PERF_EXIT(wcscspn); - return count; -} diff --git a/src/coreclr/pal/src/cruntime/wchartls.cpp b/src/coreclr/pal/src/cruntime/wchartls.cpp deleted file mode 100644 index 35b73359889a5..0000000000000 --- a/src/coreclr/pal/src/cruntime/wchartls.cpp +++ /dev/null @@ -1,125 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -/*++ - - - -Module Name: - - wchartls.c - -Abstract: - - Implementation of wide char string functions that depend on per-thread data - - - ---*/ - -#include "pal/palinternal.h" -#include "pal/thread.hpp" -#include "pal/dbgmsg.h" - -using namespace CorUnix; - - -SET_DEFAULT_DEBUG_CHANNEL(CRT); - -/*++ -Function: - PAL_wcstok - -Finds the next token in a wide character string. - -Return value: - -A pointer to the next token found in strToken. Returns NULL when no more -tokens are found. Each call modifies strToken by substituting a NULL -character for each delimiter that is encountered. - -Parameters: -strToken String containing token(s) -strDelimit Set of delimiter characters - ---*/ -WCHAR * -__cdecl -PAL_wcstok(WCHAR *strToken, const WCHAR *strDelimit) -{ - CPalThread *pThread = NULL; - WCHAR *retval = NULL; - WCHAR *delim_ptr; - WCHAR *next_context; /* string to save in TLS for future calls */ - - PERF_ENTRY(wcstok); - ENTRY("PAL_wcstok (strToken=%p (%S), strDelimit=%p (%S))\n", - strToken?strToken:W16_NULLSTRING, - strToken?strToken:W16_NULLSTRING, - strDelimit?strDelimit:W16_NULLSTRING, - strDelimit?strDelimit:W16_NULLSTRING); - - /* Get the per-thread buffer from the thread structure. */ - pThread = InternalGetCurrentThread(); - - if(NULL == strDelimit) - { - ERROR("delimiter string is NULL\n"); - goto done; - } - - /* get token string from TLS if none is provided */ - if(NULL == strToken) - { - TRACE("wcstok() called with NULL string, using previous string\n"); - strToken = pThread->crtInfo.wcstokContext; - if(NULL == strToken) - { - ERROR("wcstok called with NULL string without a previous call\n"); - goto done; - } - } - - /* first, skip all leading delimiters */ - while ((*strToken != '\0') && (PAL_wcschr(strDelimit,*strToken))) - { - strToken++; - } - - /* if there were only delimiters, there's no string */ - if('\0' == strToken[0]) - { - TRACE("end of string already reached, returning NULL\n"); - goto done; - } - - /* we're now at the beginning of the token; look for the first delimiter */ - delim_ptr = PAL_wcspbrk(strToken,strDelimit); - if(NULL == delim_ptr) - { - TRACE("no delimiters found, this is the last token\n"); - /* place the next context at the end of the string, so that subsequent - calls will return NULL */ - next_context = strToken+PAL_wcslen(strToken); - retval = strToken; - } - else - { - /* null-terminate current token */ - *delim_ptr=0; - - /* place the next context right after the delimiter */ - next_context = delim_ptr+1; - retval = strToken; - - TRACE("found delimiter; next token will be %p\n",next_context); - } - - pThread->crtInfo.wcstokContext = next_context; - -done: - LOGEXIT("PAL_wcstok() returns %p (%S)\n", retval?retval:W16_NULLSTRING, retval?retval:W16_NULLSTRING); - PERF_EXIT(wcstok); - return(retval); -} - diff --git a/src/coreclr/pal/src/include/pal/palinternal.h b/src/coreclr/pal/src/include/pal/palinternal.h index 3a12d78910364..ff3703c6ae4f7 100644 --- a/src/coreclr/pal/src/include/pal/palinternal.h +++ b/src/coreclr/pal/src/include/pal/palinternal.h @@ -526,8 +526,6 @@ function_name() to call the system's implementation #undef wcsstr #undef wcscmp #undef wcsncpy -#undef wcstok -#undef wcscspn #undef iswupper #undef iswspace #undef towlower diff --git a/src/coreclr/pal/tests/palsuite/CMakeLists.txt b/src/coreclr/pal/tests/palsuite/CMakeLists.txt index f58757a1f6d5f..d7b3faca6b366 100644 --- a/src/coreclr/pal/tests/palsuite/CMakeLists.txt +++ b/src/coreclr/pal/tests/palsuite/CMakeLists.txt @@ -415,7 +415,6 @@ add_executable_clr(paltests c_runtime/wcsstr/test1/test1.cpp c_runtime/wcstod/test1/test1.cpp c_runtime/wcstod/test2/test2.cpp - c_runtime/wcstok/test1/test1.cpp c_runtime/wcstoul/test1/test1.cpp c_runtime/wcstoul/test2/test2.cpp c_runtime/wcstoul/test3/test3.cpp diff --git a/src/coreclr/pal/tests/palsuite/c_runtime/wcstok/test1/test1.cpp b/src/coreclr/pal/tests/palsuite/c_runtime/wcstok/test1/test1.cpp deleted file mode 100644 index 564466c2a4e7f..0000000000000 --- a/src/coreclr/pal/tests/palsuite/c_runtime/wcstok/test1/test1.cpp +++ /dev/null @@ -1,113 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -/*============================================================================ -** -** Source: test1.c -** -** Purpose: -** Search for a number of tokens within strings. Check that the return values -** are what is expected, and also that the strings match up with our expected -** results. -** -** -**==========================================================================*/ - -#include - -PALTEST(c_runtime_wcstok_test1_paltest_wcstok_test1, "c_runtime/wcstok/test1/paltest_wcstok_test1") -{ - /* foo bar baz */ - WCHAR str[] = {'f','o','o',' ','b','a','r',' ','b','a','z','\0'}; - - /* foo \0ar baz */ - WCHAR result1[] = {'f','o','o',' ','\0','a','r',' ','b','a','z','\0'}; - - /* foo \0a\0 baz */ - WCHAR result2[] = {'f','o','o',' ','\0','a','\0',' ','b','a','z','\0'}; - - WCHAR* tempString; - int len = 0; - WCHAR *ptr; - - if (PAL_Initialize(argc, argv)) - { - return FAIL; - } - - len = (wcslen(str)*sizeof(WCHAR)) + 2; - - /* Tokenize 'str'. It will hit the 'b' delimiter first. Check to see - that the ptr is pointing to the start of the string and do a compare - to ensure the tokenized string is what we expected. - */ - - tempString = convert("bz"); - ptr = wcstok(str, tempString); - free(tempString); - - if (ptr != str) - { - Fail("ERROR: Expected wcstok() to return %p, got %p!\n", str, ptr); - } - - if (memcmp(str, result1, len) != 0) - { - Fail("ERROR: wcstok altered the string in an unexpected fashion."); - } - - /* If NULL is passed as the first parameter, wcstok will continue - tokenizing the same string. Test that this works properly. - */ - tempString = convert("r "); - ptr = wcstok(NULL, tempString); - free(tempString); - - if (ptr != str + 5) - { - Fail("ERROR: Expected wcstok() to return %p, got %p!\n", str+5, ptr); - } - - if (memcmp(str, result2, len) != 0) - { - Fail("ERROR: wcstok altered the string in an unexpected fashion."); - } - - /* Continue onward, and search for 'X' now, which won't be found. The - pointer should point just after the last NULL in the string. And - the string itself shouldn't have changed. - */ - tempString = convert("X"); - ptr = wcstok(NULL, tempString); - free(tempString); - - if (ptr != str + 7) - { - Fail("ERROR: Expected wcstok() to return %p, got %p!\n", str + 7, ptr); - } - - if (memcmp(str, result2, len) != 0) - { - Fail("ERROR: wcstok altered the string in an unexpeced fashion.\n"); - } - - /* Call wcstok again. Now the ptr should point to the end of the - string at NULL. And the string itself shouldn't have changed. - */ - tempString = convert("X"); - ptr = wcstok(NULL, tempString); - free(tempString); - - if (ptr != NULL) - { - Fail("ERROR: Expected wcstok() to return %p, got %p!\n", NULL, ptr); - } - - if (memcmp(str, result2, len) != 0) - { - Fail("ERROR: wcstok altered the string in an unexpeced fashion.\n"); - } - - PAL_Terminate(); - return PASS; -} diff --git a/src/coreclr/pal/tests/palsuite/compilableTests.txt b/src/coreclr/pal/tests/palsuite/compilableTests.txt index c674de294db45..df727bc277be4 100644 --- a/src/coreclr/pal/tests/palsuite/compilableTests.txt +++ b/src/coreclr/pal/tests/palsuite/compilableTests.txt @@ -348,7 +348,6 @@ c_runtime/wcsrchr/test1/paltest_wcsrchr_test1 c_runtime/wcsstr/test1/paltest_wcsstr_test1 c_runtime/wcstod/test1/paltest_wcstod_test1 c_runtime/wcstod/test2/paltest_wcstod_test2 -c_runtime/wcstok/test1/paltest_wcstok_test1 c_runtime/wcstoul/test1/paltest_wcstoul_test1 c_runtime/wcstoul/test2/paltest_wcstoul_test2 c_runtime/wcstoul/test3/paltest_wcstoul_test3 diff --git a/src/coreclr/pal/tests/palsuite/loader/LoadLibraryA/test6/loadlibrarya.cpp b/src/coreclr/pal/tests/palsuite/loader/LoadLibraryA/test6/loadlibrarya.cpp index d71e0ea85c333..93363488bc61d 100644 --- a/src/coreclr/pal/tests/palsuite/loader/LoadLibraryA/test6/loadlibrarya.cpp +++ b/src/coreclr/pal/tests/palsuite/loader/LoadLibraryA/test6/loadlibrarya.cpp @@ -7,9 +7,9 @@ ** ** Purpose: Positive test the LoadLibrary API. Test will verify ** that it is unable to load the library twice. Once by -** using the full path name and secondly by using the +** using the full path name and secondly by using the ** short name. -** +** ** **============================================================*/ @@ -25,14 +25,13 @@ typedef int (*dllfunct)(); #define GETATTACHCOUNTNAME "_GetAttachCount@0" #endif - /* Helper function to test the loaded library. */ BOOL PALAPI TestDll(HMODULE hLib) { int RetVal; char FunctName[] = GETATTACHCOUNTNAME; - FARPROC DllFunc; + FARPROC DllFunc; /* Access a function from the loaded library. */ @@ -45,7 +44,7 @@ BOOL PALAPI TestDll(HMODULE hLib) return (FALSE); } - /* Verify that the DLL_PROCESS_ATTACH is only + /* Verify that the DLL_PROCESS_ATTACH is only * accessed once.*/ RetVal = DllFunc(); if (RetVal != 1) @@ -70,7 +69,7 @@ PALTEST(loader_LoadLibraryA_test6_paltest_loadlibrarya_test6, "loader/LoadLibrar char fname[_MAX_FNAME]; char ext[_MAX_EXT]; - + /* Initialize the PAL. */ if ((PAL_Initialize(argc, argv)) != 0) @@ -84,15 +83,15 @@ PALTEST(loader_LoadLibraryA_test6_paltest_loadlibrarya_test6, "loader/LoadLibrar /* Get the full path to the library (DLL). */ - - if (NULL != _fullpath(fullPath,argv[0],_MAX_DIR)) { - + + if (NULL != realpath(argv[0],fullpath)) { + _splitpath(fullPath,drive,dir,fname,ext); _makepath(fullPath,drive,dir,LibraryName,""); - - + + } else { - Fail("ERROR: conversion from relative path \" %s \" to absolute path failed. _fullpath returned NULL\n",argv[0]); + Fail("ERROR: conversion from relative path \" %s \" to absolute path failed. realpath returned NULL\n",argv[0]); } /* Call Load library with the short name of @@ -101,11 +100,11 @@ PALTEST(loader_LoadLibraryA_test6_paltest_loadlibrarya_test6, "loader/LoadLibrar hShortLib = LoadLibrary(LibraryName); if(hShortLib == NULL) { - Fail("ERROR:%u:Unable to load library %s\n", - GetLastError(), + Fail("ERROR:%u:Unable to load library %s\n", + GetLastError(), LibraryName); } - + /* Test the loaded library. */ if (!TestDll(hShortLib)) @@ -120,8 +119,8 @@ PALTEST(loader_LoadLibraryA_test6_paltest_loadlibrarya_test6, "loader/LoadLibrar hFullLib = LoadLibrary(fullPath); if(hFullLib == NULL) { - Trace("ERROR:%u:Unable to load library %s\n", - GetLastError(), + Trace("ERROR:%u:Unable to load library %s\n", + GetLastError(), fullPath); iRetVal = FAIL; goto cleanUpTwo; @@ -141,11 +140,11 @@ PALTEST(loader_LoadLibraryA_test6_paltest_loadlibrarya_test6, "loader/LoadLibrar cleanUpTwo: - /* Call the FreeLibrary API. - */ + /* Call the FreeLibrary API. + */ if (!FreeLibrary(hFullLib)) { - Trace("ERROR:%u: Unable to free library \"%s\"\n", + Trace("ERROR:%u: Unable to free library \"%s\"\n", GetLastError(), fullPath); iRetVal = FAIL; @@ -153,11 +152,11 @@ PALTEST(loader_LoadLibraryA_test6_paltest_loadlibrarya_test6, "loader/LoadLibrar cleanUpOne: - /* Call the FreeLibrary API. - */ + /* Call the FreeLibrary API. + */ if (!FreeLibrary(hShortLib)) { - Trace("ERROR:%u: Unable to free library \"%s\"\n", + Trace("ERROR:%u: Unable to free library \"%s\"\n", GetLastError(), LibraryName); iRetVal = FAIL; @@ -167,5 +166,4 @@ PALTEST(loader_LoadLibraryA_test6_paltest_loadlibrarya_test6, "loader/LoadLibrar */ PAL_TerminateEx(iRetVal); return iRetVal; - } diff --git a/src/coreclr/pal/tests/palsuite/loader/LoadLibraryA/test8/loadlibrarya.cpp b/src/coreclr/pal/tests/palsuite/loader/LoadLibraryA/test8/loadlibrarya.cpp index b489ef27f965e..1bbf9a6d08ad1 100644 --- a/src/coreclr/pal/tests/palsuite/loader/LoadLibraryA/test8/loadlibrarya.cpp +++ b/src/coreclr/pal/tests/palsuite/loader/LoadLibraryA/test8/loadlibrarya.cpp @@ -7,9 +7,9 @@ ** ** Purpose: Positive test the LoadLibrary API. Test will verify ** that it is unable to load the library twice. Once by -** using the full path name and secondly by using the +** using the full path name and secondly by using the ** short name. -** +** ** **============================================================*/ @@ -25,14 +25,13 @@ typedef int (*dllfunct)(); #define GETATTACHCOUNTNAME "_GetAttachCount@0" #endif - /* Helper function to test the loaded library. */ BOOL PALAPI TestDll(HMODULE hLib) { int RetVal; char FunctName[] = GETATTACHCOUNTNAME; - FARPROC DllFunc; + FARPROC DllFunc; /* Access a function from the loaded library. */ @@ -45,7 +44,7 @@ BOOL PALAPI TestDll(HMODULE hLib) return (FALSE); } - /* Verify that the DLL_PROCESS_ATTACH is only + /* Verify that the DLL_PROCESS_ATTACH is only * accessed once.*/ RetVal = DllFunc(); if (RetVal != 1) @@ -72,7 +71,7 @@ PALTEST(loader_LoadLibraryA_test8_paltest_loadlibrarya_test8, "loader/LoadLibrar char relTestDir[_MAX_DIR]; char fname[_MAX_FNAME]; char ext[_MAX_EXT]; - + BOOL bRc = FALSE; char relLibPath[_MAX_DIR]; @@ -89,15 +88,15 @@ PALTEST(loader_LoadLibraryA_test8_paltest_loadlibrarya_test8, "loader/LoadLibrar /* Get the full path to the library (DLL). */ - - if (NULL != _fullpath(fullPath,argv[0],_MAX_DIR)) { - + + if (NULL != realpath(argv[0],fullpath)) { + _splitpath(fullPath,drive,dir,fname,ext); _makepath(fullPath,drive,dir,LibraryName,""); - - + + } else { - Fail("ERROR: conversion from relative path \" %s \" to absolute path failed. _fullpath returned NULL\n",argv[0]); + Fail("ERROR: conversion from relative path \" %s \" to absolute path failed. realpath returned NULL\n",argv[0]); } /* Get relative path to the library @@ -112,11 +111,11 @@ PALTEST(loader_LoadLibraryA_test8_paltest_loadlibrarya_test8, "loader/LoadLibrar hShortLib = LoadLibrary(LibraryName); if(hShortLib == NULL) { - Fail("ERROR:%u:Short:Unable to load library %s\n", - GetLastError(), + Fail("ERROR:%u:Short:Unable to load library %s\n", + GetLastError(), LibraryName); } - + /* Test the loaded library. */ if (!TestDll(hShortLib)) @@ -131,8 +130,8 @@ PALTEST(loader_LoadLibraryA_test8_paltest_loadlibrarya_test8, "loader/LoadLibrar hFullLib = LoadLibrary(fullPath); if(hFullLib == NULL) { - Trace("ERROR:%u:Full:Unable to load library %s\n", - GetLastError(), + Trace("ERROR:%u:Full:Unable to load library %s\n", + GetLastError(), fullPath); iRetVal = FAIL; goto cleanUpTwo; @@ -148,14 +147,14 @@ PALTEST(loader_LoadLibraryA_test8_paltest_loadlibrarya_test8, "loader/LoadLibrar /* ** Call the load library with the relative path - ** wrt to the directory ./testloadlibrary/.. + ** wrt to the directory ./testloadlibrary/.. ** since we don't want to make any assumptions ** regarding the type of build */ hRelLib = LoadLibrary(relLibPath); if(hRelLib == NULL) { - Trace("ERROR:%u:Rel:Unable to load library at %s\n", + Trace("ERROR:%u:Rel:Unable to load library at %s\n", GetLastError(), relLibPath); iRetVal = FAIL; goto cleanUpTwo; @@ -190,12 +189,12 @@ PALTEST(loader_LoadLibraryA_test8_paltest_loadlibrarya_test8, "loader/LoadLibrar cleanUpThree: - /* Call the FreeLibrary API. - */ + /* Call the FreeLibrary API. + */ if (!FreeLibrary(hRelLib)) { - Trace("ERROR:%u: Unable to free library \"%s\"\n", + Trace("ERROR:%u: Unable to free library \"%s\"\n", GetLastError(), relLibPath); iRetVal = FAIL; @@ -203,11 +202,11 @@ PALTEST(loader_LoadLibraryA_test8_paltest_loadlibrarya_test8, "loader/LoadLibrar cleanUpTwo: - /* Call the FreeLibrary API. - */ + /* Call the FreeLibrary API. + */ if (!FreeLibrary(hFullLib)) { - Trace("ERROR:%u: Unable to free library \"%s\"\n", + Trace("ERROR:%u: Unable to free library \"%s\"\n", GetLastError(), fullPath); iRetVal = FAIL; @@ -215,20 +214,18 @@ PALTEST(loader_LoadLibraryA_test8_paltest_loadlibrarya_test8, "loader/LoadLibrar cleanUpOne: - /* Call the FreeLibrary API. - */ + /* Call the FreeLibrary API. + */ if (!FreeLibrary(hShortLib)) { - Trace("ERROR:%u: Unable to free library \"%s\"\n", + Trace("ERROR:%u: Unable to free library \"%s\"\n", GetLastError(), LibraryName); iRetVal = FAIL; } - /* Terminate the PAL. */ PAL_TerminateEx(iRetVal); return iRetVal; - } diff --git a/src/coreclr/pal/tests/palsuite/paltestlist.txt b/src/coreclr/pal/tests/palsuite/paltestlist.txt index 2b9ac7ccd4eb1..514cd52f1a590 100644 --- a/src/coreclr/pal/tests/palsuite/paltestlist.txt +++ b/src/coreclr/pal/tests/palsuite/paltestlist.txt @@ -333,7 +333,6 @@ c_runtime/wcsrchr/test1/paltest_wcsrchr_test1 c_runtime/wcsstr/test1/paltest_wcsstr_test1 c_runtime/wcstod/test1/paltest_wcstod_test1 c_runtime/wcstod/test2/paltest_wcstod_test2 -c_runtime/wcstok/test1/paltest_wcstok_test1 c_runtime/wcstoul/test1/paltest_wcstoul_test1 c_runtime/wcstoul/test2/paltest_wcstoul_test2 c_runtime/wcstoul/test3/paltest_wcstoul_test3