diff options
| author | Nick Kralevich <nnk@google.com> | 2013-10-09 16:53:05 -0700 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2013-10-09 16:53:05 -0700 |
| commit | b8771d9fd844fd28b6e5e6fe429ef40c097b32a6 (patch) | |
| tree | edaea3a8b60b24c405ea01e897fb3ca84cc848e3 /tests | |
| parent | 41f56e29c789aa563821715e2f3e5b9d83974280 (diff) | |
| parent | b35ebe3d7097899fd4498ebb2b93e48fd836ebcf (diff) | |
| download | bionic-b8771d9fd844fd28b6e5e6fe429ef40c097b32a6.zip bionic-b8771d9fd844fd28b6e5e6fe429ef40c097b32a6.tar.gz bionic-b8771d9fd844fd28b6e5e6fe429ef40c097b32a6.tar.bz2 | |
am b35ebe3d: am 848efa9d: Merge "Revert "FORTIFY_SOURCE: fortify read()""
* commit 'b35ebe3d7097899fd4498ebb2b93e48fd836ebcf':
Revert "FORTIFY_SOURCE: fortify read()"
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/fortify_test.cpp | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/tests/fortify_test.cpp b/tests/fortify_test.cpp index b42c6b7..d514a3d 100644 --- a/tests/fortify_test.cpp +++ b/tests/fortify_test.cpp @@ -21,7 +21,6 @@ #include <sys/stat.h> #include <sys/socket.h> #include <malloc.h> -#include <fcntl.h> // We have to say "DeathTest" here so gtest knows to run this test (which exits) // in its own process. Unfortunately, the C preprocessor doesn't give us an @@ -569,15 +568,6 @@ TEST(DEATHTEST, FD_ZERO_fortified) { ASSERT_EXIT(FD_ZERO(set), testing::KilledBySignal(SIGABRT), ""); } -TEST(DEATHTEST, read_fortified) { - ::testing::FLAGS_gtest_death_test_style = "threadsafe"; - char buf[1]; - size_t ct = atoi("2"); // prevent optimizations - int fd = open("/dev/null", O_RDONLY); - ASSERT_EXIT(read(fd, buf, ct), testing::KilledBySignal(SIGABRT), ""); - close(fd); -} - extern "C" char* __strncat_chk(char*, const char*, size_t, size_t); extern "C" char* __strcat_chk(char*, const char*, size_t); |
