From e097b93086bf7be065d7400aece5edad6aca1bd6 Mon Sep 17 00:00:00 2001 From: "epenner@chromium.org" Date: Wed, 19 Mar 2014 06:34:52 +0000 Subject: IPC: Make ipc_perftests run on Android. There was several minor issues: - Base perf logging file location was off-limits on Android - Printf needs to be flushed to be visible on Android. - Android needs to reset the 'PipeMap' manually since we can't 'exec' after forking a test process. If we don't do this the Channel thinks we are in a single- process test and tries to open an FD which was closed during forking. - Android's base file descriptor needs to be increased to prevent stomping the android native logging file-descriptor with the default pipe. - The test took too long, so the 'exponent' is reduced from 5 to 3 - We need an APK With this patch the test runs like on other platforms, and lots of testing code is fixed such that it works the same way on all platforms. BUG=345471 Review URL: https://codereview.chromium.org/196343019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257877 0039d316-1c4b-4281-b951-d872f2087c98 --- base/posix/global_descriptors.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'base/posix') diff --git a/base/posix/global_descriptors.h b/base/posix/global_descriptors.h index c7b9f87..3d7369c31 100644 --- a/base/posix/global_descriptors.h +++ b/base/posix/global_descriptors.h @@ -41,7 +41,11 @@ class BASE_EXPORT GlobalDescriptors { // Often we want a canonical descriptor for a given Key. In this case, we add // the following constant to the key value: +#if !defined(OS_ANDROID) static const int kBaseDescriptor = 3; // 0, 1, 2 are already taken. +#else + static const int kBaseDescriptor = 4; // 3 used by __android_log_write(). +#endif // Return the singleton instance of GlobalDescriptors. static GlobalDescriptors* GetInstance(); -- cgit v1.1