diff options
Diffstat (limited to 'src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange64')
4 files changed, 6 insertions, 31 deletions
diff --git a/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange64/test1/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange64/test1/CMakeLists.txt index 722603eb4a..7778acd397 100644 --- a/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange64/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange64/test1/CMakeLists.txt @@ -13,7 +13,5 @@ add_executable(paltest_interlockedcompareexchange64_test1 add_dependencies(paltest_interlockedcompareexchange64_test1 coreclrpal) target_link_libraries(paltest_interlockedcompareexchange64_test1 - pthread - m - coreclrpal + ${COMMON_TEST_LIBRARIES} ) diff --git a/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange64/test1/test.cpp b/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange64/test1/test.cpp index 56430e60cf..bb5981c65b 100644 --- a/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange64/test1/test.cpp +++ b/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange64/test1/test.cpp @@ -42,7 +42,7 @@ int __cdecl main(int argc, char *argv[]) { /* ** Run only on 64 bit platforms */ -#if defined(BIT64) && defined(PLATFORM_UNIX) +#if defined(BIT64) /* Compare START_VALUE with BaseVariableToManipulate, they're equal, so exchange */ @@ -55,18 +55,10 @@ int __cdecl main(int argc, char *argv[]) { /* Exchanged, these should be equal now */ if(BaseVariableToManipulate != ValueToExchange) { -#ifdef PLATFORM_UNIX Fail("ERROR: A successful compare and exchange should have occurred, " "making the variable have the value of %ll, as opposed to the " "current value of %ll.", ValueToExchange,BaseVariableToManipulate); -#else - Fail("ERROR: A successful compare and exchange should have occurred, " - "making the variable have the value of %I64, as opposed to the " - "current value of %d.", - ValueToExchange,BaseVariableToManipulate); - -#endif } /* Check to make sure it returns the original number which @@ -74,15 +66,9 @@ int __cdecl main(int argc, char *argv[]) { */ if(TheReturn != START_VALUE) { -#ifdef PLATFORM_UNIX Fail("ERROR: The return value after the first exchange should be the " "former value of the variable, which was %ll, but it is now %ll.", START_VALUE,TheReturn); -#else - Fail("ERROR: The return value after the first exchange should be the " - "former value of the variable, which was %I64, but it is now %I64.", - START_VALUE,TheReturn); -#endif } @@ -103,20 +89,13 @@ int __cdecl main(int argc, char *argv[]) { if(BaseVariableToManipulate != TempValue) { -#ifdef PLATFORM_UNIX Fail("ERROR: An attempted exchange should have failed due to " "the compare failing. But, it seems to have succeeded. The " "value should be %ll but is %ll in this case.", TempValue,BaseVariableToManipulate); -#else - Fail("ERROR: An attempted exchange should have failed due to " - "the compare failing. But, it seems to have succeeded. The " - "value should be %I64 but is %I64 in this case.", - TempValue,BaseVariableToManipulate); -#endif } -#endif //if defined(BIT64) && defined(PLATFORM_UNIX) +#endif //if defined(BIT64) PAL_Terminate(); return PASS; } diff --git a/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange64/test2/CMakeLists.txt b/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange64/test2/CMakeLists.txt index f052ca0b27..0f8e390ac5 100644 --- a/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange64/test2/CMakeLists.txt +++ b/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange64/test2/CMakeLists.txt @@ -13,7 +13,5 @@ add_executable(paltest_interlockedcompareexchange64_test2 add_dependencies(paltest_interlockedcompareexchange64_test2 coreclrpal) target_link_libraries(paltest_interlockedcompareexchange64_test2 - pthread - m - coreclrpal + ${COMMON_TEST_LIBRARIES} ) diff --git a/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange64/test2/test.cpp b/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange64/test2/test.cpp index 2440543631..b2b0b6337c 100644 --- a/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange64/test2/test.cpp +++ b/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange64/test2/test.cpp @@ -47,7 +47,7 @@ int __cdecl main(int argc, char *argv[]) /* ** Run only on 64 bit platforms */ - #if defined(BIT64) && defined(PLATFORM_UNIX) + #if defined(BIT64) //Create MAX_THREADS threads that will operate on the global counter for (i=0;i<MAX_THREADS;i++) @@ -84,7 +84,7 @@ int __cdecl main(int argc, char *argv[]) Fail("Test Case Failed: InterlockedDecrement \n"); } - #endif //defined(BIT64) && defined(PLATFORM_UNIX) + #endif //defined(BIT64) PAL_Terminate(); return PASS; |