platform_bionic/tests/unistd_nofortify_test.cpp
Christopher Ferris 13f26a7b2b Add method to run fortified versions of funcs.
Add a way to turn fortify off for the files that test fortify functions.

This method involves simply compiling the same file with fortify off and
changing the test name slightly.

It's not very pretty, and it assumes that only these few files test
functions that can be fortified.

Bug: 15195631
Change-Id: Iba9db1d508b7d28a1d6968019cb70fe08864827b
2016-01-13 17:13:21 -08:00

12 lines
225 B
C++

#ifdef _FORTIFY_SOURCE
#undef _FORTIFY_SOURCE
#endif
#define NOFORTIFY
#include "unistd_test.cpp"
#if defined(_FORTIFY_SOURCE)
#error "_FORTIFY_SOURCE has been redefined, fix the code to remove this redefinition."
#endif