OSDN Git Service

am 4e70df18: am 03a2281e: Merge "bionic libc test: remove relocation related bionic...
authorElliott Hughes <enh@google.com>
Wed, 29 Oct 2014 17:10:59 +0000 (17:10 +0000)
committerAndroid Git Automerger <android-git-automerger@android.com>
Wed, 29 Oct 2014 17:10:59 +0000 (17:10 +0000)
* commit '4e70df187b3d31273976dd09777548397a071476':
  bionic libc test: remove relocation related bionic test

tests/bionic/libc/Android.mk
tests/bionic/libc/bionic/lib_relocs.c [deleted file]
tests/bionic/libc/bionic/test_relocs.c [deleted file]

index 72d9d96..226f7fa 100644 (file)
@@ -116,24 +116,6 @@ sources := \
 
 $(call device-test, $(sources))
 
-# The relocations test is a bit special, since we need
-# to build one shared object and one executable that depends
-# on it.
-
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES := bionic/lib_relocs.c
-LOCAL_MODULE    := libtest_relocs
-
-LOCAL_MODULE_TAGS := tests
-include $(BUILD_SHARED_LIBRARY)
-
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES := bionic/test_relocs.c
-LOCAL_MODULE    := test_relocs
-LOCAL_SHARED_LIBRARIES := libtest_relocs
-LOCAL_MODULE_TAGS := tests
-include $(BUILD_EXECUTABLE)
-
 # This test tries to see if the static constructors in a
 # shared library are only called once. We thus need to
 # build a shared library, then call it from another
diff --git a/tests/bionic/libc/bionic/lib_relocs.c b/tests/bionic/libc/bionic/lib_relocs.c
deleted file mode 100644 (file)
index af4cf6f..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/* this is part of the test_relocs.c test, which is used to check that
- * the relocations generated in a shared object are properly handled
- * by the Bionic dynamic linker
- */
-
-struct foo { int first, second; };
-struct foo Foo = {1, 2};
-
-int* FooPtr[] = { &Foo.first, &Foo.second };
-
-int func1( void )
-{
-    return *FooPtr[0];
-}
-
-int  func2( void )
-{
-    return *FooPtr[1];
-}
diff --git a/tests/bionic/libc/bionic/test_relocs.c b/tests/bionic/libc/bionic/test_relocs.c
deleted file mode 100644 (file)
index c42df11..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/* this little test is written to check that the relocations generated
- * in a shared library are correct. it depends on the content of lib_relocs.c
- * being compiled as a shared object.
- */
-#include <stdio.h>
-
-extern int  func1(void);
-extern int  func2(void);
-
-int
-main( void )
-{
-    int   f1, f2, expect1 = 1, expect2 = 2;
-
-    f1 = func1();
-    f2 = func2();
-
-    printf( "func1() returns %d: %s\n", f1, (f1 == expect1) ? "OK" : "FAIL" );
-    printf( "func2() returns %d: %s\n", f2, (f2 == expect2) ? "OK" : "FAIL" );
-
-    if (f1 != expect1 || f2 != expect2)
-        return 1;
-
-    return 0;
-}