Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Issue 1991403002: [battor agent] Fix the init sequence so it retries inits instead of resets. (Closed)

Created:
4 years, 7 months ago by aschulman
Modified:
4 years, 6 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[battor agent] Fix the init sequence so it retries inits instead of resets. The BattOr will reset if it receives an INIT message after it has already collected data. The existing implementation would not retry the INIT message after the first INIT times out. Instead, it would proactively send a RESET to the BattOr. The problem is if there are extra bytes on the link the proactive reset may fail. In this fix, the BattOr agent will retry the INIT message several times until it succeeds. BUG=585192 Committed: https://crrev.com/3a21c9f5e01525b8788e260757152883b3ed913c Cr-Commit-Position: refs/heads/master@{#400045}

Patch Set 1 : Initial draft #

Total comments: 16

Patch Set 2 : Cleaned up and ready for a 2nd review #

Total comments: 18

Patch Set 3 : Final changes made #

Patch Set 4 : Fixed unit tests that were broken by this patch #

Total comments: 3

Patch Set 5 : Added StartTracing Success after INIT failure test case #

Total comments: 2

Patch Set 6 : Fixed comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+105 lines, -56 lines) Patch
M tools/battor_agent/battor_agent.h View 1 2 2 chunks +3 lines, -1 line 0 comments Download
M tools/battor_agent/battor_agent.cc View 1 2 9 chunks +44 lines, -28 lines 0 comments Download
M tools/battor_agent/battor_agent_unittest.cc View 1 2 3 4 5 8 chunks +47 lines, -27 lines 0 comments Download
M tools/battor_agent/battor_connection.h View 1 chunk +3 lines, -0 lines 0 comments Download
M tools/battor_agent/battor_connection_impl.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M tools/battor_agent/battor_connection_impl.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M tools/battor_agent/battor_error.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M tools/battor_agent/battor_error.cc View 1 2 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 27 (9 generated)
charliea (OOO until 10-5)
(Hitting send on drafts, just in case they're applicable for the next version you're working ...
4 years, 7 months ago (2016-05-23 14:08:52 UTC) #3
aschulman
For reference I integrated all of your comments into the new patch set. https://codereview.chromium.org/1991403002/diff/1/tools/battor_agent/battor_agent.cc File ...
4 years, 6 months ago (2016-06-10 07:22:59 UTC) #4
charliea (OOO until 10-5)
If you're okay with it, I think that I'll approve this once the changes are ...
4 years, 6 months ago (2016-06-10 17:05:34 UTC) #6
aschulman
Thanks for the comments! I incorporated everything into the final patch set. There also were ...
4 years, 6 months ago (2016-06-10 18:27:25 UTC) #7
charliea (OOO until 10-5)
lgtm
4 years, 6 months ago (2016-06-13 17:08:35 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1991403002/60001
4 years, 6 months ago (2016-06-13 17:10:32 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_gn_chromeos_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_chromeos_rel/builds/202469)
4 years, 6 months ago (2016-06-13 17:28:24 UTC) #12
charliea (OOO until 10-5)
https://codereview.chromium.org/1991403002/diff/80001/tools/battor_agent/battor_agent_unittest.cc File tools/battor_agent/battor_agent_unittest.cc (right): https://codereview.chromium.org/1991403002/diff/80001/tools/battor_agent/battor_agent_unittest.cc#newcode347 tools/battor_agent/battor_agent_unittest.cc:347: TEST_F(BattOrAgentTest, StartTracingFailsIfResetSendFails) { I think that this test should ...
4 years, 6 months ago (2016-06-15 14:28:51 UTC) #13
charliea (OOO until 10-5)
also, nolgtm due to test failures
4 years, 6 months ago (2016-06-15 14:35:12 UTC) #14
charliea (OOO until 10-5)
On 2016/06/15 14:35:12, charliea wrote: > also, nolgtm due to test failures maybe not lgtm ...
4 years, 6 months ago (2016-06-15 14:36:08 UTC) #15
aschulman
On 2016/06/15 14:36:08, charliea wrote: > On 2016/06/15 14:35:12, charliea wrote: > > also, nolgtm ...
4 years, 6 months ago (2016-06-15 14:53:22 UTC) #16
aschulman
Added the new test case that you requested. https://codereview.chromium.org/1991403002/diff/80001/tools/battor_agent/battor_agent_unittest.cc File tools/battor_agent/battor_agent_unittest.cc (right): https://codereview.chromium.org/1991403002/diff/80001/tools/battor_agent/battor_agent_unittest.cc#newcode578 tools/battor_agent/battor_agent_unittest.cc:578: TEST_F(BattOrAgentTest, ...
4 years, 6 months ago (2016-06-15 16:47:41 UTC) #17
charliea (OOO until 10-5)
lgtm w/ nit https://codereview.chromium.org/1991403002/diff/100001/tools/battor_agent/battor_agent_unittest.cc File tools/battor_agent/battor_agent_unittest.cc (right): https://codereview.chromium.org/1991403002/diff/100001/tools/battor_agent/battor_agent_unittest.cc#newcode436 tools/battor_agent/battor_agent_unittest.cc:436: // Instead of an INIT ACK ...
4 years, 6 months ago (2016-06-15 18:56:34 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1991403002/120001
4 years, 6 months ago (2016-06-15 22:43:29 UTC) #21
aschulman
putting to CQ https://codereview.chromium.org/1991403002/diff/100001/tools/battor_agent/battor_agent_unittest.cc File tools/battor_agent/battor_agent_unittest.cc (right): https://codereview.chromium.org/1991403002/diff/100001/tools/battor_agent/battor_agent_unittest.cc#newcode436 tools/battor_agent/battor_agent_unittest.cc:436: // Instead of an INIT ACK ...
4 years, 6 months ago (2016-06-15 23:37:09 UTC) #22
commit-bot: I haz the power
Committed patchset #6 (id:120001)
4 years, 6 months ago (2016-06-15 23:46:13 UTC) #24
commit-bot: I haz the power
CQ bit was unchecked
4 years, 6 months ago (2016-06-15 23:46:35 UTC) #25
commit-bot: I haz the power
4 years, 6 months ago (2016-06-15 23:47:57 UTC) #27
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/3a21c9f5e01525b8788e260757152883b3ed913c
Cr-Commit-Position: refs/heads/master@{#400045}

Powered by Google App Engine
This is Rietveld 408576698