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/miscellaneous | |
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/miscellaneous')
9 files changed, 0 insertions, 174 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. - |