[compiler-rt] r277463 - Follow-up for r277458: Update the tsan_mman_test.cc unit test.

Kuba Brecka via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 2 07:41:03 PDT 2016


Author: kuba.brecka
Date: Tue Aug  2 09:41:03 2016
New Revision: 277463

URL: http://llvm.org/viewvc/llvm-project?rev=277463&view=rev
Log:
Follow-up for r277458: Update the tsan_mman_test.cc unit test.


Modified:
    compiler-rt/trunk/lib/tsan/tests/unit/tsan_mman_test.cc

Modified: compiler-rt/trunk/lib/tsan/tests/unit/tsan_mman_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/tests/unit/tsan_mman_test.cc?rev=277463&r1=277462&r2=277463&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/tests/unit/tsan_mman_test.cc (original)
+++ compiler-rt/trunk/lib/tsan/tests/unit/tsan_mman_test.cc Tue Aug  2 09:41:03 2016
@@ -53,9 +53,9 @@ TEST(Mman, UserRealloc) {
   uptr pc = 0;
   {
     void *p = user_realloc(thr, pc, 0, 0);
-    // Strictly saying this is incorrect, realloc(NULL, N) is equivalent to
-    // malloc(N), thus must return non-NULL pointer.
-    EXPECT_EQ(p, (void*)0);
+    // Realloc(NULL, N) is equivalent to malloc(N), thus must return
+    // non-NULL pointer.
+    EXPECT_NE(p, (void*)0);
   }
   {
     void *p = user_realloc(thr, pc, 0, 100);
@@ -68,7 +68,7 @@ TEST(Mman, UserRealloc) {
     EXPECT_NE(p, (void*)0);
     memset(p, 0xde, 100);
     void *p2 = user_realloc(thr, pc, p, 0);
-    EXPECT_EQ(p2, (void*)0);
+    EXPECT_NE(p2, (void*)0);
   }
   {
     void *p = user_realloc(thr, pc, 0, 100);




More information about the llvm-commits mailing list