Loading...
tests/malloc_realloc_large.c libmalloc-792.1.1 libmalloc-657.60.21
--- libmalloc/libmalloc-792.1.1/tests/malloc_realloc_large.c
+++ libmalloc/libmalloc-657.60.21/tests/malloc_realloc_large.c
@@ -50,14 +50,7 @@
 	void *ptr2 = realloc(ptr1, size2);
 	T_ASSERT_TRUE(memchk(ptr2, 'A', size2), "contents unchanged after realloc");
 	T_ASSERT_LE(size2, malloc_size(ptr2), "realloc LARGE smaller");
-
-	bool has_sanitizer = false;
-#if CONFIG_SANITIZER
-	has_sanitizer = malloc_sanitizer_is_enabled();
-#endif
-	if (!has_sanitizer) {
-		T_ASSERT_EQ(ptr1, ptr2, "realloc LARGE smaller in-place");
-	}
+	T_ASSERT_EQ(ptr1, ptr2, "realloc LARGE smaller in-place");
 	free(ptr2);
 
 	// Large allocation grow in place
@@ -83,10 +76,9 @@
 			"realloc HUGE smaller");
 
 #if MALLOC_TARGET_EXCLAVES
-	T_LOG("exclaves don't support resizing mappings, skipping realloc in-place");
-#else
+	T_EXPECTFAIL_WITH_REASON("Exclaves don't support resizing mappings");
+#endif // MALLOC_TARGET_EXCLAVES
 	T_ASSERT_EQ(ptr1, ptr2, "realloc HUGE smaller in-place");
-#endif // !MALLOC_TARGET_EXCLAVES
 	free(ptr2);
 
 	// Huge allocation grow in place
@@ -161,7 +153,6 @@
 		"realloc HUGE aligned");
 	free(ptr2);
 }
-
 
 T_DECL(realloc_overlap_mmap,
 		"Make sure that realloc in place doesn't overwrite existing mmap",