diff options
author | Justin Van Patten <jvp@justinvp.com> | 2017-08-22 07:09:08 -0700 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2017-08-22 07:09:08 -0700 |
commit | dfd90b728c3bc26c4e038a3dbd6075ce3f257d2b (patch) | |
tree | 12ff662c5160c50acfcf47ad09f7f55cbc9bec45 /src/pal/tests/palsuite | |
parent | 469940932199d4f281896184c8fd49daffdd1a5d (diff) | |
download | coreclr-dfd90b728c3bc26c4e038a3dbd6075ce3f257d2b.tar.gz coreclr-dfd90b728c3bc26c4e038a3dbd6075ce3f257d2b.tar.bz2 coreclr-dfd90b728c3bc26c4e038a3dbd6075ce3f257d2b.zip |
Delete some dead PAL code (#13469)
* Delete some dead PAL code
GetComputerName and GetUserName are not used.
* HAVE_GETPWUID_R can now be deleted
Diffstat (limited to 'src/pal/tests/palsuite')
11 files changed, 0 insertions, 177 deletions
diff --git a/src/pal/tests/palsuite/miscellaneous/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/CMakeLists.txt index 9352edef52..d437fc9320 100644 --- a/src/pal/tests/palsuite/miscellaneous/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/CMakeLists.txt @@ -9,7 +9,6 @@ add_subdirectory(FlushInstructionCache) add_subdirectory(FormatMessageW) add_subdirectory(FreeEnvironmentStringsW) add_subdirectory(GetCommandLineW) -add_subdirectory(GetComputerNameW) add_subdirectory(GetEnvironmentStringsW) add_subdirectory(GetEnvironmentVariableA) add_subdirectory(GetEnvironmentVariableW) diff --git a/src/pal/tests/palsuite/miscellaneous/GetComputerNameW/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/GetComputerNameW/CMakeLists.txt deleted file mode 100644 index f6aa0cb2d9..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/GetComputerNameW/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -add_subdirectory(test1) - diff --git a/src/pal/tests/palsuite/miscellaneous/GetComputerNameW/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/GetComputerNameW/test1/CMakeLists.txt deleted file mode 100644 index fe5b72071e..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/GetComputerNameW/test1/CMakeLists.txt +++ /dev/null @@ -1,17 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test.cpp -) - -add_executable(paltest_getcomputernamew_test1 - ${SOURCES} -) - -add_dependencies(paltest_getcomputernamew_test1 coreclrpal) - -target_link_libraries(paltest_getcomputernamew_test1 - ${COMMON_TEST_LIBRARIES} -) diff --git a/src/pal/tests/palsuite/miscellaneous/GetComputerNameW/test1/test.cpp b/src/pal/tests/palsuite/miscellaneous/GetComputerNameW/test1/test.cpp deleted file mode 100644 index 7a00cad598..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/GetComputerNameW/test1/test.cpp +++ /dev/null @@ -1,53 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/*============================================================ -** -** Source : test.c -** -** Purpose: Positive Test for GetComputerName() function -** -** -**=========================================================*/ - -#define UNICODE -#include <palsuite.h> - -int __cdecl main(int argc, char *argv[]) -{ - - int HOST_NAME_MAX = 255; - WCHAR wzComputerName[HOST_NAME_MAX+1]; - DWORD dwSize = sizeof(wzComputerName)/sizeof(wzComputerName[0]); - - // Initialize the PAL and return FAILURE if this fails - if(0 != (PAL_Initialize(argc, argv))) - { - Fail ("ERROR: PAL_Initialize() call failed!\n"); - } - - if (0 == GetComputerName(wzComputerName, &dwSize)) - { - Fail("ERROR: GetComputerName failed with %d!\n", GetLastError()); - } - - // dwSize is the length of wzComputerName without NULL - if (dwSize < 0 || dwSize > (sizeof(wzComputerName)/sizeof(wzComputerName[0]) - 1)) - { - Fail("ERROR: GetComputerName returned %S with dwSize = %u whereas the passed in buffer size is %d!\n", - wzComputerName, dwSize, sizeof(wzComputerName)/sizeof(wzComputerName[0])); - } - - // dwSize is the length of wzComputerName without NULL - if (dwSize != wcslen(wzComputerName)) - { - Fail("ERROR: GetComputerName returned %S of length %d which is not equal to dwSize = %u!\n", - wzComputerName, wcslen(wzComputerName), dwSize); - } - - printf ("GetComputerName returned %S of length %u\n", wzComputerName, dwSize); - - PAL_Terminate(); - return PASS; -} diff --git a/src/pal/tests/palsuite/miscellaneous/GetComputerNameW/test1/testinfo.dat b/src/pal/tests/palsuite/miscellaneous/GetComputerNameW/test1/testinfo.dat deleted file mode 100644 index d45bca1c25..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/GetComputerNameW/test1/testinfo.dat +++ /dev/null @@ -1,13 +0,0 @@ -# Licensed to the .NET Foundation under one or more agreements. -# The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. - -Version = 1.0 -Section = Miscellaneous -Function = GetComputerNameW -Name = Test for GetComputerNameW -TYPE = DEFAULT -EXE1 = test -Description -= Check to ensure that GetComputerNameW returnes a decent value. - diff --git a/src/pal/tests/palsuite/miscellaneous/GetUserNameW/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/GetUserNameW/CMakeLists.txt deleted file mode 100644 index f6aa0cb2d9..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/GetUserNameW/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -add_subdirectory(test1) - diff --git a/src/pal/tests/palsuite/miscellaneous/GetUserNameW/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/GetUserNameW/test1/CMakeLists.txt deleted file mode 100644 index 6527b83d13..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/GetUserNameW/test1/CMakeLists.txt +++ /dev/null @@ -1,17 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test.cpp -) - -add_executable(paltest_getusernamew_test1 - ${SOURCES} -) - -add_dependencies(paltest_getusernamew_test1 coreclrpal) - -target_link_libraries(paltest_getusernamew_test1 - ${COMMON_TEST_LIBRARIES} -) diff --git a/src/pal/tests/palsuite/miscellaneous/GetUserNameW/test1/test.cpp b/src/pal/tests/palsuite/miscellaneous/GetUserNameW/test1/test.cpp deleted file mode 100644 index 809f14c12d..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/GetUserNameW/test1/test.cpp +++ /dev/null @@ -1,52 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/*============================================================ -** -** Source : test.c -** -** Purpose: Positive Test for GetUserName() function -** -** -**=========================================================*/ - -#define UNICODE -#include <palsuite.h> - -int __cdecl main(int argc, char *argv[]) -{ - - WCHAR wzUserName[UNLEN+1]; - DWORD dwSize = sizeof(wzUserName)/sizeof(wzUserName[0]); - - // Initialize the PAL and return FAILURE if this fails - if(0 != (PAL_Initialize(argc, argv))) - { - Fail ("ERROR: PAL_Initialize() call failed!\n"); - } - - if (0 == GetUserName(wzUserName, &dwSize)) - { - Fail("ERROR: GetUserName failed with %d!\n", GetLastError()); - } - - // dwSize is the length of wzUserName with NULL - if (dwSize <= 0 || dwSize > (sizeof(wzUserName)/sizeof(wzUserName[0]))) - { - Fail("ERROR: GetUserName returned %S with dwSize = %u whereas the passed in buffer size is %d!\n", - wzUserName, dwSize, sizeof(wzUserName)/sizeof(wzUserName[0])); - } - - // dwSize is the length of wzUserName with NULL - if (dwSize != wcslen(wzUserName)+1) - { - Fail("ERROR: GetUserName returned %S of length %d which is not equal to dwSize-1 = %u!\n", - wzUserName, wcslen(wzUserName), dwSize-1); - } - - printf ("GetUserName returned %S of length %u\n", wzUserName, dwSize-1); - - PAL_Terminate(); - return PASS; -} diff --git a/src/pal/tests/palsuite/miscellaneous/GetUserNameW/test1/testinfo.dat b/src/pal/tests/palsuite/miscellaneous/GetUserNameW/test1/testinfo.dat deleted file mode 100644 index 3e0aa48bd0..0000000000 --- a/src/pal/tests/palsuite/miscellaneous/GetUserNameW/test1/testinfo.dat +++ /dev/null @@ -1,13 +0,0 @@ -# Licensed to the .NET Foundation under one or more agreements. -# The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. - -Version = 1.0 -Section = Miscellaneous -Function = GetUserNameW -Name = Test for GetUserNameW -TYPE = DEFAULT -EXE1 = test -Description -= Check to ensure that GetUserNameW returnes a decent value. - diff --git a/src/pal/tests/palsuite/paltestlist.txt b/src/pal/tests/palsuite/paltestlist.txt index 1e580cd596..0c8892a4a0 100644 --- a/src/pal/tests/palsuite/paltestlist.txt +++ b/src/pal/tests/palsuite/paltestlist.txt @@ -653,7 +653,6 @@ miscellaneous/FormatMessageW/test3/paltest_formatmessagew_test3 miscellaneous/FreeEnvironmentStringsW/test1/paltest_freeenvironmentstringsw_test1 miscellaneous/FreeEnvironmentStringsW/test2/paltest_freeenvironmentstringsw_test2 miscellaneous/GetCommandLineW/test1/paltest_getcommandlinew_test1 -miscellaneous/GetComputerNameW/test1/paltest_getcomputernamew_test1 miscellaneous/GetEnvironmentStringsW/test1/paltest_getenvironmentstringsw_test1 miscellaneous/GetEnvironmentVariableA/test1/paltest_getenvironmentvariablea_test1 miscellaneous/GetEnvironmentVariableA/test2/paltest_getenvironmentvariablea_test2 diff --git a/src/pal/tests/palsuite/paltestlist_to_be_reviewed.txt b/src/pal/tests/palsuite/paltestlist_to_be_reviewed.txt index 3f9469d254..4dac7e94c6 100644 --- a/src/pal/tests/palsuite/paltestlist_to_be_reviewed.txt +++ b/src/pal/tests/palsuite/paltestlist_to_be_reviewed.txt @@ -139,11 +139,9 @@ miscellaneous/FormatMessageW/test5/paltest_formatmessagew_test5 miscellaneous/FormatMessageW/test6/paltest_formatmessagew_test6 miscellaneous/GetCalendarInfoW/test1/paltest_getcalendarinfow_test1 miscellaneous/GetCalendarInfoW/test2/paltest_getcalendarinfow_test2 -miscellaneous/GetComputerNameW/test1/paltest_getcomputernamew_test1 miscellaneous/GetDateFormatW/GetDateFormatW_neg1/paltest_getdateformatw_getdateformatw_neg1 miscellaneous/GetDateFormatW/GetDateFormatW_neg2/paltest_getdateformatw_getdateformatw_neg2 miscellaneous/GetDateFormatW/test1/paltest_getdateformatw_test1 -miscellaneous/GetUserNameW/test1/paltest_getusernamew_test1 miscellaneous/InterLockedExchangeAdd/test1/paltest_interlockedexchangeadd_test1 miscellaneous/IsBadCodePtr/test1/paltest_isbadcodeptr_test1 miscellaneous/IsBadReadPtr/test1/paltest_isbadreadptr_test1 |