diff options
author | Jiyoung Yun <jy910.yun@samsung.com> | 2016-12-27 16:46:08 +0900 |
---|---|---|
committer | Jiyoung Yun <jy910.yun@samsung.com> | 2016-12-27 16:46:08 +0900 |
commit | db20f3f1bb8595633a7e16c8900fd401a453a6b5 (patch) | |
tree | e5435159cd1bf0519276363a6fe1663d1721bed3 /src/pal/tests/palsuite/filemapping_memmgt | |
parent | 4b4aad7217d3292650e77eec2cf4c198ea9c3b4b (diff) | |
download | coreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.tar.gz coreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.tar.bz2 coreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.zip |
Imported Upstream version 1.0.0.9127upstream/1.0.0.9127
Diffstat (limited to 'src/pal/tests/palsuite/filemapping_memmgt')
229 files changed, 289 insertions, 886 deletions
diff --git a/src/pal/tests/palsuite/filemapping_memmgt/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/CMakeLists.txt index 3fc399fe59..a573dae8cd 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/CMakeLists.txt @@ -17,7 +17,7 @@ add_subdirectory(LockFile) add_subdirectory(MapViewOfFile) add_subdirectory(OpenFileMappingA) add_subdirectory(OpenFileMappingW) -add_subdirectory(ReadProcessMemory) +add_subdirectory(ProbeMemory) add_subdirectory(RtlMoveMemory) add_subdirectory(UnlockFile) add_subdirectory(UnmapViewOfFile) diff --git a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test1/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test1/CMakeLists.txt index 36084bf446..c38015ea21 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - CreateFileMapping.c + CreateFileMapping.cpp ) add_executable(paltest_createfilemappinga_test1 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test1/CreateFileMapping.c b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test1/CreateFileMapping.cpp index 91640bfd04..91640bfd04 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test1/CreateFileMapping.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test1/CreateFileMapping.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test3/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test3/CMakeLists.txt index 374f8f0946..fc152c8161 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test3/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test3/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - CreateFileMapping.c + CreateFileMapping.cpp ) add_executable(paltest_createfilemappinga_test3 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test3/CreateFileMapping.c b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test3/CreateFileMapping.cpp index 2a849d86b8..2a849d86b8 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test3/CreateFileMapping.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test3/CreateFileMapping.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test4/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test4/CMakeLists.txt index 665b10a3f0..bbb4deaa8b 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test4/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test4/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - CreateFileMapping.c + CreateFileMapping.cpp ) add_executable(paltest_createfilemappinga_test4 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test4/CreateFileMapping.c b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test4/CreateFileMapping.cpp index 64caa88ca0..64caa88ca0 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test4/CreateFileMapping.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test4/CreateFileMapping.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test5/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test5/CMakeLists.txt index 6f7f3c3635..b80aa21a42 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test5/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test5/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - CreateFileMapping.c + CreateFileMapping.cpp ) add_executable(paltest_createfilemappinga_test5 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test5/CreateFileMapping.c b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test5/CreateFileMapping.cpp index c7f9918b08..c7f9918b08 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test5/CreateFileMapping.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test5/CreateFileMapping.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test6/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test6/CMakeLists.txt index 2f5d98b5e6..414127aa35 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test6/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test6/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - CreateFileMapping.c + CreateFileMapping.cpp ) add_executable(paltest_createfilemappinga_test6 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test6/CreateFileMapping.c b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test6/CreateFileMapping.cpp index 6445295de8..6445295de8 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test6/CreateFileMapping.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test6/CreateFileMapping.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test7/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test7/CMakeLists.txt index 4fd24a63a1..e40a5ad486 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test7/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test7/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - createfilemapping.c + createfilemapping.cpp ) add_executable(paltest_createfilemappinga_test7 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test7/createfilemapping.c b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test7/createfilemapping.cpp index 7cef9ddcdc..7cef9ddcdc 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test7/createfilemapping.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test7/createfilemapping.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test8/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test8/CMakeLists.txt index ae3ee8ddf6..d2e2007545 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test8/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test8/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - createfilemapping.c + createfilemapping.cpp ) add_executable(paltest_createfilemappinga_test8 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test8/createfilemapping.c b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test8/createfilemapping.cpp index 02b2fb5e61..02b2fb5e61 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test8/createfilemapping.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test8/createfilemapping.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test9/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test9/CMakeLists.txt index a377632bed..3017dc4aa4 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test9/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test9/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - createfilemapping.c + createfilemapping.cpp ) add_executable(paltest_createfilemappinga_test9 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test9/createfilemapping.c b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test9/createfilemapping.cpp index 9224c22b4b..9224c22b4b 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test9/createfilemapping.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingA/test9/createfilemapping.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/CreateFileMapping_neg1/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/CreateFileMapping_neg1/CMakeLists.txt index a4ad343ea0..2d24eca8c8 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/CreateFileMapping_neg1/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/CreateFileMapping_neg1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - CreateFileMapping_neg.c + CreateFileMapping_neg.cpp ) add_executable(paltest_createfilemappingw_createfilemapping_neg1 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/CreateFileMapping_neg1/CreateFileMapping_neg.c b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/CreateFileMapping_neg1/CreateFileMapping_neg.cpp index 8cf79b3c57..8cf79b3c57 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/CreateFileMapping_neg1/CreateFileMapping_neg.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/CreateFileMapping_neg1/CreateFileMapping_neg.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test1/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test1/CMakeLists.txt index 0c569ec9b6..a2fbfa39af 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - CreateFileMappingW.c + CreateFileMappingW.cpp ) add_executable(paltest_createfilemappingw_test1 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test1/CreateFileMappingW.c b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test1/CreateFileMappingW.cpp index 4263a3ad29..4263a3ad29 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test1/CreateFileMappingW.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test1/CreateFileMappingW.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test2/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test2/CMakeLists.txt index 992645f48c..8552cc910f 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test2/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test2/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - CreateFileMappingW.c + CreateFileMappingW.cpp ) add_executable(paltest_createfilemappingw_test2 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test2/CreateFileMappingW.c b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test2/CreateFileMappingW.cpp index 11ff967dfd..5cc6d77709 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test2/CreateFileMappingW.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test2/CreateFileMappingW.cpp @@ -34,9 +34,9 @@ int __cdecl main(int argc, char *argv[]) } #if WIN32 - sprintf(executableFileName,"%s","executable.exe"); + sprintf_s(executableFileName, _countof(executableFileName),"%s","executable.exe"); #else - sprintf(executableFileName,"%s","executable"); + sprintf_s(executableFileName, _countof(executableFileName),"%s","executable"); #endif //conver string to a unicode one diff --git a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test3/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test3/CMakeLists.txt index 87832ffd9b..97fd712350 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test3/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test3/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - CreateFileMappingW.c + CreateFileMappingW.cpp ) add_executable(paltest_createfilemappingw_test3 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test3/CreateFileMappingW.c b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test3/CreateFileMappingW.cpp index 1cbeff94a7..1cbeff94a7 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test3/CreateFileMappingW.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test3/CreateFileMappingW.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test4/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test4/CMakeLists.txt index f8a5c9041f..81f248e335 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test4/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test4/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - CreateFileMappingW.c + CreateFileMappingW.cpp ) add_executable(paltest_createfilemappingw_test4 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test4/CreateFileMappingW.c b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test4/CreateFileMappingW.cpp index 265a317b2f..265a317b2f 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test4/CreateFileMappingW.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test4/CreateFileMappingW.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test5/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test5/CMakeLists.txt index 8391fbd721..df25e29a4f 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test5/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test5/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - CreateFileMappingW.c + CreateFileMappingW.cpp ) add_executable(paltest_createfilemappingw_test5 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test5/CreateFileMappingW.c b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test5/CreateFileMappingW.cpp index 21bf7c6d76..21bf7c6d76 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test5/CreateFileMappingW.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test5/CreateFileMappingW.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test6/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test6/CMakeLists.txt index abb62ad950..852c508020 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test6/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test6/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - CreateFileMappingW.c + CreateFileMappingW.cpp ) add_executable(paltest_createfilemappingw_test6 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test6/CreateFileMappingW.c b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test6/CreateFileMappingW.cpp index acf3ac6dff..acf3ac6dff 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test6/CreateFileMappingW.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test6/CreateFileMappingW.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test7/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test7/CMakeLists.txt index b40cfeae96..68be449aec 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test7/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test7/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - createfilemapping.c + createfilemapping.cpp ) add_executable(paltest_createfilemappingw_test7 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test7/createfilemapping.c b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test7/createfilemapping.cpp index e49b9f688d..e49b9f688d 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test7/createfilemapping.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test7/createfilemapping.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test8/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test8/CMakeLists.txt index 96658c163a..406331072c 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test8/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test8/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - createfilemapping.c + createfilemapping.cpp ) add_executable(paltest_createfilemappingw_test8 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test8/createfilemapping.c b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test8/createfilemapping.cpp index 1ff137d8d3..1ff137d8d3 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test8/createfilemapping.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test8/createfilemapping.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test9/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test9/CMakeLists.txt index 5a55e27b33..6d15fea1e6 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test9/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test9/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - createfilemapping.c + createfilemapping.cpp ) add_executable(paltest_createfilemappingw_test9 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test9/createfilemapping.c b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test9/createfilemapping.cpp index 16ae74c126..16ae74c126 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test9/createfilemapping.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test9/createfilemapping.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/FreeLibrary/test1/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/FreeLibrary/test1/CMakeLists.txt index 3807621e3f..beaee835c8 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/FreeLibrary/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/FreeLibrary/test1/CMakeLists.txt @@ -3,8 +3,8 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - dlltest.c - FreeLibrary.c + dlltest.cpp + FreeLibrary.cpp ) add_executable(paltest_freelibrary_test1 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/FreeLibrary/test1/FreeLibrary.c b/src/pal/tests/palsuite/filemapping_memmgt/FreeLibrary/test1/FreeLibrary.cpp index a06a231586..a06a231586 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/FreeLibrary/test1/FreeLibrary.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/FreeLibrary/test1/FreeLibrary.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/FreeLibrary/test1/dlltest.c b/src/pal/tests/palsuite/filemapping_memmgt/FreeLibrary/test1/dlltest.cpp index 44f1b5a903..44f1b5a903 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/FreeLibrary/test1/dlltest.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/FreeLibrary/test1/dlltest.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/FreeLibrary/test2/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/FreeLibrary/test2/CMakeLists.txt index 00b1eca8e3..0a5e700ba4 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/FreeLibrary/test2/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/FreeLibrary/test2/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test2.c + test2.cpp ) add_executable(paltest_freelibrary_test2 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/FreeLibrary/test2/test2.c b/src/pal/tests/palsuite/filemapping_memmgt/FreeLibrary/test2/test2.cpp index b43f74d6bc..b43f74d6bc 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/FreeLibrary/test2/test2.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/FreeLibrary/test2/test2.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/FreeLibraryAndExitThread/test1/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/FreeLibraryAndExitThread/test1/CMakeLists.txt index cec083583a..03bfe06eb3 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/FreeLibraryAndExitThread/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/FreeLibraryAndExitThread/test1/CMakeLists.txt @@ -3,8 +3,8 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - dlltest.c - test1.c + dlltest.cpp + test1.cpp ) add_executable(paltest_freelibraryandexitthread_test1 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/FreeLibraryAndExitThread/test1/dlltest.c b/src/pal/tests/palsuite/filemapping_memmgt/FreeLibraryAndExitThread/test1/dlltest.cpp index 954c624d19..954c624d19 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/FreeLibraryAndExitThread/test1/dlltest.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/FreeLibraryAndExitThread/test1/dlltest.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/FreeLibraryAndExitThread/test1/test1.c b/src/pal/tests/palsuite/filemapping_memmgt/FreeLibraryAndExitThread/test1/test1.cpp index 6aacfc83b4..58f6643722 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/FreeLibraryAndExitThread/test1/test1.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/FreeLibraryAndExitThread/test1/test1.cpp @@ -58,7 +58,7 @@ BOOL PALAPI StartThreadTest() HANDLE hThread; DWORD dwThreadId; LPTHREAD_START_ROUTINE lpStartAddress = &CreateTestThread; - LPVOID lpParameter = lpStartAddress; + LPVOID lpParameter = (LPVOID)lpStartAddress; DWORD rc = -1; /*Load library (DLL).*/ hLib = LoadLibrary(LibraryName); @@ -72,7 +72,7 @@ BOOL PALAPI StartThreadTest() /*Start the test thread*/ hThread = CreateThread(NULL, (DWORD)0, - lpParameter, + lpStartAddress, hLib, (DWORD)NULL, &dwThreadId); diff --git a/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameA/test1/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameA/test1/CMakeLists.txt index a1128c62b8..9b7a610f0c 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameA/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameA/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - GetModuleFileNameA.c + GetModuleFileNameA.cpp ) add_executable(paltest_getmodulefilenamea_test1 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameA/test1/GetModuleFileNameA.c b/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameA/test1/GetModuleFileNameA.cpp index d05f0ac6a9..d05f0ac6a9 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameA/test1/GetModuleFileNameA.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameA/test1/GetModuleFileNameA.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameA/test2/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameA/test2/CMakeLists.txt index c35e9acc5e..1909be4b42 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameA/test2/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameA/test2/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - GetModuleFileNameA.c + GetModuleFileNameA.cpp ) add_executable(paltest_getmodulefilenamea_test2 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameA/test2/GetModuleFileNameA.c b/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameA/test2/GetModuleFileNameA.cpp index e8aed6d30e..e8aed6d30e 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameA/test2/GetModuleFileNameA.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameA/test2/GetModuleFileNameA.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameW/test1/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameW/test1/CMakeLists.txt index c702d07908..f3d92b15c9 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameW/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameW/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - GetModuleFileNameW.c + GetModuleFileNameW.cpp ) add_executable(paltest_getmodulefilenamew_test1 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameW/test1/GetModuleFileNameW.c b/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameW/test1/GetModuleFileNameW.cpp index 4c1c3b00ab..c122312d89 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameW/test1/GetModuleFileNameW.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameW/test1/GetModuleFileNameW.cpp @@ -45,7 +45,7 @@ int __cdecl main(int argc, char *argv[]) ExitProcess(FAIL); } - ModuleFileNameBuf = malloc(MODULENAMEBUFFERSIZE*sizeof(WCHAR)); + ModuleFileNameBuf = (WCHAR*)malloc(MODULENAMEBUFFERSIZE*sizeof(WCHAR)); //convert a normal string to a wide one lpModuleName = convert(ModuleName); diff --git a/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameW/test2/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameW/test2/CMakeLists.txt index 857feb330d..7b23e92772 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameW/test2/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameW/test2/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - GetModuleFileNameW.c + GetModuleFileNameW.cpp ) add_executable(paltest_getmodulefilenamew_test2 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameW/test2/GetModuleFileNameW.c b/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameW/test2/GetModuleFileNameW.cpp index 6009a9d298..f23d97c138 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameW/test2/GetModuleFileNameW.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameW/test2/GetModuleFileNameW.cpp @@ -34,7 +34,7 @@ int __cdecl main(int argc, char *argv[]) ExitProcess(FAIL); } - ModuleFileNameBuf = malloc(MODULENAMEBUFFERSIZE*sizeof(WCHAR)); + ModuleFileNameBuf = (WCHAR*)malloc(MODULENAMEBUFFERSIZE*sizeof(WCHAR)); //retrieve the current process full path and file name //by passing a NULL module handle diff --git a/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test1/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test1/CMakeLists.txt index 541ef8b98e..3dedba3cce 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test1/CMakeLists.txt @@ -3,8 +3,8 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test1.c - testlib.c + test1.cpp + testlib.cpp ) add_executable(paltest_getprocaddress_test1 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test1/test1.c b/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test1/test1.cpp index f0b76c615f..f0b76c615f 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test1/test1.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test1/test1.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test1/testlib.c b/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test1/testlib.cpp index e8fe48e05d..e8fe48e05d 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test1/testlib.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test1/testlib.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test2/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test2/CMakeLists.txt index 60a5ba1a6e..983c16f12f 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test2/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test2/CMakeLists.txt @@ -3,8 +3,8 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test2.c - testlib.c + test2.cpp + testlib.cpp ) add_executable(paltest_getprocaddress_test2 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test2/test2.c b/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test2/test2.cpp index 9107728423..9107728423 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test2/test2.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test2/test2.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test2/testlib.c b/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test2/testlib.cpp index 23e58e871e..23e58e871e 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test2/testlib.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test2/testlib.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/GetProcessHeap/test1/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/GetProcessHeap/test1/CMakeLists.txt index 18871abf00..3e9c725f95 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/GetProcessHeap/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/GetProcessHeap/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - GetProcessHeap.c + GetProcessHeap.cpp ) add_executable(paltest_getprocessheap_test1 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/GetProcessHeap/test1/GetProcessHeap.c b/src/pal/tests/palsuite/filemapping_memmgt/GetProcessHeap/test1/GetProcessHeap.cpp index bec6b5c616..bec6b5c616 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/GetProcessHeap/test1/GetProcessHeap.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/GetProcessHeap/test1/GetProcessHeap.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/HeapAlloc/test1/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/HeapAlloc/test1/CMakeLists.txt index 3a64a0c58a..b9ce32b35e 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/HeapAlloc/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/HeapAlloc/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - HeapAlloc.c + HeapAlloc.cpp ) add_executable(paltest_heapalloc_test1 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/HeapAlloc/test1/HeapAlloc.c b/src/pal/tests/palsuite/filemapping_memmgt/HeapAlloc/test1/HeapAlloc.cpp index 04de274e80..04de274e80 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/HeapAlloc/test1/HeapAlloc.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/HeapAlloc/test1/HeapAlloc.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/HeapAlloc/test2/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/HeapAlloc/test2/CMakeLists.txt index 5253110d8d..1b9655ddba 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/HeapAlloc/test2/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/HeapAlloc/test2/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - HeapAlloc.c + HeapAlloc.cpp ) add_executable(paltest_heapalloc_test2 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/HeapAlloc/test2/HeapAlloc.c b/src/pal/tests/palsuite/filemapping_memmgt/HeapAlloc/test2/HeapAlloc.cpp index 5f4ff90498..5f4ff90498 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/HeapAlloc/test2/HeapAlloc.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/HeapAlloc/test2/HeapAlloc.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/HeapAlloc/test3/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/HeapAlloc/test3/CMakeLists.txt index f0b89461d2..1c3845c6e9 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/HeapAlloc/test3/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/HeapAlloc/test3/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - HeapAlloc.c + HeapAlloc.cpp ) add_executable(paltest_heapalloc_test3 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/HeapAlloc/test3/HeapAlloc.c b/src/pal/tests/palsuite/filemapping_memmgt/HeapAlloc/test3/HeapAlloc.cpp index 4a74fe8194..4a74fe8194 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/HeapAlloc/test3/HeapAlloc.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/HeapAlloc/test3/HeapAlloc.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/HeapFree/test1/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/HeapFree/test1/CMakeLists.txt index 898047a9ad..004912256c 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/HeapFree/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/HeapFree/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - HeapFree.c + HeapFree.cpp ) add_executable(paltest_heapfree_test1 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/HeapFree/test1/HeapFree.c b/src/pal/tests/palsuite/filemapping_memmgt/HeapFree/test1/HeapFree.cpp index 37b6b3bf60..37b6b3bf60 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/HeapFree/test1/HeapFree.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/HeapFree/test1/HeapFree.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/HeapReAlloc/test1/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/HeapReAlloc/test1/CMakeLists.txt index 1decb02c73..17e0127435 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/HeapReAlloc/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/HeapReAlloc/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test1.c + test1.cpp ) add_executable(paltest_heaprealloc_test1 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/HeapReAlloc/test1/test1.c b/src/pal/tests/palsuite/filemapping_memmgt/HeapReAlloc/test1/test1.cpp index 497d208eca..eedd45e45d 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/HeapReAlloc/test1/test1.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/HeapReAlloc/test1/test1.cpp @@ -37,7 +37,7 @@ int __cdecl main(int argc, char *argv[]) } /* Allocate 100 bytes on the heap */ - if((TheMemory = HeapAlloc(TheHeap, 0, 100)) == NULL) + if((TheMemory = (char*)HeapAlloc(TheHeap, 0, 100)) == NULL) { Fail("ERROR: HeapAlloc returned NULL when it was called. " "GetLastError() returned %d.",GetLastError()); @@ -47,7 +47,7 @@ int __cdecl main(int argc, char *argv[]) memset(TheMemory, 'X', 100); /* Reallocate the memory */ - ReAllocMemory = HeapReAlloc(TheHeap, 0, TheMemory, 100); + ReAllocMemory = (char*)HeapReAlloc(TheHeap, 0, TheMemory, 100); if(ReAllocMemory == NULL) { diff --git a/src/pal/tests/palsuite/filemapping_memmgt/HeapReAlloc/test2/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/HeapReAlloc/test2/CMakeLists.txt index 6f5510387a..a9239354ba 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/HeapReAlloc/test2/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/HeapReAlloc/test2/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test2.c + test2.cpp ) add_executable(paltest_heaprealloc_test2 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/HeapReAlloc/test2/test2.c b/src/pal/tests/palsuite/filemapping_memmgt/HeapReAlloc/test2/test2.cpp index 13e789f901..a7e3b2a055 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/HeapReAlloc/test2/test2.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/HeapReAlloc/test2/test2.cpp @@ -38,7 +38,7 @@ int __cdecl main(int argc, char *argv[]) } /* Allocate 200 bytes on the heap */ - if((TheMemory = HeapAlloc(TheHeap, 0, 200)) == NULL) + if((TheMemory = (char*)HeapAlloc(TheHeap, 0, 200)) == NULL) { Fail("ERROR: HeapAlloc returned NULL when it was called. " "GetLastError() returned %d.",GetLastError()); @@ -51,7 +51,7 @@ int __cdecl main(int argc, char *argv[]) memset(TheMemory+100, 'Z', 100); /* Reallocate the memory to 100 bytes */ - ReAllocMemory = HeapReAlloc(TheHeap, 0, TheMemory, 100); + ReAllocMemory = (char*)HeapReAlloc(TheHeap, 0, TheMemory, 100); if(ReAllocMemory == NULL) { diff --git a/src/pal/tests/palsuite/filemapping_memmgt/HeapReAlloc/test3/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/HeapReAlloc/test3/CMakeLists.txt index 7ad836706a..2d82b6efdd 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/HeapReAlloc/test3/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/HeapReAlloc/test3/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test3.c + test3.cpp ) add_executable(paltest_heaprealloc_test3 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/HeapReAlloc/test3/test3.c b/src/pal/tests/palsuite/filemapping_memmgt/HeapReAlloc/test3/test3.cpp index dea9de348d..d4139e8d5e 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/HeapReAlloc/test3/test3.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/HeapReAlloc/test3/test3.cpp @@ -38,7 +38,7 @@ int __cdecl main(int argc, char *argv[]) } /* Allocate 100 bytes on the heap */ - if((TheMemory = HeapAlloc(TheHeap, 0, 100)) == NULL) + if((TheMemory = (char*)HeapAlloc(TheHeap, 0, 100)) == NULL) { Fail("ERROR: HeapAlloc returned NULL when it was called. " "GetLastError() returned %d.",GetLastError()); @@ -48,7 +48,7 @@ int __cdecl main(int argc, char *argv[]) memset(TheMemory, 'X', 100); /* Reallocate the memory to 200 bytes */ - ReAllocMemory = HeapReAlloc(TheHeap, 0, TheMemory, 200); + ReAllocMemory = (char*)HeapReAlloc(TheHeap, 0, TheMemory, 200); if(ReAllocMemory == NULL) { diff --git a/src/pal/tests/palsuite/filemapping_memmgt/HeapReAlloc/test4/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/HeapReAlloc/test4/CMakeLists.txt index 024a4ef840..129d8a47cd 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/HeapReAlloc/test4/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/HeapReAlloc/test4/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test4.c + test4.cpp ) add_executable(paltest_heaprealloc_test4 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/HeapReAlloc/test4/test4.c b/src/pal/tests/palsuite/filemapping_memmgt/HeapReAlloc/test4/test4.cpp index cebf904501..cebf904501 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/HeapReAlloc/test4/test4.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/HeapReAlloc/test4/test4.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/HeapReAlloc/test5/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/HeapReAlloc/test5/CMakeLists.txt index 3ab3ec16e8..ed3d390625 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/HeapReAlloc/test5/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/HeapReAlloc/test5/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test5.c + test5.cpp ) add_executable(paltest_heaprealloc_test5 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/HeapReAlloc/test5/test5.c b/src/pal/tests/palsuite/filemapping_memmgt/HeapReAlloc/test5/test5.cpp index 230e65e492..fcd38376ec 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/HeapReAlloc/test5/test5.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/HeapReAlloc/test5/test5.cpp @@ -37,7 +37,7 @@ int __cdecl main(int argc, char *argv[]) } /* Allocate 100 bytes on the heap */ - if((TheMemory = HeapAlloc(TheHeap, 0, 100)) == NULL) + if((TheMemory = (char*)HeapAlloc(TheHeap, 0, 100)) == NULL) { Fail("ERROR: HeapAlloc returned NULL when it was called. " "GetLastError() returned %d.",GetLastError()); @@ -47,7 +47,7 @@ int __cdecl main(int argc, char *argv[]) memset(TheMemory, 'X', 100); /* Reallocate the memory into 0 bytes */ - ReAllocMemory = HeapReAlloc(TheHeap, 0, TheMemory, 0); + ReAllocMemory = (char*)HeapReAlloc(TheHeap, 0, TheMemory, 0); if(ReAllocMemory == NULL) { @@ -56,7 +56,7 @@ int __cdecl main(int argc, char *argv[]) } /* Reallocate the memory we just put into 0 bytes, into 100 bytes. */ - ReAllocMemory2 = HeapReAlloc(TheHeap, 0, ReAllocMemory, 100); + ReAllocMemory2 = (char*)HeapReAlloc(TheHeap, 0, ReAllocMemory, 100); if(ReAllocMemory2 == NULL) { diff --git a/src/pal/tests/palsuite/filemapping_memmgt/LocalAlloc/test1/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/LocalAlloc/test1/CMakeLists.txt index c96e00a170..f74e442d76 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/LocalAlloc/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/LocalAlloc/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - LocalAlloc.c + LocalAlloc.cpp ) add_executable(paltest_localalloc_test1 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/LocalAlloc/test1/LocalAlloc.c b/src/pal/tests/palsuite/filemapping_memmgt/LocalAlloc/test1/LocalAlloc.cpp index 17afbc6020..17afbc6020 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/LocalAlloc/test1/LocalAlloc.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/LocalAlloc/test1/LocalAlloc.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/LocalFree/test1/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/LocalFree/test1/CMakeLists.txt index 47ad76ebe6..d92939c7cc 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/LocalFree/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/LocalFree/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - LocalFree.c + LocalFree.cpp ) add_executable(paltest_localfree_test1 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/LocalFree/test1/LocalFree.c b/src/pal/tests/palsuite/filemapping_memmgt/LocalFree/test1/LocalFree.cpp index d9c062e761..d9c062e761 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/LocalFree/test1/LocalFree.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/LocalFree/test1/LocalFree.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/LocalFree/test2/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/LocalFree/test2/CMakeLists.txt index ac7a11a05f..e087b08ad7 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/LocalFree/test2/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/LocalFree/test2/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - LocalFree.c + LocalFree.cpp ) add_executable(paltest_localfree_test2 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/LocalFree/test2/LocalFree.c b/src/pal/tests/palsuite/filemapping_memmgt/LocalFree/test2/LocalFree.cpp index 4d4567dc3f..4d4567dc3f 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/LocalFree/test2/LocalFree.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/LocalFree/test2/LocalFree.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test1/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test1/CMakeLists.txt index 0af09480ef..1d08065b2a 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(TESTSOURCES - test1.c + test1.cpp ) add_executable(paltest_lockfile_test1 @@ -20,7 +20,7 @@ target_link_libraries(paltest_lockfile_test1 set(HELPERSOURCES - helper.c + helper.cpp ) add_executable(paltest_lockfile_test1_helper diff --git a/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test1/helper.c b/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test1/helper.cpp index 05b4b8451a..05b4b8451a 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test1/helper.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test1/helper.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test1/test1.c b/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test1/test1.cpp index cee223ef81..cee223ef81 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test1/test1.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test1/test1.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test2/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test2/CMakeLists.txt index 157c517e62..ca5e5faed4 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test2/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test2/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test2.c + test2.cpp ) add_executable(paltest_lockfile_test2 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test2/test2.c b/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test2/test2.cpp index 8aef130ef4..8aef130ef4 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test2/test2.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test2/test2.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test3/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test3/CMakeLists.txt index 69516de69b..117c715084 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test3/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test3/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(TESTSOURCES - test3.c + test3.cpp ) add_executable(paltest_lockfile_test3 @@ -20,7 +20,7 @@ target_link_libraries(paltest_lockfile_test3 set(HELPERSOURCES - helper.c + helper.cpp ) add_executable(paltest_lockfile_test3_helper diff --git a/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test3/helper.c b/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test3/helper.cpp index 079417fce8..079417fce8 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test3/helper.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test3/helper.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test3/test3.c b/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test3/test3.cpp index 78662c5685..78662c5685 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test3/test3.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test3/test3.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test4/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test4/CMakeLists.txt index fb8f6745d4..aee1b1a0be 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test4/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test4/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test4.c + test4.cpp ) add_executable(paltest_lockfile_test4 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test4/test4.c b/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test4/test4.cpp index f5cd359fb5..f5cd359fb5 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test4/test4.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test4/test4.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test5/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test5/CMakeLists.txt index cc4548a6f0..70e3db4561 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test5/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test5/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(TESTSOURCES - test5.c + test5.cpp ) add_executable(paltest_lockfile_test5 @@ -20,7 +20,7 @@ target_link_libraries(paltest_lockfile_test5 set(HELPERSOURCES - helper.c + helper.cpp ) add_executable(paltest_lockfile_test5_helper diff --git a/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test5/helper.c b/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test5/helper.cpp index 1fc9b1a9a5..1fc9b1a9a5 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test5/helper.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test5/helper.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test5/test5.c b/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test5/test5.cpp index a02a3c5a49..a02a3c5a49 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test5/test5.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test5/test5.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test6/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test6/CMakeLists.txt index 5049977582..255ecbcc8d 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test6/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test6/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(TESTSOURCES - test6.c + test6.cpp ) add_executable(paltest_lockfile_test6 @@ -20,7 +20,7 @@ target_link_libraries(paltest_lockfile_test6 set(HELPERSOURCES - helper.c + helper.cpp ) add_executable(paltest_lockfile_test6_helper diff --git a/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test6/helper.c b/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test6/helper.cpp index 98112fc4a5..98112fc4a5 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test6/helper.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test6/helper.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test6/test6.c b/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test6/test6.cpp index ba01b9710a..ba01b9710a 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test6/test6.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test6/test6.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test7/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test7/CMakeLists.txt index e8434cc787..68a5b9f659 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test7/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test7/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test7.c + test7.cpp ) add_executable(paltest_lockfile_test7 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test7/test7.c b/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test7/test7.cpp index c572a6e653..c572a6e653 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test7/test7.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/LockFile/test7/test7.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test1/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test1/CMakeLists.txt index ef9838d41e..01679e5387 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - MapViewOfFile.c + MapViewOfFile.cpp ) add_executable(paltest_mapviewoffile_test1 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test1/MapViewOfFile.c b/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test1/MapViewOfFile.cpp index 6177e0decf..6177e0decf 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test1/MapViewOfFile.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test1/MapViewOfFile.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test2/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test2/CMakeLists.txt index 18a9d105b1..88f3344567 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test2/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test2/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - MapViewOfFile.c + MapViewOfFile.cpp ) add_executable(paltest_mapviewoffile_test2 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test2/MapViewOfFile.c b/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test2/MapViewOfFile.cpp index c08f585c0e..c08f585c0e 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test2/MapViewOfFile.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test2/MapViewOfFile.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test3/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test3/CMakeLists.txt index 76bd3276a4..e48ce13408 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test3/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test3/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - MapViewOfFile.c + MapViewOfFile.cpp ) add_executable(paltest_mapviewoffile_test3 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test3/MapViewOfFile.c b/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test3/MapViewOfFile.cpp index 63bee768f9..63bee768f9 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test3/MapViewOfFile.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test3/MapViewOfFile.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test4/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test4/CMakeLists.txt index 52381c510f..7f6d905212 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test4/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test4/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - mapviewoffile.c + mapviewoffile.cpp ) add_executable(paltest_mapviewoffile_test4 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test4/mapviewoffile.c b/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test4/mapviewoffile.cpp index 7f3252144b..7f3252144b 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test4/mapviewoffile.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test4/mapviewoffile.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test5/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test5/CMakeLists.txt index f98a4b7779..3911ffa53c 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test5/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test5/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - mapviewoffile.c + mapviewoffile.cpp ) add_executable(paltest_mapviewoffile_test5 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test5/mapviewoffile.c b/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test5/mapviewoffile.cpp index 219b3fa12a..219b3fa12a 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test5/mapviewoffile.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test5/mapviewoffile.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test6/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test6/CMakeLists.txt index dad03aaf80..8199981eec 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test6/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test6/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - mapviewoffile.c + mapviewoffile.cpp ) add_executable(paltest_mapviewoffile_test6 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test6/mapviewoffile.c b/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test6/mapviewoffile.cpp index f7d7302a4c..f7d7302a4c 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test6/mapviewoffile.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test6/mapviewoffile.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test1/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test1/CMakeLists.txt index b286924864..e4d87d5e0f 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - OpenFileMappingA.c + OpenFileMappingA.cpp ) add_executable(paltest_openfilemappinga_test1 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test1/OpenFileMappingA.c b/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test1/OpenFileMappingA.cpp index 9087285112..9087285112 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test1/OpenFileMappingA.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test1/OpenFileMappingA.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test2/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test2/CMakeLists.txt index 3a0eff04a7..670346fe3b 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test2/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test2/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - OpenFileMappingA.c + OpenFileMappingA.cpp ) add_executable(paltest_openfilemappinga_test2 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test2/OpenFileMappingA.c b/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test2/OpenFileMappingA.cpp index 5e41a92024..5e41a92024 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test2/OpenFileMappingA.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test2/OpenFileMappingA.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test3/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test3/CMakeLists.txt index 599a09ffc7..dab27b5c74 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test3/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test3/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - OpenFileMappingA.c + OpenFileMappingA.cpp ) add_executable(paltest_openfilemappinga_test3 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test3/OpenFileMappingA.c b/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test3/OpenFileMappingA.cpp index b01a3e8c0b..b01a3e8c0b 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test3/OpenFileMappingA.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingA/test3/OpenFileMappingA.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test1/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test1/CMakeLists.txt index 04e9e47ef0..b2f4494ad8 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - OpenFileMappingW.c + OpenFileMappingW.cpp ) add_executable(paltest_openfilemappingw_test1 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test1/OpenFileMappingW.c b/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test1/OpenFileMappingW.cpp index 079af4a5c0..079af4a5c0 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test1/OpenFileMappingW.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test1/OpenFileMappingW.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test2/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test2/CMakeLists.txt index 22e960b788..655fa753f2 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test2/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test2/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - OpenFileMappingW.c + OpenFileMappingW.cpp ) add_executable(paltest_openfilemappingw_test2 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test2/OpenFileMappingW.c b/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test2/OpenFileMappingW.cpp index e6a69651fa..e6a69651fa 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test2/OpenFileMappingW.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test2/OpenFileMappingW.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test3/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test3/CMakeLists.txt index 5a54368110..a7039a1c73 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test3/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test3/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - OpenFileMappingW.c + OpenFileMappingW.cpp ) add_executable(paltest_openfilemappingw_test3 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test3/OpenFileMappingW.c b/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test3/OpenFileMappingW.cpp index 9c83491f6b..9c83491f6b 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test3/OpenFileMappingW.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/OpenFileMappingW/test3/OpenFileMappingW.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/ReadProcessMemory/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/ProbeMemory/CMakeLists.txt index d2ae61f923..c6eddf74e8 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/ReadProcessMemory/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/ProbeMemory/CMakeLists.txt @@ -1,6 +1,5 @@ cmake_minimum_required(VERSION 2.8.12.2) -add_subdirectory(ReadProcessMemory_neg1) +add_subdirectory(ProbeMemory_neg1) add_subdirectory(test1) -add_subdirectory(test2) diff --git a/src/pal/tests/palsuite/filemapping_memmgt/ProbeMemory/ProbeMemory_neg1/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/ProbeMemory/ProbeMemory_neg1/CMakeLists.txt new file mode 100644 index 0000000000..e96c92e2ae --- /dev/null +++ b/src/pal/tests/palsuite/filemapping_memmgt/ProbeMemory/ProbeMemory_neg1/CMakeLists.txt @@ -0,0 +1,19 @@ +cmake_minimum_required(VERSION 2.8.12.2) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(SOURCES + ProbeMemory_neg.cpp +) + +add_executable(paltest_probememory_probememory_neg1 + ${SOURCES} +) + +add_dependencies(paltest_probememory_probememory_neg1 coreclrpal) + +target_link_libraries(paltest_probememory_probememory_neg1 + pthread + m + coreclrpal +) diff --git a/src/pal/tests/palsuite/filemapping_memmgt/ReadProcessMemory/ReadProcessMemory_neg1/ReadProcessMemory_neg.c b/src/pal/tests/palsuite/filemapping_memmgt/ProbeMemory/ProbeMemory_neg1/ProbeMemory_neg.cpp index aecd5ad576..80de809e14 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/ReadProcessMemory/ReadProcessMemory_neg1/ReadProcessMemory_neg.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/ProbeMemory/ProbeMemory_neg1/ProbeMemory_neg.cpp @@ -19,12 +19,7 @@ int __cdecl main(int argc, char *argv[]) { int err; BOOL bResult; - HANDLE ProcessHandle; - DWORD ProcessID; LPVOID lpProcessAddress = NULL; - char ProcessBuffer[REGIONSIZE]; - ULONG_PTR size = 0; - /*Initialize the PAL environment*/ err = PAL_Initialize(argc, argv); @@ -33,24 +28,6 @@ int __cdecl main(int argc, char *argv[]) return FAIL; } - /*retrieve the current process ID*/ - ProcessID = GetCurrentProcessId(); - - /*retrieve the current process handle*/ - ProcessHandle = OpenProcess( - PROCESS_ALL_ACCESS, - FALSE, /*not inherited*/ - ProcessID); - - if(NULL == ProcessHandle) - { - Fail("\nFailed to call OpenProcess API to retrieve " - "current process handle error code=%u\n", - GetLastError()); - } - - - /*allocate the virtual memory*/ lpProcessAddress = VirtualAlloc( NULL, /*system determine where to allocate the region*/ @@ -64,62 +41,53 @@ int __cdecl main(int argc, char *argv[]) "virtual memory, error code=%u\n", GetLastError()); } - /*zero the memory*/ - memset(ProcessBuffer, 0, REGIONSIZE); - /*try to retrieve the unreadable memory area*/ - bResult = ReadProcessMemory( - ProcessHandle, /*current process handle*/ + /*try to probe the unreadable memory area*/ + bResult = PAL_ProbeMemory( lpProcessAddress, /*base of memory area*/ - (LPVOID)ProcessBuffer, REGIONSIZE, /*buffer length in bytes*/ - &size); - + FALSE); /*read access*/ /*check the return value*/ - if(0 != bResult) + if(bResult) { - Trace("\nFailed to call ReadProcessMemory API for a negative test, " - "Try to read an unreadable memory area will cause fail " - "but it successes\n"); - - err = CloseHandle(ProcessHandle); - if(0 == err) - { - Trace("\nFailed to call CloseHandle API, error code=%u\n", - GetLastError()); - } + Trace("\nProbeMemory for read didn't FAILED\n"); /*decommit the specified region*/ err = VirtualFree(lpProcessAddress, REGIONSIZE, MEM_DECOMMIT); if(0 == err) { - Trace("\nFailed to call VirtualFree API, error code=%u\n", - GetLastError()); + Fail("\nFailed to call VirtualFree API, error code=%u\n", GetLastError()); } + Fail(""); } - err = CloseHandle(ProcessHandle); - if(0 == err) + /*try to probe the unwriteable memory area*/ + bResult = PAL_ProbeMemory( + lpProcessAddress, /*base of memory area*/ + REGIONSIZE, /*buffer length in bytes*/ + FALSE); /*write access */ + + /*check the return value*/ + if(bResult) { - Trace("\nFailed to call CloseHandle API, error code = %u\n", - GetLastError()); + Trace("\nProbeMemory for write didn't FAILED\n"); + /*decommit the specified region*/ err = VirtualFree(lpProcessAddress, REGIONSIZE, MEM_DECOMMIT); if(0 == err) { - Trace("\nFailed to call VirtualFree API, error code=%u\n", - GetLastError()); + Fail("\nFailed to call VirtualFree API, error code=%u\n", GetLastError()); } Fail(""); } + /*decommit the specified region*/ err = VirtualFree(lpProcessAddress, REGIONSIZE, MEM_DECOMMIT); if(0 == err) { - Fail("\nFailed to call VirtualFree API, error code=%u\n", - GetLastError()); + Fail("\nFailed to call VirtualFree API, error code=%u\n", GetLastError()); } PAL_Terminate(); diff --git a/src/pal/tests/palsuite/filemapping_memmgt/ReadProcessMemory/test1/testinfo.dat b/src/pal/tests/palsuite/filemapping_memmgt/ProbeMemory/ProbeMemory_neg1/testinfo.dat index c56920d206..4d11a71bdb 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/ReadProcessMemory/test1/testinfo.dat +++ b/src/pal/tests/palsuite/filemapping_memmgt/ProbeMemory/ProbeMemory_neg1/testinfo.dat @@ -4,9 +4,9 @@ Version = 1.0 Section = Filemapping_memmgt -Function = ReadProcessMemory -Name = Positive test for ReadProcessMemory API to read memory contents +Function = PAL_ProbeMemory +Name = Negative test PAL_ProbeMemory API to read unreadable memory area TYPE = DEFAULT -EXE1 = readprocessmemory +EXE1 = probememory_neg Description -=Test the ReadProcessMemory to read the memory contents +=Test the PAL_ProbeMemory to read unreadable memory area diff --git a/src/pal/tests/palsuite/filemapping_memmgt/ProbeMemory/test1/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/ProbeMemory/test1/CMakeLists.txt new file mode 100644 index 0000000000..739ba62284 --- /dev/null +++ b/src/pal/tests/palsuite/filemapping_memmgt/ProbeMemory/test1/CMakeLists.txt @@ -0,0 +1,19 @@ +cmake_minimum_required(VERSION 2.8.12.2) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(SOURCES + ProbeMemory.cpp +) + +add_executable(paltest_probememory_test1 + ${SOURCES} +) + +add_dependencies(paltest_probememory_test1 coreclrpal) + +target_link_libraries(paltest_probememory_test1 + pthread + m + coreclrpal +) diff --git a/src/pal/tests/palsuite/filemapping_memmgt/ReadProcessMemory/test1/ReadProcessMemory.c b/src/pal/tests/palsuite/filemapping_memmgt/ProbeMemory/test1/ProbeMemory.cpp index c9475f13f1..30b358d315 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/ReadProcessMemory/test1/ReadProcessMemory.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/ProbeMemory/test1/ProbeMemory.cpp @@ -20,12 +20,7 @@ int __cdecl main(int argc, char *argv[]) { int err; BOOL bResult; - HANDLE ProcessHandle; - DWORD ProcessID; LPVOID lpProcessAddress = NULL; - char ProcessBuffer[REGIONSIZE]; - ULONG_PTR size = 0; - /*Initialize the PAL environment*/ err = PAL_Initialize(argc, argv); @@ -34,28 +29,12 @@ int __cdecl main(int argc, char *argv[]) return FAIL; } - /*retrieve the current process ID*/ - ProcessID = GetCurrentProcessId(); - - /*retrieve the current process handle*/ - ProcessHandle = OpenProcess( - PROCESS_VM_READ,/*access flag*/ - FALSE, /*not inherited*/ - ProcessID); - - if(NULL == ProcessHandle) - { - Fail("\nFailed to call OpenProcess API to retrieve " - "current process handle error code=%u\n", - GetLastError()); - } - /*allocate the virtual memory*/ lpProcessAddress = VirtualAlloc( NULL, /*system determine where to allocate the region*/ REGIONSIZE, /*specify the size*/ MEM_COMMIT, /*allocation type*/ - PAGE_READONLY); /*access protection*/ + PAGE_READWRITE); /*access protection*/ if(NULL == lpProcessAddress) { @@ -63,51 +42,41 @@ int __cdecl main(int argc, char *argv[]) "virtual memory, error code=%u!\n", GetLastError()); } - /*zero the memory*/ - memset(ProcessBuffer, 0, REGIONSIZE); - - /*retrieve the memory contents*/ - bResult = ReadProcessMemory( - ProcessHandle, /*current process handle*/ + /*probe the memory for read*/ + bResult = PAL_ProbeMemory( lpProcessAddress, /*base of memory area*/ - (LPVOID)ProcessBuffer, REGIONSIZE, /*buffer length in bytes*/ - &size); + FALSE); /*read access*/ - if(!bResult || REGIONSIZE != size) + if(!bResult) { - Trace("\nFailed to call ReadProcessMemory API " - "to retrieve the memory contents, error code=%u\n", - GetLastError()); - - err = CloseHandle(ProcessHandle); - if(0 == err) - { - Trace("\nFailed to call CloseHandle API, error code=%u\n", - GetLastError()); - } + Trace("\nProbeMemory for read access FAILED\n"); /*decommit the specified region*/ err = VirtualFree(lpProcessAddress, REGIONSIZE, MEM_DECOMMIT); if(0 == err) { - Trace("\nFailed to call VirtualFree API, error code=%u\n", - GetLastError()); + Fail("\nFailed to call VirtualFree API, error code=%u\n", GetLastError()); } + Fail(""); } - err = CloseHandle(ProcessHandle); - if(0 == err) + /*probe the memory for write */ + bResult = PAL_ProbeMemory( + lpProcessAddress, /*base of memory area*/ + REGIONSIZE, /*buffer length in bytes*/ + TRUE); /*write access*/ + + if(!bResult) { - Trace("\nFailed to call CloseHandle API, error code = %u\n", - GetLastError()); + Trace("\nProbeMemory for write access FAILED\n"); + /*decommit the specified region*/ err = VirtualFree(lpProcessAddress, REGIONSIZE, MEM_DECOMMIT); if(0 == err) { - Trace("\nFailed to call VirtualFree API, error code=%u\n", - GetLastError()); + Fail("\nFailed to call VirtualFree API, error code=%u\n", GetLastError()); } Fail(""); @@ -117,8 +86,7 @@ int __cdecl main(int argc, char *argv[]) err = VirtualFree(lpProcessAddress, REGIONSIZE, MEM_DECOMMIT); if(0 == err) { - Fail("\nFailed to call VirtualFree API, error code=%u\n", - GetLastError()); + Fail("\nFailed to call VirtualFree API, error code=%u\n", GetLastError()); } PAL_Terminate(); diff --git a/src/pal/tests/palsuite/filemapping_memmgt/ReadProcessMemory/ReadProcessMemory_neg1/testinfo.dat b/src/pal/tests/palsuite/filemapping_memmgt/ProbeMemory/test1/testinfo.dat index 08c8f3291d..512b945c4a 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/ReadProcessMemory/ReadProcessMemory_neg1/testinfo.dat +++ b/src/pal/tests/palsuite/filemapping_memmgt/ProbeMemory/test1/testinfo.dat @@ -4,9 +4,9 @@ Version = 1.0 Section = Filemapping_memmgt -Function = ReadProcessMemory -Name = Negative test ReadProcessMemory API to read unreadable memory area +Function = PAL_ProbeMemory +Name = Positive test for PAL_ProbeMemory API to probe for read/write TYPE = DEFAULT -EXE1 = readprocessmemory_neg +EXE1 = probememory Description -=Test the ReadProcessMemory to read unreadable memory area +=Test the PAL_ProbeMemory to probe for read and write diff --git a/src/pal/tests/palsuite/filemapping_memmgt/ReadProcessMemory/ReadProcessMemory_neg1/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/ReadProcessMemory/ReadProcessMemory_neg1/CMakeLists.txt deleted file mode 100644 index 400c9219f6..0000000000 --- a/src/pal/tests/palsuite/filemapping_memmgt/ReadProcessMemory/ReadProcessMemory_neg1/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - ReadProcessMemory_neg.c -) - -add_executable(paltest_readprocessmemory_readprocessmemory_neg1 - ${SOURCES} -) - -add_dependencies(paltest_readprocessmemory_readprocessmemory_neg1 coreclrpal) - -target_link_libraries(paltest_readprocessmemory_readprocessmemory_neg1 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/filemapping_memmgt/ReadProcessMemory/test1/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/ReadProcessMemory/test1/CMakeLists.txt deleted file mode 100644 index 8c21f01562..0000000000 --- a/src/pal/tests/palsuite/filemapping_memmgt/ReadProcessMemory/test1/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - ReadProcessMemory.c -) - -add_executable(paltest_readprocessmemory_test1 - ${SOURCES} -) - -add_dependencies(paltest_readprocessmemory_test1 coreclrpal) - -target_link_libraries(paltest_readprocessmemory_test1 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/filemapping_memmgt/ReadProcessMemory/test2/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/ReadProcessMemory/test2/CMakeLists.txt deleted file mode 100644 index 9e0de95a0a..0000000000 --- a/src/pal/tests/palsuite/filemapping_memmgt/ReadProcessMemory/test2/CMakeLists.txt +++ /dev/null @@ -1,36 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(TESTSOURCES - test2.c -) - -add_executable(paltest_readprocessmemory_test2 - ${TESTSOURCES} -) - -add_dependencies(paltest_readprocessmemory_test2 coreclrpal) - -target_link_libraries(paltest_readprocessmemory_test2 - pthread - m - coreclrpal -) - - -set(HELPERSOURCES - helper.c -) - -add_executable(paltest_readprocessmemory_test2_helper - ${HELPERSOURCES} -) - -add_dependencies(paltest_readprocessmemory_test2_helper coreclrpal) - -target_link_libraries(paltest_readprocessmemory_test2_helper - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/filemapping_memmgt/ReadProcessMemory/test2/commonconsts.h b/src/pal/tests/palsuite/filemapping_memmgt/ReadProcessMemory/test2/commonconsts.h deleted file mode 100644 index 433d820f0f..0000000000 --- a/src/pal/tests/palsuite/filemapping_memmgt/ReadProcessMemory/test2/commonconsts.h +++ /dev/null @@ -1,48 +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: commonconsts.h -** -** -**============================================================*/ - -#ifndef _COMMONCONSTS_H_ -#define _COMMONCONSTS_H_ - -#include <pal.h> -#define REGIONSIZE 1024 - -const int TIMEOUT = 40000; - -const WCHAR szcToHelperEvName[] = { 'T', 'o', '\0' }; -const WCHAR szcFromHelperEvName[] = { 'F', 'r', 'o', 'm', '\0' }; - -const char initialValue = '-'; -const char nextValue = '|'; -const char guardValue = '*'; -const char *commsFileName = "AddrNLen.dat"; - - -/* PEDANTIC and PEDANTIC0 is a helper macro that just grumps about any - * zero return codes in a generic way. with little typing */ -#define PEDANTIC(function, parameters) \ -{ \ - if (! (function parameters) ) \ - { \ - Trace("%s: NonFatal failure of %s%s for reasons %u and %u\n", \ - __FILE__, #function, #parameters, GetLastError(), errno); \ - } \ -} -#define PEDANTIC1(function, parameters) \ -{ \ - if ( (function parameters) ) \ - { \ - Trace("%s: NonFatal failure of %s%s for reasons %u and %u\n", \ - __FILE__, #function, #parameters, GetLastError(), errno); \ - } \ -} - -#endif diff --git a/src/pal/tests/palsuite/filemapping_memmgt/ReadProcessMemory/test2/helper.c b/src/pal/tests/palsuite/filemapping_memmgt/ReadProcessMemory/test2/helper.c deleted file mode 100644 index 59e882fc1f..0000000000 --- a/src/pal/tests/palsuite/filemapping_memmgt/ReadProcessMemory/test2/helper.c +++ /dev/null @@ -1,249 +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: helper.c -** -** Purpose: This helper process sets up a several blocks of memory, -** then uses a file to tell its parent process where that memory is -** So it can do a WriteProcessMemory on it. When the parent process is done -** we check here that it was written properly. -** -** -**============================================================*/ - -#include "commonconsts.h" - -#include <palsuite.h> - -#if defined(BIT64) && defined(PLATFORM_UNIX) -#define LLFORMAT "%I64u" -#else -#define LLFORMAT "%u" -#endif - -struct allhandles_t -{ - HANDLE hEvToHelper; - HANDLE hEvFromHelper; - char *valuesFileName; -}; - - -/* function: wpmDoIt - * - * This is a general WriteProcessMemory testing function that sets up - * the RAM pointed to and tells the companion process on the other end - * of the handles in 'Comms' to attempt to alter 'lenDest' bytes at - * '*pDest'. - * - * '*pBuffer'[0..'lenBuffer'] is expected to be a guard region - * surrounding the '*pDest'[0..'lenDest'] region so that this function - * can verify that only the proper bytes were altered. - */ - -int wpmDoIt(struct allhandles_t Comms, - char * pBuffer, unsigned int lenBuffer, - char * pDest, unsigned int lenDest, - const char* storageDescription) -{ - char *pCurr; - FILE *commsFile; - DWORD dwRet; - - if (pBuffer > pDest || lenDest > lenBuffer) - { - Trace("WriteProcessMemory::DoIt() test implementation: " - "(pBuffer > pDest || lenDest > lenBuffer)\n"); - return FALSE; - } - - /* set up the storage */ - memset(pBuffer, guardValue, lenBuffer); - memset(pDest, initialValue, lenDest); - - /* tell the parent what RAM to adjust */ - if(!(commsFile = fopen(Comms.valuesFileName, "w"))) - { - Trace("WriteProcessMemory: fopen of '%S' failed (%u). \n", - Comms.valuesFileName, GetLastError()); - return FALSE; - } - if (!fprintf(commsFile, LLFORMAT " " LLFORMAT " '%s'\n", - pDest, lenDest, storageDescription)) - { - Trace("WriteProcessMemory: fprintf to '%S' failed (%u). \n", - Comms.valuesFileName, GetLastError()); - return FALSE; - } - PEDANTIC1(fclose, (commsFile)); - - /* Tell the parent the data is ready for it to adjust */ - PEDANTIC(ResetEvent, (Comms.hEvToHelper)); - PEDANTIC(SetEvent, (Comms.hEvFromHelper)); - - dwRet = WaitForSingleObject(Comms.hEvToHelper, TIMEOUT); /* parent is done */ - if (dwRet != WAIT_OBJECT_0) - { - Trace("helper WaitForSingleObjectTest: WaitForSingleObject " - "failed (%u)\n", GetLastError()); - return FALSE; - } - - /* check the stuff that SHOULD have changed */ - for (pCurr = pDest; pCurr < (pDest + lenDest); pCurr++) - { - if ( *pCurr != nextValue) - { - Trace("When testing '%s': alteration test failed " - "at " LLFORMAT " offset " LLFORMAT " Found '%c' instead of '%c'\n.", - storageDescription, pDest, pCurr - pDest, *pCurr, nextValue); - Trace(" 'Altered' string: '%.*s'\n",lenBuffer, pBuffer); - return FALSE; - } - } - /* check the stuff that should NOT have changed */ - for (pCurr = pBuffer; pCurr < pDest; pCurr++ ) - { - if ( *pCurr != guardValue) - { - Trace("When testing '%s': leading guard zone test failed " - "at " LLFORMAT " offset " LLFORMAT ". Found '%c' instead of '%c'\n.", - storageDescription, pDest, pCurr - pBuffer, *pCurr, guardValue); - Trace(" 'Altered' string: '%.*s'\n",lenBuffer, pBuffer); - return FALSE; - } - } - for (pCurr = pDest + lenDest; pCurr < (pBuffer + lenBuffer); pCurr++ ) - { - if ( *pCurr != guardValue) - { - Trace("When testing '%s': trailing guard zone test failed " - "at " LLFORMAT " offset " LLFORMAT ". Found '%c' instead of '%c'\n.", - storageDescription, pDest + lenDest, pCurr - pBuffer, *pCurr, guardValue); - Trace(" 'Altered' string: '%.*s'\n",lenBuffer, pBuffer); - return FALSE; - } - } - - return TRUE; -} - -int __cdecl main(int argc, char *argv[]) -{ - - BOOL success = TRUE; /* assume success */ - struct allhandles_t Comms = {0,0,0} ; - - /* variables to track storage to alter */ - char *pTarget = NULL; - unsigned int sizeTarget; - - if(0 != (PAL_Initialize(argc, argv))) - { - return FAIL; - } - - /* hook up with the events created by the parent */ - Comms.hEvToHelper = OpenEventW(EVENT_ALL_ACCESS, 0, szcToHelperEvName); - if (!Comms.hEvToHelper) - { - Fail("WriteProcessMemory: OpenEvent of '%S' failed (%u). " - "(the event should already exist!)\n", - szcToHelperEvName, GetLastError()); - } - Comms.hEvFromHelper = OpenEventW(EVENT_ALL_ACCESS, 0, szcFromHelperEvName); - if (!Comms.hEvToHelper) - { - Trace("WriteProcessMemory: OpenEvent of '%S' failed (%u). " - "(the event should already exist!)\n", - szcFromHelperEvName, GetLastError()); - success = FALSE; - goto EXIT; - } - Comms.valuesFileName = argv[1]; - - { - char autoAllocatedOnStack[51]; - - /* Get the parent process to write to the local stack */ - success &= wpmDoIt(Comms, autoAllocatedOnStack, - sizeof(autoAllocatedOnStack), - autoAllocatedOnStack + sizeof(int), - sizeof(autoAllocatedOnStack) - 2 * sizeof(int), - "const size array on stack with int sized guards"); - } - - /* Get the parent process to write to stuff on the heap */ - sizeTarget = 2 * sizeof(int) + 23 ; /* 23 is just a random prime > 16 */ - if (!(pTarget = malloc(sizeTarget))) - { - Trace("WriteProcessMemory helper: unable to allocate '%s'->%d bytes of memory" - "(%u).\n", - argv[3], sizeTarget, GetLastError()); - success = FALSE; - goto EXIT; - - } - success &= wpmDoIt(Comms, pTarget, sizeTarget, - pTarget + sizeof(int), - sizeTarget - 2 * sizeof(int), - "array on heap with int sized guards"); - - /* just to be nice try something 16 - 2 * sizeof(int) bytes long */ - { - char autoAllocatedOnStack[16]; - - /* Get the parent process to write to the local stack */ - success &= wpmDoIt(Comms, autoAllocatedOnStack, - sizeof(autoAllocatedOnStack), - autoAllocatedOnStack + sizeof(int), - sizeof(autoAllocatedOnStack) - 2 * sizeof(int), - "another 16 byte array on stack with int sized guards inside"); - } - - /* NOTE: Don't try 0 bytes long. Win32 WriteProcessMemory claims - * it writes 8 bytes in that case! */ - - /* and 1 byte long... */ - { - char autoAllocatedOnStack[1+ 2 * sizeof(int)]; - - /* Get the parent process to write to the local stack */ - success &= wpmDoIt(Comms, autoAllocatedOnStack, - sizeof(autoAllocatedOnStack), - autoAllocatedOnStack + sizeof(int), - 1, - "no bytes with int sized guards outside on stack"); - } - - -EXIT: - /* Tell the parent that we are done */ - if (!DeleteFile(Comms.valuesFileName)) - { - Trace("helper: DeleteFile failed so parent (test1) is unlikely " - "to exit cleanly\n"); - } - PEDANTIC(ResetEvent, (Comms.hEvToHelper)); - if (!SetEvent(Comms.hEvFromHelper)) - { - Trace("helper: SetEvent failed so parent (test1) is unlikely " - "to exit cleanly\n"); - } - - free(pTarget); - PEDANTIC(CloseHandle, (Comms.hEvToHelper)); - PEDANTIC(CloseHandle, (Comms.hEvFromHelper)); - - if (!success) - { - Fail(""); - } - - PAL_Terminate(); - - return success ? PASS : FAIL; -} diff --git a/src/pal/tests/palsuite/filemapping_memmgt/ReadProcessMemory/test2/test2.c b/src/pal/tests/palsuite/filemapping_memmgt/ReadProcessMemory/test2/test2.c deleted file mode 100644 index eda40599ce..0000000000 --- a/src/pal/tests/palsuite/filemapping_memmgt/ReadProcessMemory/test2/test2.c +++ /dev/null @@ -1,258 +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: test2.c -** -** Purpose: Create a child process and some events for communications with it. -** When the child gets back to us with a memory location and a length, -** Call WriteProcessMemory on this location and check to see that it -** writes successfully. Then call ReadProcessMemory to check if the -** contents read are same as those written -** -** -**============================================================*/ - -#define UNICODE - -#include "commonconsts.h" - -#include <palsuite.h> - -#if defined(BIT64) && defined(PLATFORM_UNIX) -#define LLFORMAT "%I64u" -#else -#define LLFORMAT "%u" -#endif - -int __cdecl main(int argc, char *argv[]) -{ - - PROCESS_INFORMATION pi; - STARTUPINFO si; - HANDLE hEvToHelper; - HANDLE hEvFromHelper; - DWORD dwExitCode; - - DWORD dwRet; - char cmdComposeBuf[MAX_PATH]; - PWCHAR uniString; - - if(0 != (PAL_Initialize(argc, argv))) - { - return FAIL; - } - - /* Create the signals we need for cross process communication */ - hEvToHelper = CreateEvent(NULL, TRUE, FALSE, szcToHelperEvName); - if (!hEvToHelper) - { - Fail("WriteProcessMemory: CreateEvent of '%S' failed. " - "GetLastError() returned %d.\n", szcToHelperEvName, - GetLastError()); - } - if (GetLastError() == ERROR_ALREADY_EXISTS) - { - Fail("WriteProcessMemory: CreateEvent of '%S' failed. " - "(already exists!)\n", szcToHelperEvName); - } - hEvFromHelper = CreateEvent(NULL, TRUE, FALSE, szcFromHelperEvName); - if (!hEvToHelper) - { - Fail("WriteProcessMemory: CreateEvent of '%S' failed. " - "GetLastError() returned %d.\n", szcFromHelperEvName, - GetLastError()); - } - if (GetLastError() == ERROR_ALREADY_EXISTS) - { - Fail("WriteProcessMemory: CreateEvent of '%S' failed. " - "(already exists!)\n", szcFromHelperEvName); - } - ResetEvent(hEvFromHelper); - ResetEvent(hEvToHelper); - - if (!sprintf(cmdComposeBuf, "helper %s", commsFileName)) - { - Fail("Could not convert command line\n"); - } - uniString = convert(cmdComposeBuf); - - ZeroMemory( &si, sizeof(si) ); - si.cb = sizeof(si); - ZeroMemory( &pi, sizeof(pi) ); - - /* Create a new process. This is the process that will ask for - * memory munging */ - if(!CreateProcess( NULL, uniString, NULL, NULL, - FALSE, 0, NULL, NULL, &si, &pi)) - { - Trace("ERROR: CreateProcess failed to load executable '%S'. " - "GetLastError() returned %u.\n", - uniString, GetLastError()); - free(uniString); - Fail(""); - } - free(uniString); - - - while(1) - { - FILE *commsFile; - char* pSrcMemory; - char* pDestMemory; - SIZE_T Count; - SIZE_T wpmCount; - char incomingCMDBuffer[MAX_PATH + 1]; - - int err; - HANDLE readProcessHandle; - DWORD readProcessID; - char readProcessBuffer[REGIONSIZE]; // size 1024 - BOOL bResult; - size_t size = 0; - - readProcessID = pi.dwProcessId; - - /* wait until the helper tells us that it has given us - * something to do */ - dwRet = WaitForSingleObject(hEvFromHelper, TIMEOUT); - if (dwRet != WAIT_OBJECT_0) - { - Trace("test1 WaitForSingleObjectTest: WaitForSingleObject " - "failed (%u)\n", GetLastError()); - break; /* no more work incoming */ - } - - /* get the parameters to test WriteProcessMemory with */ - if (!(commsFile = fopen(commsFileName, "r"))) - { - /* no file means there is no more work */ - break; - } - if ( NULL == fgets(incomingCMDBuffer, MAX_PATH, commsFile)) - { - Fail ("unable to read from communication file %s " - "for reasons %u & %u\n", - errno, GetLastError()); - } - PEDANTIC1(fclose,(commsFile)); - sscanf(incomingCMDBuffer, LLFORMAT " " LLFORMAT, &pDestMemory, &Count); - if (argc > 1) - { - Trace("Preparing to write to " LLFORMAT " bytes @ " LLFORMAT "('%s')\n", - Count, pDestMemory, incomingCMDBuffer); - } - - /* compose some data to write to the client process */ - if (!(pSrcMemory = malloc(Count))) - { - Trace("could not dynamically allocate memory to copy from " - "for reasons %u & %u\n", - errno, GetLastError()); - goto doneIteration; - } - memset(pSrcMemory, nextValue, Count); - Trace("Preparing to write to " LLFORMAT " bytes @ " LLFORMAT " ('%s')[%u]\n", - Count, pDestMemory, incomingCMDBuffer, pSrcMemory); - - /* do the work */ - dwRet = WriteProcessMemory(pi.hProcess, - pDestMemory, - pSrcMemory, - Count, - &wpmCount); - - if (!dwRet) - { - Trace("%s: Problem: on a write to "LLFORMAT " bytes @ " LLFORMAT " ('%s')\n", - argv[0], Count, pDestMemory, incomingCMDBuffer); - Trace("test1 WriteProcessMemory returned a (!=0) (GLE=%u)\n", - GetLastError()); - } - if(Count != wpmCount) - { - Trace("%s: Problem: on a write to " LLFORMAT " bytes @ " LLFORMAT " ('%s')\n", - argv[0], Count, pDestMemory, incomingCMDBuffer); - Trace("The number of bytes written should have been " - LLFORMAT ", but was reported as " LLFORMAT " \n", Count, wpmCount); - } - - readProcessHandle = OpenProcess( - PROCESS_VM_READ, - FALSE, - readProcessID); - - if(NULL == readProcessHandle) - { - Fail("\nFailed to call OpenProcess API to retrieve " - "current process handle error code=%u\n", - GetLastError()); - } - - /*zero the memory*/ - memset(readProcessBuffer, 0, size); - - /*retrieve the memory contents*/ - bResult = ReadProcessMemory( - readProcessHandle, /*current process handle*/ - pDestMemory, /*base of memory area*/ - (LPVOID)readProcessBuffer, - Count, /*buffer length in bytes*/ - &size); - - - if( !bResult || (Count != size) ) - { - Trace("\nFailed to call ReadProcessMemory API " - "to retrieve the memory contents, error code=%u; Bresult[%u] Count[" LLFORMAT "], Size[%d]\n", - GetLastError(), bResult, Count, size); - - err = CloseHandle(readProcessHandle); - - if(0 == err) - { - Trace("\nFailed to call CloseHandle API, error code=%u\n", - GetLastError()); - } - dwExitCode = FAIL; - } - - if( !memcmp (pDestMemory, readProcessBuffer, Count ) ) - { - Trace("Difference in memory contents, expected [%s], but received [%s]\n", pDestMemory, readProcessBuffer); - dwExitCode = FAIL; - } - - Trace("ReadProcessBuffer contains [%s]\n", readProcessBuffer); - err = CloseHandle(readProcessHandle); - - free(pSrcMemory); - - doneIteration: - PEDANTIC(ResetEvent, (hEvFromHelper)); - PEDANTIC(SetEvent, (hEvToHelper)); - } - - /* wait for the child process to complete */ - WaitForSingleObject ( pi.hProcess, TIMEOUT ); - /* this may return a failure code on a success path */ - - /* check the exit code from the process */ - if( ! GetExitCodeProcess( pi.hProcess, &dwExitCode ) ) - { - Trace( "GetExitCodeProcess call failed with error code %u\n", - GetLastError() ); - dwExitCode = FAIL; - } - - - PEDANTIC(CloseHandle, (hEvToHelper)); - PEDANTIC(CloseHandle, (hEvFromHelper)); - PEDANTIC(CloseHandle, (pi.hThread)); - PEDANTIC(CloseHandle, (pi.hProcess)); - - PAL_TerminateEx(dwExitCode); - return dwExitCode; -} diff --git a/src/pal/tests/palsuite/filemapping_memmgt/ReadProcessMemory/test2/testinfo.dat b/src/pal/tests/palsuite/filemapping_memmgt/ReadProcessMemory/test2/testinfo.dat deleted file mode 100644 index 58a9935a08..0000000000 --- a/src/pal/tests/palsuite/filemapping_memmgt/ReadProcessMemory/test2/testinfo.dat +++ /dev/null @@ -1,18 +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 = Debug -Function = ReadProcessMemory -Name = Check that writing/reading text to/from process memory succeeds. -TYPE = DEFAULT -EXE1 = test2 -EXE2 = helper -Description -= Create a child process and attempt to write to its memory -= at the places and lengths it specifies via a data file. -= the child verifies that all the specified memory was altered -= with no overruns. Parent then tries to read memory from child -= and does memory compare to ensure it read memory contents -= correctly diff --git a/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test1/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test1/CMakeLists.txt index 987c413d03..8aa1c80368 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test1.c + test1.cpp ) add_executable(paltest_rtlmovememory_test1 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test1/test1.c b/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test1/test1.cpp index 7fc56510d8..7fc56510d8 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test1/test1.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test1/test1.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test3/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test3/CMakeLists.txt index 14098a8dc1..d292cff494 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test3/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test3/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test3.c + test3.cpp ) add_executable(paltest_rtlmovememory_test3 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test3/test3.c b/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test3/test3.cpp index 279c0c1199..279c0c1199 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test3/test3.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test3/test3.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test4/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test4/CMakeLists.txt index 00aec7e8f7..e8aeb0c0b3 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test4/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test4/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test4.c + test4.cpp ) add_executable(paltest_rtlmovememory_test4 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test4/test4.c b/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test4/test4.cpp index b6e1ecd6f7..b6e1ecd6f7 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test4/test4.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test4/test4.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test5/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test5/CMakeLists.txt index f2de78216e..7f4986eb27 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test5/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test5/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test5.c + test5.cpp ) add_executable(paltest_rtlmovememory_test5 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test5/test5.c b/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test5/test5.cpp index affcb0abc9..affcb0abc9 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test5/test5.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/RtlMoveMemory/test5/test5.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/UnlockFile/test1/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/UnlockFile/test1/CMakeLists.txt index 0e6d6fef4c..8ed46bae43 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/UnlockFile/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/UnlockFile/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(TESTSOURCES - test1.c + test1.cpp ) add_executable(paltest_unlockfile_test1 @@ -20,7 +20,7 @@ target_link_libraries(paltest_unlockfile_test1 set(HELPERSOURCES - helper.c + helper.cpp ) add_executable(paltest_unlockfile_test1_helper diff --git a/src/pal/tests/palsuite/filemapping_memmgt/UnlockFile/test1/helper.c b/src/pal/tests/palsuite/filemapping_memmgt/UnlockFile/test1/helper.cpp index c2ef5a6736..c2ef5a6736 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/UnlockFile/test1/helper.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/UnlockFile/test1/helper.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/UnlockFile/test1/test1.c b/src/pal/tests/palsuite/filemapping_memmgt/UnlockFile/test1/test1.cpp index 14634c7f7a..14634c7f7a 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/UnlockFile/test1/test1.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/UnlockFile/test1/test1.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/UnlockFile/test2/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/UnlockFile/test2/CMakeLists.txt index 142b2763cb..3033876f80 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/UnlockFile/test2/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/UnlockFile/test2/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test2.c + test2.cpp ) add_executable(paltest_unlockfile_test2 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/UnlockFile/test2/test2.c b/src/pal/tests/palsuite/filemapping_memmgt/UnlockFile/test2/test2.cpp index 22c2cce2fb..22c2cce2fb 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/UnlockFile/test2/test2.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/UnlockFile/test2/test2.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/UnlockFile/test3/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/UnlockFile/test3/CMakeLists.txt index b4ec37c88c..d46d7db344 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/UnlockFile/test3/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/UnlockFile/test3/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(TESTSOURCES - test3.c + test3.cpp ) add_executable(paltest_unlockfile_test3 @@ -20,7 +20,7 @@ target_link_libraries(paltest_unlockfile_test3 set(HELPERSOURCES - helper.c + helper.cpp ) add_executable(paltest_unlockfile_test3_helper diff --git a/src/pal/tests/palsuite/filemapping_memmgt/UnlockFile/test3/helper.c b/src/pal/tests/palsuite/filemapping_memmgt/UnlockFile/test3/helper.cpp index 650abf49ad..650abf49ad 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/UnlockFile/test3/helper.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/UnlockFile/test3/helper.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/UnlockFile/test3/test3.c b/src/pal/tests/palsuite/filemapping_memmgt/UnlockFile/test3/test3.cpp index cf27aba0a3..cf27aba0a3 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/UnlockFile/test3/test3.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/UnlockFile/test3/test3.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/UnlockFile/test4/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/UnlockFile/test4/CMakeLists.txt index d6bee307c2..635a1ca07c 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/UnlockFile/test4/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/UnlockFile/test4/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test4.c + test4.cpp ) add_executable(paltest_unlockfile_test4 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/UnlockFile/test4/test4.c b/src/pal/tests/palsuite/filemapping_memmgt/UnlockFile/test4/test4.cpp index 55abcd24bc..55abcd24bc 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/UnlockFile/test4/test4.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/UnlockFile/test4/test4.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/UnmapViewOfFile/test1/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/UnmapViewOfFile/test1/CMakeLists.txt index 5ebda77ba6..1b8062ff9c 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/UnmapViewOfFile/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/UnmapViewOfFile/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - UnmapViewOfFile.c + UnmapViewOfFile.cpp ) add_executable(paltest_unmapviewoffile_test1 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/UnmapViewOfFile/test1/UnmapViewOfFile.c b/src/pal/tests/palsuite/filemapping_memmgt/UnmapViewOfFile/test1/UnmapViewOfFile.cpp index a970ccc3b5..a970ccc3b5 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/UnmapViewOfFile/test1/UnmapViewOfFile.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/UnmapViewOfFile/test1/UnmapViewOfFile.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/UnmapViewOfFile/test2/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/UnmapViewOfFile/test2/CMakeLists.txt index 5c12cf9825..750e446a17 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/UnmapViewOfFile/test2/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/UnmapViewOfFile/test2/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - unmapviewoffile.c + unmapviewoffile.cpp ) add_executable(paltest_unmapviewoffile_test2 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/UnmapViewOfFile/test2/unmapviewoffile.c b/src/pal/tests/palsuite/filemapping_memmgt/UnmapViewOfFile/test2/unmapviewoffile.cpp index 2ca185d234..2ca185d234 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/UnmapViewOfFile/test2/unmapviewoffile.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/UnmapViewOfFile/test2/unmapviewoffile.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/CMakeLists.txt index eafaa66856..b2cafde93a 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/CMakeLists.txt @@ -14,6 +14,7 @@ add_subdirectory(test19) add_subdirectory(test2) add_subdirectory(test20) add_subdirectory(test21) +add_subdirectory(test22) add_subdirectory(test3) add_subdirectory(test4) add_subdirectory(test5) diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test1/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test1/CMakeLists.txt index 90ba41bd79..f8c0645a4b 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - VirtualAlloc.c + VirtualAlloc.cpp ) add_executable(paltest_virtualalloc_test1 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test1/VirtualAlloc.c b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test1/VirtualAlloc.cpp index 26ee942ba1..26ee942ba1 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test1/VirtualAlloc.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test1/VirtualAlloc.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test10/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test10/CMakeLists.txt index 51b0e1d92e..1b66f0d7cb 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test10/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test10/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - VirtualAlloc.c + VirtualAlloc.cpp ) add_executable(paltest_virtualalloc_test10 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test10/VirtualAlloc.c b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test10/VirtualAlloc.cpp index ac06b9b5c8..ac06b9b5c8 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test10/VirtualAlloc.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test10/VirtualAlloc.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test11/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test11/CMakeLists.txt index adff47087b..95e1a06f55 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test11/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test11/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - VirtualAlloc.c + VirtualAlloc.cpp ) add_executable(paltest_virtualalloc_test11 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test11/VirtualAlloc.c b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test11/VirtualAlloc.cpp index a3df39b634..a3df39b634 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test11/VirtualAlloc.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test11/VirtualAlloc.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test12/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test12/CMakeLists.txt index 26f303573e..7564f960fe 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test12/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test12/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - VirtualAlloc.c + VirtualAlloc.cpp ) add_executable(paltest_virtualalloc_test12 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test12/VirtualAlloc.c b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test12/VirtualAlloc.cpp index 8b3508635f..8b3508635f 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test12/VirtualAlloc.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test12/VirtualAlloc.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test13/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test13/CMakeLists.txt index f85cbdc694..a49dcfc81d 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test13/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test13/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - VirtualAlloc.c + VirtualAlloc.cpp ) add_executable(paltest_virtualalloc_test13 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test13/VirtualAlloc.c b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test13/VirtualAlloc.cpp index d2109c0339..d2109c0339 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test13/VirtualAlloc.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test13/VirtualAlloc.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test14/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test14/CMakeLists.txt index 41ed0ca208..180a48e74d 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test14/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test14/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - VirtualAlloc.c + VirtualAlloc.cpp ) add_executable(paltest_virtualalloc_test14 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test14/VirtualAlloc.c b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test14/VirtualAlloc.cpp index 49bd21875e..49bd21875e 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test14/VirtualAlloc.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test14/VirtualAlloc.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test15/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test15/CMakeLists.txt index 87b29108b2..4ba219472e 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test15/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test15/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - VirtualAlloc.c + VirtualAlloc.cpp ) add_executable(paltest_virtualalloc_test15 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test15/VirtualAlloc.c b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test15/VirtualAlloc.cpp index 3cf1502f26..3cf1502f26 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test15/VirtualAlloc.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test15/VirtualAlloc.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test16/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test16/CMakeLists.txt index 90e3f3bdb2..1c5f63dce5 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test16/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test16/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - VirtualAlloc.c + VirtualAlloc.cpp ) add_executable(paltest_virtualalloc_test16 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test16/VirtualAlloc.c b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test16/VirtualAlloc.cpp index ce61b9aa39..ce61b9aa39 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test16/VirtualAlloc.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test16/VirtualAlloc.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test17/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test17/CMakeLists.txt index 461b48ccc0..6523bb9292 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test17/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test17/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - VirtualAlloc.c + VirtualAlloc.cpp ) add_executable(paltest_virtualalloc_test17 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test17/VirtualAlloc.c b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test17/VirtualAlloc.cpp index eb609f14e4..eb609f14e4 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test17/VirtualAlloc.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test17/VirtualAlloc.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test18/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test18/CMakeLists.txt index 69823be14b..3fe65b4ac8 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test18/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test18/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - VirtualAlloc.c + VirtualAlloc.cpp ) add_executable(paltest_virtualalloc_test18 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test18/VirtualAlloc.c b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test18/VirtualAlloc.cpp index e46da851db..e46da851db 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test18/VirtualAlloc.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test18/VirtualAlloc.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test19/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test19/CMakeLists.txt index fa65b4fa46..1795b8ba54 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test19/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test19/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - VirtualAlloc.c + VirtualAlloc.cpp ) add_executable(paltest_virtualalloc_test19 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test19/VirtualAlloc.c b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test19/VirtualAlloc.cpp index 5cbe48b15e..5cbe48b15e 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test19/VirtualAlloc.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test19/VirtualAlloc.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test2/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test2/CMakeLists.txt index 1753b1edc5..20da178bfc 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test2/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test2/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - VirtualAlloc.c + VirtualAlloc.cpp ) add_executable(paltest_virtualalloc_test2 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test2/VirtualAlloc.c b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test2/VirtualAlloc.cpp index 99cf76a523..99cf76a523 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test2/VirtualAlloc.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test2/VirtualAlloc.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test20/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test20/CMakeLists.txt index 2c55071149..5c23fe2b0d 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test20/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test20/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - virtualalloc.c + virtualalloc.cpp ) add_executable(paltest_virtualalloc_test20 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test20/virtualalloc.c b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test20/virtualalloc.cpp index 7aec3c7f55..7aec3c7f55 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test20/virtualalloc.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test20/virtualalloc.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test21/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test21/CMakeLists.txt index f97c32af75..96a3144e8a 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test21/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test21/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - virtualalloc.c + virtualalloc.cpp ) add_executable(paltest_virtualalloc_test21 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test21/virtualalloc.c b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test21/virtualalloc.cpp index 065a2ff5c8..065a2ff5c8 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test21/virtualalloc.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test21/virtualalloc.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test22/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test22/CMakeLists.txt new file mode 100644 index 0000000000..cdad2ca19d --- /dev/null +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test22/CMakeLists.txt @@ -0,0 +1,19 @@ +cmake_minimum_required(VERSION 2.8.12.2) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(SOURCES + VirtualAlloc.cpp +) + +add_executable(paltest_virtualalloc_test22 + ${SOURCES} +) + +add_dependencies(paltest_virtualalloc_test22 coreclrpal) + +target_link_libraries(paltest_virtualalloc_test22 + pthread + m + coreclrpal +) diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test22/VirtualAlloc.cpp b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test22/VirtualAlloc.cpp new file mode 100644 index 0000000000..489926f48d --- /dev/null +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test22/VirtualAlloc.cpp @@ -0,0 +1,44 @@ +// 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: virtualalloc.c +** +** Purpose: Negative test the VirtualAlloc API. +** Call VirtualAlloc with MEM_COMMIT allocation type +** and PAGE_READWRITE access protection + +** +**============================================================*/ +#include <palsuite.h> + +int __cdecl main(int argc, char *argv[]) +{ + int err; + LPVOID lpVirtualAddress; + + + //Initialize the PAL environment + err = PAL_Initialize(argc, argv); + if(0 != err) + { + ExitProcess(FAIL); + } + + //Allocate the physical storage in memory or in the paging file on disk + lpVirtualAddress = VirtualAlloc(NULL,//system determine where to allocate the region + (SIZE_T)(2147483647000000), //specify the size to be int32.maxvalue mega bytes + MEM_COMMIT, //allocation type + PAGE_READWRITE); //access protection + if(NULL != lpVirtualAddress) + { + Fail("\nWelcome to the Future, where Unlimited Memory is Available, disregard this test!\n"); + } + + + + PAL_Terminate(); + return PASS; +} diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test22/testinfo.dat b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test22/testinfo.dat new file mode 100644 index 0000000000..3d5962c7af --- /dev/null +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test22/testinfo.dat @@ -0,0 +1,13 @@ +# 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 = Filemapping_memmgt +Function = VirtualAlloc +Name = Negative test for VirtualAlloc API +TYPE = DEFAULT +EXE1 = virtualalloc +Description +=Test the VirtualAlloc with MEM_COMMIT allocation type +=and PAGE_READWRITEaccess protection diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test3/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test3/CMakeLists.txt index 035594bd79..77822f7862 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test3/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test3/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - VirtualAlloc.c + VirtualAlloc.cpp ) add_executable(paltest_virtualalloc_test3 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test3/VirtualAlloc.c b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test3/VirtualAlloc.cpp index 5c57ec337f..5c57ec337f 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test3/VirtualAlloc.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test3/VirtualAlloc.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test4/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test4/CMakeLists.txt index 5ce80bf52f..0e2c448659 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test4/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test4/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - VirtualAlloc.c + VirtualAlloc.cpp ) add_executable(paltest_virtualalloc_test4 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test4/VirtualAlloc.c b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test4/VirtualAlloc.cpp index c134a14eb1..c134a14eb1 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test4/VirtualAlloc.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test4/VirtualAlloc.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test5/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test5/CMakeLists.txt index 138d9c9727..247053ff0f 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test5/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test5/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - VirtualAlloc.c + VirtualAlloc.cpp ) add_executable(paltest_virtualalloc_test5 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test5/VirtualAlloc.c b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test5/VirtualAlloc.cpp index 8c4f9dcdb6..8c4f9dcdb6 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test5/VirtualAlloc.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test5/VirtualAlloc.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test6/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test6/CMakeLists.txt index c61add9db4..d19391d294 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test6/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test6/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - VirtualAlloc.c + VirtualAlloc.cpp ) add_executable(paltest_virtualalloc_test6 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test6/VirtualAlloc.c b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test6/VirtualAlloc.cpp index e9c33d86df..e9c33d86df 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test6/VirtualAlloc.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test6/VirtualAlloc.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test7/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test7/CMakeLists.txt index b5452a0c48..8c01e041de 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test7/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test7/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - VirtualAlloc.c + VirtualAlloc.cpp ) add_executable(paltest_virtualalloc_test7 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test7/VirtualAlloc.c b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test7/VirtualAlloc.cpp index bee2735c9f..bee2735c9f 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test7/VirtualAlloc.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test7/VirtualAlloc.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test8/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test8/CMakeLists.txt index 584a0c505a..db2a7447be 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test8/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test8/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - VirtualAlloc.c + VirtualAlloc.cpp ) add_executable(paltest_virtualalloc_test8 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test8/VirtualAlloc.c b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test8/VirtualAlloc.cpp index d548e0c8db..d548e0c8db 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test8/VirtualAlloc.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test8/VirtualAlloc.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test9/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test9/CMakeLists.txt index aee950b2e4..254fc6fcf2 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test9/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test9/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - VirtualAlloc.c + VirtualAlloc.cpp ) add_executable(paltest_virtualalloc_test9 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test9/VirtualAlloc.c b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test9/VirtualAlloc.cpp index 2711addacc..2711addacc 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test9/VirtualAlloc.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualAlloc/test9/VirtualAlloc.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test1/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test1/CMakeLists.txt index 1914f76fe6..d2319506f2 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - VirtualFree.c + VirtualFree.cpp ) add_executable(paltest_virtualfree_test1 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test1/VirtualFree.c b/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test1/VirtualFree.cpp index 0f4f144aa5..0f4f144aa5 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test1/VirtualFree.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test1/VirtualFree.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test2/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test2/CMakeLists.txt index a288b37154..9a3bc7ac61 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test2/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test2/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - VirtualFree.c + VirtualFree.cpp ) add_executable(paltest_virtualfree_test2 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test2/VirtualFree.c b/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test2/VirtualFree.cpp index 70064a3bf9..70064a3bf9 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test2/VirtualFree.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test2/VirtualFree.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test3/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test3/CMakeLists.txt index 993189c1aa..8484c0fd94 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test3/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test3/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - VirtualFree.c + VirtualFree.cpp ) add_executable(paltest_virtualfree_test3 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test3/VirtualFree.c b/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test3/VirtualFree.cpp index 27f1936be7..27f1936be7 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test3/VirtualFree.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test3/VirtualFree.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test1/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test1/CMakeLists.txt index 214cf460ae..4283398a6f 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - VirtualProtect.c + VirtualProtect.cpp ) add_executable(paltest_virtualprotect_test1 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test1/VirtualProtect.c b/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test1/VirtualProtect.cpp index 1a28bd156d..1a28bd156d 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test1/VirtualProtect.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test1/VirtualProtect.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test2/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test2/CMakeLists.txt index 27f43477ea..aed68fd27f 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test2/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test2/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - VirtualProtect.c + VirtualProtect.cpp ) add_executable(paltest_virtualprotect_test2 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test2/VirtualProtect.c b/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test2/VirtualProtect.cpp index 64a08d7885..64a08d7885 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test2/VirtualProtect.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test2/VirtualProtect.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test3/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test3/CMakeLists.txt index 994d4e2f41..70728592ad 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test3/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test3/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - VirtualProtect.c + VirtualProtect.cpp ) add_executable(paltest_virtualprotect_test3 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test3/VirtualProtect.c b/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test3/VirtualProtect.cpp index 0f738630ee..0f738630ee 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test3/VirtualProtect.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test3/VirtualProtect.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test4/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test4/CMakeLists.txt index 2e0fba50bb..5ad64a74eb 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test4/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test4/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - VirtualProtect.c + VirtualProtect.cpp ) add_executable(paltest_virtualprotect_test4 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test4/VirtualProtect.c b/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test4/VirtualProtect.cpp index 926d501d0d..926d501d0d 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test4/VirtualProtect.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test4/VirtualProtect.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test6/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test6/CMakeLists.txt index 6d6fd07df8..78932ef453 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test6/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test6/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - VirtualProtect.c + VirtualProtect.cpp ) add_executable(paltest_virtualprotect_test6 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test6/VirtualProtect.c b/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test6/VirtualProtect.cpp index d60b323ec6..d60b323ec6 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test6/VirtualProtect.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test6/VirtualProtect.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test7/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test7/CMakeLists.txt index 06af860559..caf5ef91f4 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test7/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test7/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - VirtualProtect.c + VirtualProtect.cpp ) add_executable(paltest_virtualprotect_test7 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test7/VirtualProtect.c b/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test7/VirtualProtect.cpp index edc37711f4..edc37711f4 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test7/VirtualProtect.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualProtect/test7/VirtualProtect.cpp diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualQuery/test1/CMakeLists.txt b/src/pal/tests/palsuite/filemapping_memmgt/VirtualQuery/test1/CMakeLists.txt index 4f4e4bc5f0..17cbdee4a5 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualQuery/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualQuery/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - VirtualQuery.c + VirtualQuery.cpp ) add_executable(paltest_virtualquery_test1 diff --git a/src/pal/tests/palsuite/filemapping_memmgt/VirtualQuery/test1/VirtualQuery.c b/src/pal/tests/palsuite/filemapping_memmgt/VirtualQuery/test1/VirtualQuery.cpp index 44216ae563..44216ae563 100644 --- a/src/pal/tests/palsuite/filemapping_memmgt/VirtualQuery/test1/VirtualQuery.c +++ b/src/pal/tests/palsuite/filemapping_memmgt/VirtualQuery/test1/VirtualQuery.cpp |