diff options
author | Elliott Hughes <enh@google.com> | 2014-09-17 20:06:10 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2014-09-17 20:06:10 -0700 |
commit | 762a0fe42008a4ae52a3fac4b9015175e5c10bab (patch) | |
tree | ea7d61c964fb33e39b24b4adc37c11d216195894 | |
parent | c26f208487aa1d7cfb9baf2d0579a5696875c5d0 (diff) | |
download | extras-762a0fe42008a4ae52a3fac4b9015175e5c10bab.tar.gz |
Remove a glibc test.
Change-Id: I58b6fbc70086a286e41a2b166e6ed8afe6237185
-rw-r--r-- | tests/bionic/libc/README.TXT | 8 | ||||
-rw-r--r-- | tests/bionic/libc/glibc/assert/test-assert.c | 88 |
2 files changed, 0 insertions, 96 deletions
diff --git a/tests/bionic/libc/README.TXT b/tests/bionic/libc/README.TXT index 7618f2b7..c43f93b5 100644 --- a/tests/bionic/libc/README.TXT +++ b/tests/bionic/libc/README.TXT @@ -1,9 +1,5 @@ This directory contains a set of tests for Android's Bionic C library. -These sources are not distributed with Bionic itself because some of -these tests come from the GNU C Library, and are licensed under the -GNU Lesser General Public License (LGPL) - You must define the BIONIC_TESTS environment variable to build these test programs. For example, do: @@ -19,10 +15,6 @@ The directory layout is simple: Contains tests that can be compiled either with Bionic or another C library. - glibc/ - Contains tests that come from the GNU C Library. However, they can - be compiled with Bionic too. - bionic/ Contains tests that can *only* be compiled against Bionic diff --git a/tests/bionic/libc/glibc/assert/test-assert.c b/tests/bionic/libc/glibc/assert/test-assert.c deleted file mode 100644 index 26b58d4d..00000000 --- a/tests/bionic/libc/glibc/assert/test-assert.c +++ /dev/null @@ -1,88 +0,0 @@ -/* Test assert(). - * - * This is hairier than you'd think, involving games with - * stdio and signals. - * - */ - -#include <signal.h> -#include <stdlib.h> -#include <stdio.h> -#include <string.h> -#include <setjmp.h> - -jmp_buf rec; -char buf[160]; - -static void -sigabrt (int unused) -{ - longjmp (rec, 1); /* recover control */ -} - -#undef NDEBUG -#include <assert.h> -static void -assert1 (void) -{ - assert (1 == 2); -} - -static void -assert2 (void) -{ - assert (1 == 1); -} - - -#define NDEBUG -#include <assert.h> -static void -assert3 (void) -{ - assert (2 == 3); -} - -int -main (void) -{ - - volatile int failed = 1; - - fclose (stderr); - stderr = tmpfile (); - if(!stderr) - abort (); - - signal (SIGABRT, sigabrt); - - if (!setjmp (rec)) - assert1 (); - else - failed = 0; /* should happen */ - - if (!setjmp (rec)) - assert2 (); - else - failed = 1; /* should not happen */ - - if (!setjmp (rec)) - assert3 (); - else - failed = 1; /* should not happen */ - - rewind (stderr); - fgets (buf, 160, stderr); - if (!strstr (buf, "1 == 2")) - failed = 1; - - fgets (buf, 160, stderr); - if (strstr (buf, "1 == 1")) - failed = 1; - - fgets (buf, 160, stderr); - if (strstr (buf, "2 == 3")) - failed = 1; - - return failed; -} |