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

Issue 1474483002: Fix split in base::ProcessIsProcessBackgrounded() (Closed)

Created:
5 years, 1 month ago by Luis Héctor Chávez
Modified:
5 years ago
CC:
chromium-reviews, vmpstr+watch_chromium.org
Base URL:
https://chromium.googlesource.com/a/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix split in base::ProcessIsProcessBackgrounded() Most Unix files end in newline, so by having the contents of /proc/<pid>/cgroup by newline with SPLIT_WANT_ALL, the last entry was always blank, triggering a NOTREACHED() and polluting the log. This change uses SPLIT_WANT_NONEMPTY instead to get rid of empty lines. BUG=548818 TEST=base_unittests --gtest_filter=ProcessTest.TestIsProcessBackgroundedCGroup Committed: https://crrev.com/99fbcf8043ece4e72b5d15fee9be6d29b562aa06 Cr-Commit-Position: refs/heads/master@{#361383}

Patch Set 1 #

Patch Set 2 : Fixed formatting #

Patch Set 3 : Added tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -4 lines) Patch
M base/process/process_linux.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M base/process/process_unittest.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 16 (6 generated)
Luis Héctor Chávez
PTAL
5 years, 1 month ago (2015-11-23 22:21:57 UTC) #2
afakhry
lgtm
5 years, 1 month ago (2015-11-23 22:24:54 UTC) #3
Lei Zhang
Does the unit test actually cover this scenario? If not, can you add a new ...
5 years, 1 month ago (2015-11-23 22:29:20 UTC) #4
lhc(google)
Changed the tests to cover this.
5 years ago (2015-11-24 02:22:34 UTC) #6
Lei Zhang
lgtm, thanks
5 years ago (2015-11-24 02:27:50 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1474483002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1474483002/40001
5 years ago (2015-11-24 02:29:03 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/133371)
5 years ago (2015-11-24 04:14:54 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1474483002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1474483002/40001
5 years ago (2015-11-24 17:06:19 UTC) #14
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years ago (2015-11-24 17:54:41 UTC) #15
commit-bot: I haz the power
5 years ago (2015-11-24 17:55:44 UTC) #16
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/99fbcf8043ece4e72b5d15fee9be6d29b562aa06
Cr-Commit-Position: refs/heads/master@{#361383}

Powered by Google App Engine
This is Rietveld 408576698