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

Issue 1001673002: Add Locking calls to file_io.h plus implementations and test (Closed)

Created:
5 years, 9 months ago by scottmg
Modified:
5 years, 9 months ago
CC:
crashpad-dev_chromium.org
Base URL:
https://chromium.googlesource.com/crashpad/crashpad@master
Target Ref:
refs/heads/master
Project:
crashpad
Visibility:
Public.

Description

Add Locking calls to file_io.h plus implementations and test Towards removing use of open() with O_EXLOCK/O_SHLOCK in code used on non-BSD. Adds simple Thread abstraction to util/test. Includes mini_chromium roll with: 56dd2883170d0df0ec89af0e7862af3f9aaa9be6 Fix import of atomicops for Windows 886592fd6677615c54c4156bb2f2edb5d547ba6c Export SystemErrorCodeToString R=mark@chromium.org, rsesek@chromium.org BUG=crashpad:1, crashpad:13 Committed: https://chromium.googlesource.com/crashpad/crashpad/+/79ae055e50b1acd5050795a7ac9b5bc0afcee2d9

Patch Set 1 #

Patch Set 2 : posix #

Patch Set 3 : . #

Patch Set 4 : . #

Total comments: 33

Patch Set 5 : partial revisions #

Patch Set 6 : parameterize test #

Total comments: 41

Patch Set 7 : fixes, posix only #

Patch Set 8 : windows #

Patch Set 9 : doc comments #

Patch Set 10 : add deps roll #

Total comments: 1

Patch Set 11 : ws #

Total comments: 29

Patch Set 12 : fixes #

Total comments: 11

Patch Set 13 : release load #

Unified diffs Side-by-side diffs Delta from patch set Stats (+449 lines, -31 lines) Patch
M DEPS View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M util/file/file_io.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +40 lines, -1 line 0 comments Download
M util/file/file_io_posix.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +14 lines, -0 lines 0 comments Download
A util/file/file_io_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +207 lines, -0 lines 0 comments Download
M util/file/file_io_win.cc View 1 2 3 4 5 6 7 2 chunks +41 lines, -4 lines 0 comments Download
M util/test/errors.h View 1 2 3 4 5 6 2 chunks +11 lines, -0 lines 0 comments Download
M util/test/errors.cc View 1 2 3 4 5 6 7 2 chunks +13 lines, -1 line 0 comments Download
A util/test/thread.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +70 lines, -0 lines 0 comments Download
A + util/test/thread.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +6 lines, -4 lines 0 comments Download
A + util/test/thread_posix.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +20 lines, -10 lines 0 comments Download
A + util/test/thread_win.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +21 lines, -10 lines 0 comments Download
M util/util.gyp View 1 2 3 4 5 6 7 2 chunks +5 lines, -0 lines 0 comments Download

Messages

Total messages: 20 (2 generated)
scottmg
5 years, 9 months ago (2015-03-11 22:15:18 UTC) #2
Mark Mentovai
https://codereview.chromium.org/1001673002/diff/60001/util/file/file_io_posix.cc File util/file/file_io_posix.cc (right): https://codereview.chromium.org/1001673002/diff/60001/util/file/file_io_posix.cc#newcode106 util/file/file_io_posix.cc:106: int rv = HANDLE_EINTR(flock(file, operation)); Since we’re moving away ...
5 years, 9 months ago (2015-03-12 04:47:42 UTC) #3
Robert Sesek
https://codereview.chromium.org/1001673002/diff/60001/util/file/file_io.h File util/file/file_io.h (right): https://codereview.chromium.org/1001673002/diff/60001/util/file/file_io.h#newcode194 util/file/file_io.h:194: //! (that is, no CRLF translation). On Windows, the ...
5 years, 9 months ago (2015-03-12 15:28:03 UTC) #4
scottmg
Sorry for the delay between revisions, hair fires on M41 push. I'm confused by the ...
5 years, 9 months ago (2015-03-19 22:06:20 UTC) #5
Mark Mentovai
Glad to see this come back! https://codereview.chromium.org/1001673002/diff/60001/util/file/file_io_posix.cc File util/file/file_io_posix.cc (right): https://codereview.chromium.org/1001673002/diff/60001/util/file/file_io_posix.cc#newcode106 util/file/file_io_posix.cc:106: int rv = ...
5 years, 9 months ago (2015-03-20 15:03:56 UTC) #6
Mark Mentovai
P.S. https://codereview.chromium.org/1001673002/diff/90009/util/test/thread.h File util/test/thread.h (right): https://codereview.chromium.org/1001673002/diff/90009/util/test/thread.h#newcode31 util/test/thread.h:31: class Thread { Provide at least a //! ...
5 years, 9 months ago (2015-03-20 15:42:12 UTC) #7
Robert Sesek
https://codereview.chromium.org/1001673002/diff/90009/util/file/file_io_test.cc File util/file/file_io_test.cc (right): https://codereview.chromium.org/1001673002/diff/90009/util/file/file_io_test.cc#newcode103 util/file/file_io_test.cc:103: base::subtle::Atomic32 actual_iterations = 0; On 2015/03/20 15:03:55, Mark Mentovai ...
5 years, 9 months ago (2015-03-20 16:31:35 UTC) #8
scottmg
https://codereview.chromium.org/1001673002/diff/60001/util/file/file_io_posix.cc File util/file/file_io_posix.cc (right): https://codereview.chromium.org/1001673002/diff/60001/util/file/file_io_posix.cc#newcode106 util/file/file_io_posix.cc:106: int rv = HANDLE_EINTR(flock(file, operation)); On 2015/03/20 15:03:54, Mark ...
5 years, 9 months ago (2015-03-20 21:07:35 UTC) #9
Mark Mentovai
This is really good now, the remaining things are all really minor. I think the ...
5 years, 9 months ago (2015-03-20 22:11:37 UTC) #10
scottmg
Thanks https://codereview.chromium.org/1001673002/diff/190001/util/file/file_io.h File util/file/file_io.h (right): https://codereview.chromium.org/1001673002/diff/190001/util/file/file_io.h#newcode206 util/file/file_io.h:206: //! \brief Locks the given \a file similar ...
5 years, 9 months ago (2015-03-20 22:32:53 UTC) #12
Mark Mentovai
LGTM. This is really solid now. https://codereview.chromium.org/1001673002/diff/230001/util/file/file_io_test.cc File util/file/file_io_test.cc (right): https://codereview.chromium.org/1001673002/diff/230001/util/file/file_io_test.cc#newcode189 util/file/file_io_test.cc:189: EXPECT_EQ(expected_iterations, actual_iterations); Release_Load ...
5 years, 9 months ago (2015-03-20 22:41:47 UTC) #13
scottmg
https://codereview.chromium.org/1001673002/diff/230001/util/file/file_io_test.cc File util/file/file_io_test.cc (right): https://codereview.chromium.org/1001673002/diff/230001/util/file/file_io_test.cc#newcode189 util/file/file_io_test.cc:189: EXPECT_EQ(expected_iterations, actual_iterations); On 2015/03/20 22:41:46, Mark Mentovai wrote: > ...
5 years, 9 months ago (2015-03-20 22:45:34 UTC) #14
scottmg
Committed patchset #13 (id:250001) manually as 79ae055e50b1acd5050795a7ac9b5bc0afcee2d9 (presubmit successful).
5 years, 9 months ago (2015-03-20 22:46:00 UTC) #15
Robert Sesek
https://codereview.chromium.org/1001673002/diff/230001/util/file/file_io_posix.cc File util/file/file_io_posix.cc (right): https://codereview.chromium.org/1001673002/diff/230001/util/file/file_io_posix.cc#newcode105 util/file/file_io_posix.cc:105: int operation = locking == FileLocking::kShared ? LOCK_SH : ...
5 years, 9 months ago (2015-03-20 22:46:55 UTC) #16
Mark Mentovai
https://codereview.chromium.org/1001673002/diff/230001/util/file/file_io_posix.cc File util/file/file_io_posix.cc (right): https://codereview.chromium.org/1001673002/diff/230001/util/file/file_io_posix.cc#newcode106 util/file/file_io_posix.cc:106: int rv = HANDLE_EINTR(flock(file, operation)); Robert Sesek wrote: > ...
5 years, 9 months ago (2015-03-20 22:59:21 UTC) #17
Mark Mentovai
https://codereview.chromium.org/1001673002/diff/230001/util/test/thread_win.cc File util/test/thread_win.cc (right): https://codereview.chromium.org/1001673002/diff/230001/util/test/thread_win.cc#newcode31 util/test/thread_win.cc:31: ASSERT_FALSE(platform_thread_); Whoops, should have been ASSERT_TRUE.
5 years, 9 months ago (2015-03-20 23:02:24 UTC) #18
scottmg
Sorry, didn't mean to rush in before you'd had a chance to review. https://codereview.chromium.org/1001673002/diff/230001/util/file/file_io_posix.cc File ...
5 years, 9 months ago (2015-03-20 23:03:20 UTC) #19
scottmg
5 years, 9 months ago (2015-03-20 23:09:09 UTC) #20
Message was sent while issue was closed.
Gah, followup here: https://codereview.chromium.org/1022203002/

https://codereview.chromium.org/1001673002/diff/230001/util/test/thread_win.cc
File util/test/thread_win.cc (right):

https://codereview.chromium.org/1001673002/diff/230001/util/test/thread_win.c...
util/test/thread_win.cc:31: ASSERT_FALSE(platform_thread_);
On 2015/03/20 23:02:24, Mark Mentovai wrote:
> Whoops, should have been ASSERT_TRUE.

! Done.

Powered by Google App Engine
This is Rietveld 408576698