Compare commits

..

13 Commits

Author SHA1 Message Date
The Android Automerger
420e371107 merge in mnc-release history after reset to mnc-dev 2015-08-26 01:01:18 -07:00
The Android Automerger
f315961aee merge in mnc-release history after reset to mnc-dev 2015-08-12 01:01:04 -07:00
The Android Automerger
c01f421b18 merge in mnc-release history after reset to mnc-dev 2015-07-28 01:01:03 -07:00
The Android Automerger
c7ebaf57ab merge in mnc-release history after reset to mnc-dev 2015-07-25 01:01:18 -07:00
The Android Automerger
e88c453695 merge in mnc-release history after reset to mnc-dev 2015-07-22 01:01:17 -07:00
The Android Automerger
a25c04b736 merge in mnc-release history after reset to mnc-dev 2015-07-14 01:01:34 -07:00
The Android Automerger
ba95d8a02b merge in mnc-release history after reset to mnc-dev 2015-07-13 01:02:01 -07:00
The Android Automerger
572651dbb2 merge in mnc-release history after reset to mnc-dev 2015-07-07 01:01:18 -07:00
The Android Automerger
aa553fe465 merge in mnc-release history after reset to mnc-dev 2015-07-01 14:22:36 -07:00
Dmitriy Ivanov
e89c2048d6 Fix crash when trying to load invalid ELF file.
Bug: http://b/22047255
Bug: http://b/22091640
Change-Id: I6c51cff43287a6ac4b25fa9ce6a6fc3d232fd047
2015-06-25 19:58:03 -07:00
The Android Automerger
2fdf2ea2b1 merge in mnc-release history after reset to mnc-dev 2015-06-25 01:00:37 -07:00
The Android Automerger
aae28448f2 merge in mnc-release history after reset to mnc-dev 2015-06-24 02:51:57 -07:00
The Android Automerger
d1b93d0823 merge in mnc-release history after reset to mnc-dev 2015-06-23 01:01:18 -07:00
5 changed files with 6 additions and 44 deletions

View File

@@ -130,13 +130,8 @@ __LIBC_HIDDEN__ void pthread_key_clean_all(void);
*/
#define PTHREAD_STACK_SIZE_DEFAULT ((1 * 1024 * 1024) - SIGSTKSZ)
// Leave room for a guard page in the internally created signal stacks.
#if defined(__LP64__)
// SIGSTKSZ is not big enough for 64-bit arch. See http://b/23041777.
#define SIGNAL_STACK_SIZE (16 * 1024 + PAGE_SIZE)
#else
/* Leave room for a guard page in the internally created signal stacks. */
#define SIGNAL_STACK_SIZE (SIGSTKSZ + PAGE_SIZE)
#endif
/* Needed by fork. */
__LIBC_HIDDEN__ extern void __bionic_atfork_run_prepare();

View File

@@ -241,12 +241,7 @@ libBionicCtsGtestMain_src_files := gtest_main.cpp
libBionicCtsGtestMain_cflags := $(test_cflags)
libBionicCtsGtestMain_cppflags := $(test_cppflags) -DUSING_GTEST_OUTPUT_FORMAT \
# Temporarily fix the job count to 1 for CTS since on some devices the
# number of online cores is incorrectly read as the total number of cores
# in the system. When b/24376925 is fixed, this should be removed.
libBionicCtsGtestMain_cppflags += -DJOB_COUNT_FIXED=1
libBionicCtsGtestMain_cppflags := $(test_cppflags) -DUSING_GTEST_OUTPUT_FORMAT
module := libBionicCtsGtestMain
module_tag := optional

View File

@@ -59,7 +59,7 @@ using testing::internal::COLOR_GREEN;
using testing::internal::COLOR_YELLOW;
using testing::internal::ColoredPrintf;
constexpr int DEFAULT_GLOBAL_TEST_RUN_DEADLINE_MS = 90000;
constexpr int DEFAULT_GLOBAL_TEST_RUN_DEADLINE_MS = 60000;
constexpr int DEFAULT_GLOBAL_TEST_RUN_WARNLINE_MS = 2000;
// The time each test can run before killed for the reason of timeout.
@@ -839,12 +839,8 @@ static bool RunTestInSeparateProc(int argc, char** argv, std::vector<TestCase>&
return all_tests_passed;
}
static size_t GetDefaultJobCount() {
#if defined(JOB_COUNT_FIXED)
return JOB_COUNT_FIXED;
#else
static size_t GetProcessorCount() {
return static_cast<size_t>(sysconf(_SC_NPROCESSORS_ONLN));
#endif
}
static void AddPathSeparatorInTestProgramPath(std::vector<char*>& args) {
@@ -954,7 +950,7 @@ static bool PickOptions(std::vector<char*>& args, IsolationTestOptions& options)
}
// Init default isolation test options.
options.job_count = GetDefaultJobCount();
options.job_count = GetProcessorCount();
options.test_deadline_ms = DEFAULT_GLOBAL_TEST_RUN_DEADLINE_MS;
options.test_warnline_ms = DEFAULT_GLOBAL_TEST_RUN_WARNLINE_MS;
options.gtest_color = testing::GTEST_FLAG(color);

View File

@@ -27,7 +27,6 @@
#include <sys/syscall.h>
#include <time.h>
#include <unistd.h>
#include <unwind.h>
#include <atomic>
#include <regex>
@@ -1572,26 +1571,3 @@ TEST_F(pthread_DeathTest, pthread_mutex_unlock_null_64) {
GTEST_LOG_(INFO) << "This test tests bionic implementation details on 64 bit devices.";
#endif
}
extern _Unwind_Reason_Code FrameCounter(_Unwind_Context* ctx, void* arg);
static volatile bool signal_handler_on_altstack_done;
static void SignalHandlerOnAltStack(int signo, siginfo_t*, void*) {
ASSERT_EQ(SIGUSR1, signo);
// Check if we have enough stack space for unwinding.
int count = 0;
_Unwind_Backtrace(FrameCounter, &count);
ASSERT_GT(count, 0);
// Check if we have enough stack space for logging.
std::string s(2048, '*');
GTEST_LOG_(INFO) << s;
signal_handler_on_altstack_done = true;
}
TEST(pthread, big_enough_signal_stack_for_64bit_arch) {
signal_handler_on_altstack_done = false;
ScopedSignalHandler handler(SIGUSR1, SignalHandlerOnAltStack, SA_SIGINFO | SA_ONSTACK);
kill(getpid(), SIGUSR1);
ASSERT_TRUE(signal_handler_on_altstack_done);
}

View File

@@ -34,7 +34,7 @@
#define noinline __attribute__((__noinline__))
#define __unused __attribute__((__unused__))
_Unwind_Reason_Code FrameCounter(_Unwind_Context* ctx __unused, void* arg) {
static _Unwind_Reason_Code FrameCounter(_Unwind_Context* ctx __unused, void* arg) {
int* count_ptr = reinterpret_cast<int*>(arg);
#if SHOW_FRAME_LOCATIONS