Improve fmemopen tests.
Tag fmemopen_NULL as a known failure, and make it reliably fail by
memsetting the buffer we read to.
Bug: http://b/33251022
Test: bionic-unit-tests/bionic-unit-tests64 on bullhead
Test: bionic-unit-tests-glibc --gtest_filter="*memopen*"
Change-Id: I381783282359851c9de47146dafbb5a291960c2a
diff --git a/tests/utils.h b/tests/utils.h
index 4c3aef4..79eed10 100644
--- a/tests/utils.h
+++ b/tests/utils.h
@@ -32,6 +32,12 @@
#include "private/ScopeGuard.h"
+#if defined(__BIONIC__)
+#define KNOWN_FAILURE_ON_BIONIC(x) xfail_ ## x
+#else
+#define KNOWN_FAILURE_ON_BIONIC(x) x
+#endif
+
#if defined(__linux__)
struct map_record {