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

Issue 271513002: [NaCl SDK] nacl_io: Make IRT intercepts (and their test code) more robust. (Closed)

Created:
6 years, 7 months ago by Sam Clegg
Modified:
6 years, 7 months ago
Reviewers:
sbc, binji
CC:
chromium-reviews, binji+watch_chromium.org
Visibility:
Public.

Description

[NaCl SDK] nacl_io: Make IRT intercepts (and their test code) more robust. The kernel_wrap_test.cc tests were previously relying on the global errno value being non-zero before they ran. This change makes the kernel_wrap_ functions do the right thing even when the kernel proxy function don't see errno (as is the case for the mock kernel proxy) and initialises the global errno before each test run. BUG= R=binji@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=270819

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 16

Patch Set 5 : #

Patch Set 6 : #

Total comments: 4

Patch Set 7 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+188 lines, -131 lines) Patch
M native_client_sdk/src/libraries/nacl_io/kernel_intercept.cc View 1 2 4 chunks +4 lines, -0 lines 0 comments Download
M native_client_sdk/src/libraries/nacl_io/kernel_wrap.h View 1 2 3 4 5 2 chunks +15 lines, -0 lines 0 comments Download
M native_client_sdk/src/libraries/nacl_io/kernel_wrap_bionic.cc View 1 2 3 4 8 chunks +27 lines, -34 lines 0 comments Download
M native_client_sdk/src/libraries/nacl_io/kernel_wrap_glibc.cc View 1 2 3 4 5 6 11 chunks +35 lines, -24 lines 0 comments Download
M native_client_sdk/src/libraries/nacl_io/kernel_wrap_newlib.cc View 1 2 3 4 5 7 chunks +35 lines, -36 lines 0 comments Download
M native_client_sdk/src/tests/nacl_io_test/kernel_wrap_test.cc View 1 2 3 4 5 6 16 chunks +72 lines, -36 lines 0 comments Download
M native_client_sdk/src/tests/nacl_io_test/mock_kernel_proxy.h View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 10 (0 generated)
Sam Clegg
6 years, 7 months ago (2014-05-06 23:07:04 UTC) #1
binji
lgtm, though I'd prefer not masking the error. It would be nice to warn at ...
6 years, 7 months ago (2014-05-06 23:25:53 UTC) #2
binji
https://codereview.chromium.org/271513002/diff/60001/native_client_sdk/src/libraries/nacl_io/kernel_wrap_glibc.cc File native_client_sdk/src/libraries/nacl_io/kernel_wrap_glibc.cc (right): https://codereview.chromium.org/271513002/diff/60001/native_client_sdk/src/libraries/nacl_io/kernel_wrap_glibc.cc#newcode292 native_client_sdk/src/libraries/nacl_io/kernel_wrap_glibc.cc:292: return errno; return 0 https://codereview.chromium.org/271513002/diff/60001/native_client_sdk/src/libraries/nacl_io/kernel_wrap_newlib.cc File native_client_sdk/src/libraries/nacl_io/kernel_wrap_newlib.cc (right): https://codereview.chromium.org/271513002/diff/60001/native_client_sdk/src/libraries/nacl_io/kernel_wrap_newlib.cc#newcode116 ...
6 years, 7 months ago (2014-05-06 23:29:52 UTC) #3
binji
https://codereview.chromium.org/271513002/diff/60001/native_client_sdk/src/libraries/nacl_io/kernel_wrap_newlib.cc File native_client_sdk/src/libraries/nacl_io/kernel_wrap_newlib.cc (right): https://codereview.chromium.org/271513002/diff/60001/native_client_sdk/src/libraries/nacl_io/kernel_wrap_newlib.cc#newcode133 native_client_sdk/src/libraries/nacl_io/kernel_wrap_newlib.cc:133: return (signed_nread < 0) ? errno : 0; missed ...
6 years, 7 months ago (2014-05-06 23:31:48 UTC) #4
Sam Clegg
On 2014/05/06 23:25:53, binji wrote: > lgtm, though I'd prefer not masking the error. It ...
6 years, 7 months ago (2014-05-06 23:34:13 UTC) #5
binji
On 2014/05/06 23:34:13, Sam Clegg wrote: > On 2014/05/06 23:25:53, binji wrote: > > lgtm, ...
6 years, 7 months ago (2014-05-06 23:47:07 UTC) #6
Sam Clegg
https://codereview.chromium.org/271513002/diff/60001/native_client_sdk/src/libraries/nacl_io/kernel_wrap_glibc.cc File native_client_sdk/src/libraries/nacl_io/kernel_wrap_glibc.cc (right): https://codereview.chromium.org/271513002/diff/60001/native_client_sdk/src/libraries/nacl_io/kernel_wrap_glibc.cc#newcode151 native_client_sdk/src/libraries/nacl_io/kernel_wrap_glibc.cc:151: // Most kernal intercept functions (ki_*) return -1 and ...
6 years, 7 months ago (2014-05-07 00:29:02 UTC) #7
binji
awesome, lgtm https://codereview.chromium.org/271513002/diff/100001/native_client_sdk/src/libraries/nacl_io/kernel_wrap_bionic.cc File native_client_sdk/src/libraries/nacl_io/kernel_wrap_bionic.cc (left): https://codereview.chromium.org/271513002/diff/100001/native_client_sdk/src/libraries/nacl_io/kernel_wrap_bionic.cc#oldcode175 native_client_sdk/src/libraries/nacl_io/kernel_wrap_bionic.cc:175: return (ki_fchdir(fd)) ? errno : 0; hm, ...
6 years, 7 months ago (2014-05-07 14:58:24 UTC) #8
sbc
https://codereview.chromium.org/271513002/diff/100001/native_client_sdk/src/libraries/nacl_io/kernel_wrap_bionic.cc File native_client_sdk/src/libraries/nacl_io/kernel_wrap_bionic.cc (left): https://codereview.chromium.org/271513002/diff/100001/native_client_sdk/src/libraries/nacl_io/kernel_wrap_bionic.cc#oldcode175 native_client_sdk/src/libraries/nacl_io/kernel_wrap_bionic.cc:175: return (ki_fchdir(fd)) ? errno : 0; On 2014/05/07 14:58:24, ...
6 years, 7 months ago (2014-05-07 15:58:17 UTC) #9
Sam Clegg
6 years, 7 months ago (2014-05-15 21:15:31 UTC) #10
Message was sent while issue was closed.
Committed patchset #7 manually as r270819 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698