Commit Graph

17653 Commits

Author SHA1 Message Date
Bertrand Simonnet 2f146a5a60 am c6a66bf1: am 3ef7f0af: Merge "metricsd: Add test case for the upload service."
* commit 'c6a66bf1cfdfd35e3289fbfd3fb16be795def9f9':
  metricsd: Add test case for the upload service.
2015-09-14 22:58:13 +00:00
Bertrand Simonnet 2fe03177cf am 7ad4171f: am dd11d286: Merge "metricsd: Persist the report to disk if an upload fails."
* commit '7ad4171f3ca8654e65016119fe9b37749f80f535':
  metricsd: Persist the report to disk if an upload fails.
2015-09-14 22:58:12 +00:00
Bertrand Simonnet 4369c1e788 am 7fb08a74: am a9f1ed16: Merge "metricsd: Use the metrics directory everywhere."
* commit '7fb08a74fd1f1cc805fcec1eb672e0c1ef714a46':
  metricsd: Use the metrics directory everywhere.
2015-09-14 22:58:11 +00:00
Bertrand Simonnet c6a66bf1cf am 3ef7f0af: Merge "metricsd: Add test case for the upload service."
* commit '3ef7f0afb86be9473728f4fb3679be0c6f21ff82':
  metricsd: Add test case for the upload service.
2015-09-14 22:53:11 +00:00
Bertrand Simonnet 7ad4171f3c am dd11d286: Merge "metricsd: Persist the report to disk if an upload fails."
* commit 'dd11d286caa881e135eaec64095d5e6bbc406b44':
  metricsd: Persist the report to disk if an upload fails.
2015-09-14 22:53:10 +00:00
Bertrand Simonnet 7fb08a74fd am a9f1ed16: Merge "metricsd: Use the metrics directory everywhere."
* commit 'a9f1ed16a839ec4cc974e66734c11a01e8d71820':
  metricsd: Use the metrics directory everywhere.
2015-09-14 22:53:08 +00:00
Bertrand Simonnet 3ef7f0afb8 Merge "metricsd: Add test case for the upload service." 2015-09-14 22:48:39 +00:00
Bertrand Simonnet dd11d286ca Merge "metricsd: Persist the report to disk if an upload fails." 2015-09-14 22:48:32 +00:00
Bertrand Simonnet a9f1ed16a8 Merge "metricsd: Use the metrics directory everywhere." 2015-09-14 22:48:25 +00:00
Steve Fung eab7746acb am 9179c217: am 758db4db: Merge "crash_reporter: Read crash server from property"
* commit '9179c2170566459864d68dbec488b6e03e0ebb10':
  crash_reporter: Read crash server from property
2015-09-14 22:18:51 +00:00
Steve Fung 9179c21705 am 758db4db: Merge "crash_reporter: Read crash server from property"
* commit '758db4dbe7ffc3176c25f615eb306bdeb2be2f50':
  crash_reporter: Read crash server from property
2015-09-14 22:13:58 +00:00
Steve Fung 758db4dbe7 Merge "crash_reporter: Read crash server from property" 2015-09-14 22:06:19 +00:00
Bertrand SIMONNET 4c8a8ad3bf metricsd: Add test case for the upload service.
This test case ensures that we can log a metric with the metrics library
and upload it with the upload service.

BUG: 22879646
TEST: unit tests.

Change-Id: Idf4a1240d41745ebf7835089230608082eed19f5
2015-09-14 13:55:33 -07:00
Bertrand SIMONNET 1df10c43ea metricsd: Persist the report to disk if an upload fails.
If the metrics server is unreachable, we may need to resend a metrics
report later. Instead of keeping the staged report in memory, save it to
disk to avoid loosing data if the system restarts or crashes.

BUG: 23033262
TEST: unit tests.

Change-Id: Idd14964e40f022952469f47d675d8cda9586d7cd
2015-09-14 13:55:33 -07:00
Bertrand SIMONNET 2765d0abcc metricsd: Use the metrics directory everywhere.
Instead of passing different filenames around, only rely on the metrics
directory and infer the filepath from it. This makes testing easier.

BUG: 23939404
TEST: unit tests.

Change-Id: I79086acc3a546464114fa8ec4656ec04e1c43e35
2015-09-14 13:55:28 -07:00
Steve Fung 44aec5f4af crash_reporter: Read crash server from property
Read the crash server URL from the crash_reporter.server
property.  If it is not set, return a configuration error.

Bug: 22874192
Change-Id: Iac341b6352fe9c1b54cd2e8561ed4a5bbe8ddddc
2015-09-14 20:50:33 +00:00
Steve Fung a6327627c0 am 57d4510e: am 88880fd8: Merge "crash_reporter: Fix a couple crash_sender issues"
* commit '57d4510e0aff0c8d99bf60aeb9b056112f4ad2a5':
  crash_reporter: Fix a couple crash_sender issues
2015-09-14 20:31:15 +00:00
Steve Fung 57d4510e0a am 88880fd8: Merge "crash_reporter: Fix a couple crash_sender issues"
* commit '88880fd8a906b2bcd5fe98e99ff475d812ad6d4f':
  crash_reporter: Fix a couple crash_sender issues
2015-09-14 20:24:48 +00:00
Steve Fung 88880fd8a9 Merge "crash_reporter: Fix a couple crash_sender issues" 2015-09-14 20:08:43 +00:00
Bertrand Simonnet 18c6b1786f am a2726976: am eeedcc41: Merge "metricsd: Collect generic stats about the system."
* commit 'a2726976d3857683ee84793c8278ce299b72da69':
  metricsd: Collect generic stats about the system.
2015-09-14 18:57:12 +00:00
David Pursell e4c0454083 am 07448e07: am 76f4a653: Merge changes from topic \'adb_shell\'
* commit '07448e072e50703b01aca9f99cf03ead030746de':
  adb: add client side shell protocol and enable.
  adb: implement shell protocol.
2015-09-14 18:52:42 +00:00
Bertrand Simonnet a2726976d3 am eeedcc41: Merge "metricsd: Collect generic stats about the system."
* commit 'eeedcc4150d9e48fabfd3f142c8e4f05d09f82b0':
  metricsd: Collect generic stats about the system.
2015-09-14 18:49:44 +00:00
David Pursell 07448e072e am 76f4a653: Merge changes from topic \'adb_shell\'
* commit '76f4a6533c6b803e267225b42c5dda63f23bf3ea':
  adb: add client side shell protocol and enable.
  adb: implement shell protocol.
2015-09-14 18:45:34 +00:00
Bertrand Simonnet eeedcc4150 Merge "metricsd: Collect generic stats about the system." 2015-09-14 18:44:24 +00:00
David Pursell 76f4a6533c Merge changes from topic 'adb_shell'
* changes:
  adb: add client side shell protocol and enable.
  adb: implement shell protocol.
2015-09-14 18:39:37 +00:00
Elliott Hughes 926b781877 am 3bfb5283: am ad1c0bb5: Merge "Lose du to toybox."
* commit '3bfb52834617e5d0f756c71c322f93cf4e24a957':
  Lose du to toybox.
2015-09-14 18:03:10 +00:00
Elliott Hughes 3bfb528346 am ad1c0bb5: Merge "Lose du to toybox."
* commit 'ad1c0bb5fd29d970514362388c00ced594b5acb4':
  Lose du to toybox.
2015-09-14 17:59:12 +00:00
Elliott Hughes ad1c0bb5fd Merge "Lose du to toybox." 2015-09-14 17:50:09 +00:00
Elliott Hughes 5cf29bc9f9 Lose du to toybox.
Change-Id: Ib240f74990274027258a454d3c63202791fcdb0b
2015-09-14 10:37:52 -07:00
David Zeuthen 5b0f822492 am 77557e90: am d906b297: Merge "fs_mgr: Error out if unable to determine slot_suffix"
* commit '77557e90915d600028d17c513c70309ab706ef55':
  fs_mgr: Error out if unable to determine slot_suffix
2015-09-14 15:47:31 +00:00
David Zeuthen 77557e9091 am d906b297: Merge "fs_mgr: Error out if unable to determine slot_suffix"
* commit 'd906b2973b9f708b34d4df90a2496753f83199ec':
  fs_mgr: Error out if unable to determine slot_suffix
2015-09-14 15:39:49 +00:00
David Zeuthen d906b2973b Merge "fs_mgr: Error out if unable to determine slot_suffix" 2015-09-14 15:33:35 +00:00
Mark Salyzyn bd1da05720 am f24699f0: am 93807d47: Merge "logd: worst uid record watermark part five" into mnc-dr-dev
* commit 'f24699f0f4c7f266f14f1f682aca7ac1a8c2336b':
  logd: worst uid record watermark part five
2015-09-14 14:37:08 +00:00
Mark Salyzyn f24699f0f4 am 93807d47: Merge "logd: worst uid record watermark part five" into mnc-dr-dev
* commit '93807d472d7c3745cae539af881aefbf5e211d5f':
  logd: worst uid record watermark part five
2015-09-14 14:31:13 +00:00
Mark Salyzyn 93807d472d Merge "logd: worst uid record watermark part five" into mnc-dr-dev 2015-09-14 14:16:49 +00:00
Steve Fung 4a1bc3824e crash_reporter: Fix a couple crash_sender issues
- Added grep to the list of required modules.
- Run crash_sender with the 'system' group to allow calls to
  metrics_client to read both metrics files owned by system and
  crash_reporter files owned by root.
- Fix periodic_scheduler's check delay to actually be 5 minutes.

Bug: 23122375
Change-Id: Iff214c4e591a676a516162a92ea5aedcf0824f46
2015-09-14 03:08:27 -07:00
Daniel Erat fa3f2da5d9 am 1b2bbba3: am 3fa97b3c: Merge "Add libbinderwrapper."
* commit '1b2bbba3061af685b0205a15bebf0e075203a459':
  Add libbinderwrapper.
2015-09-12 20:49:45 +00:00
Daniel Erat 1b2bbba306 am 3fa97b3c: Merge "Add libbinderwrapper."
* commit '3fa97b3cc3787ad7a58a5348e147cef67d9439e6':
  Add libbinderwrapper.
2015-09-12 20:43:01 +00:00
Daniel Erat 3fa97b3cc3 Merge "Add libbinderwrapper." 2015-09-12 20:37:05 +00:00
Elliott Hughes e8c2de18f6 am a2d380af: am c372a778: Merge "libbase_test: get it building for Windows"
* commit 'a2d380af88915c259fef5718c1adbb331e2e4c3d':
  libbase_test: get it building for Windows
2015-09-12 03:32:17 +00:00
Elliott Hughes a2d380af88 am c372a778: Merge "libbase_test: get it building for Windows"
* commit 'c372a778626dffdf6d1be5f98eafa966a95be082':
  libbase_test: get it building for Windows
2015-09-12 03:24:43 +00:00
Elliott Hughes c372a77862 Merge "libbase_test: get it building for Windows" 2015-09-12 03:16:51 +00:00
Spencer Low b2d4949cee libbase_test: get it building for Windows
Add to whitelist.

For some reason, when compiling, parseint_test.cpp would encounter
errors like the following:

host cross C++: host_cross_libbase_test <= system/core/base/parseint_test.cpp
In file included from external/gtest/include/gtest/gtest.h:1929:0,
                 from system/core/base/parseint_test.cpp:19:
system/core/base/parseint_test.cpp: In member function ‘virtual void parseint_signed_smoke_Test::TestBody()’:
external/gtest/include/gtest/internal/gtest-internal.h:133:55: error: converting ‘false’ to pointer type for argument 1 of ‘char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)’ [-Werror=conversion-null]
     (sizeof(::testing::internal::IsNullLiteralHelper(x)) == 1)
                                                       ^
external/gtest/include/gtest/gtest_pred_impl.h:77:52: note: in definition of macro ‘GTEST_ASSERT_’
   if (const ::testing::AssertionResult gtest_ar = (expression)) \
                                                    ^
external/gtest/include/gtest/gtest_pred_impl.h:166:3: note: in expansion of macro ‘GTEST_PRED_FORMAT2_’
   GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_FATAL_FAILURE_)
   ^
external/gtest/include/gtest/gtest.h:1993:3: note: in expansion of macro ‘ASSERT_PRED_FORMAT2’
   ASSERT_PRED_FORMAT2(::testing::internal:: \
   ^
external/gtest/include/gtest/gtest.h:1994:32: note: in expansion of macro ‘GTEST_IS_NULL_LITERAL_’
                       EqHelper<GTEST_IS_NULL_LITERAL_(expected)>::Compare, \
                                ^
external/gtest/include/gtest/gtest.h:2011:32: note: in expansion of macro ‘GTEST_ASSERT_EQ’
 # define ASSERT_EQ(val1, val2) GTEST_ASSERT_EQ(val1, val2)
                                ^
system/core/base/parseint_test.cpp:23:3: note: in expansion of macro ‘ASSERT_EQ’
   ASSERT_EQ(false, android::base::ParseInt("x", &i));
   ^

For whatever reason, the gcc for Windows isn't handling the template
metaprogramming correctly, so to work-around the issue, I
search-and-replaced "ASSERT_EQ(false, " to "ASSERT_FALSE(" and
"ASSERT_EQ(true, " to "ASSERT_TRUE(" and that seems to compile just fine
for Linux and Windows (and the tests pass on both platforms).

Change-Id: I05132909d1f4b18afff23139652a218649689f2d
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
2015-09-11 20:01:29 -07:00
David Pursell 9a5c3775d4 am 3b43b161: am 7b749acd: Merge "adb: fix shell_service_protocol_test for Windows."
* commit '3b43b161824946cca173d66694c8941f94a7aca2':
  adb: fix shell_service_protocol_test for Windows.
2015-09-12 01:44:40 +00:00
David Pursell 3b43b16182 am 7b749acd: Merge "adb: fix shell_service_protocol_test for Windows."
* commit '7b749acd5f7de9448f851e84ac2d3d90d28e5f03':
  adb: fix shell_service_protocol_test for Windows.
2015-09-12 01:37:50 +00:00
David Pursell 7b749acd5f Merge "adb: fix shell_service_protocol_test for Windows." 2015-09-12 01:30:20 +00:00
David Pursell b404dec85a adb: fix shell_service_protocol_test for Windows.
Adds missing #ifdef guards to shell_service_protocol_test.cpp so the
test compiles on Windows.

Also fixes a bug in Windows socketpair write implementation. Previously
it was only checking for a closed pipe if the write happened to block.
This adds an additional pre-check to exit immediately on a closed pipe.

These two changes allow the test to compile and pass on Windows.

Change-Id: Ib8853ed72f015fc0d623da47c32982cb3ffa4a3d
2015-09-11 18:28:27 -07:00
Elliott Hughes e3082990cd am e917d8ed: am 9336ee38: Merge "Fix (Windows) build."
* commit 'e917d8ed629eda66fa1218ee6564a31409c2afe8':
  Fix (Windows) build.
2015-09-11 23:30:36 +00:00
Elliott Hughes 83226d0439 am 61eee363: am 0ad13cf2: Merge "fix adb_test Windows build"
* commit '61eee3636f96a0b32be3304796e6af4421d03a4e':
  fix adb_test Windows build
2015-09-11 23:30:35 +00:00
Elliott Hughes e917d8ed62 am 9336ee38: Merge "Fix (Windows) build."
* commit '9336ee389f79296d04790d1a1dab6f55b6a4c221':
  Fix (Windows) build.
2015-09-11 23:23:52 +00:00