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

Issue 1410713009: Add negative test case for CompareAndSwap. (Closed)

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

Description

Add negative test case for CompareAndSwap. Make sure that CompareAndSwap isn't doing things when it shouldn't. This also doubles as an example of how to detect "failure" if someone is trying to figure out how to use CompareAndSwap. BUG= Committed: https://crrev.com/85c5a0a91d503d4cf4b5101ec0c83e9299f7074b Cr-Commit-Position: refs/heads/master@{#357555}

Patch Set 1 #

Total comments: 3

Patch Set 2 : added comment explaining test #

Total comments: 2

Patch Set 3 : removed double space #

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

Messages

Total messages: 18 (5 generated)
bcwhite
5 years, 1 month ago (2015-11-02 20:28:43 UTC) #2
danakj
> Make sure that CAS isn't doing things when it shouldn't. This Can you write ...
5 years, 1 month ago (2015-11-02 21:11:28 UTC) #4
danakj
LGTM https://codereview.chromium.org/1410713009/diff/1/base/atomicops_unittest.cc File base/atomicops_unittest.cc (right): https://codereview.chromium.org/1410713009/diff/1/base/atomicops_unittest.cc#newcode92 base/atomicops_unittest.cc:92: AtomicType fail = base::subtle::NoBarrier_CompareAndSwap(&value, 0, 2); nit: i'd ...
5 years, 1 month ago (2015-11-02 21:18:36 UTC) #5
bcwhite
https://codereview.chromium.org/1410713009/diff/1/base/atomicops_unittest.cc File base/atomicops_unittest.cc (right): https://codereview.chromium.org/1410713009/diff/1/base/atomicops_unittest.cc#newcode92 base/atomicops_unittest.cc:92: AtomicType fail = base::subtle::NoBarrier_CompareAndSwap(&value, 0, 2); On 2015/11/02 21:18:36, ...
5 years, 1 month ago (2015-11-02 23:02:30 UTC) #7
danakj
LGTM :) https://codereview.chromium.org/1410713009/diff/1/base/atomicops_unittest.cc File base/atomicops_unittest.cc (right): https://codereview.chromium.org/1410713009/diff/1/base/atomicops_unittest.cc#newcode92 base/atomicops_unittest.cc:92: AtomicType fail = base::subtle::NoBarrier_CompareAndSwap(&value, 0, 2); On ...
5 years, 1 month ago (2015-11-02 23:05:45 UTC) #8
Alexander Potapenko
lgtm https://codereview.chromium.org/1410713009/diff/20001/base/atomicops_unittest.cc File base/atomicops_unittest.cc (right): https://codereview.chromium.org/1410713009/diff/20001/base/atomicops_unittest.cc#newcode93 base/atomicops_unittest.cc:93: // expected number. CAS will always return the ...
5 years, 1 month ago (2015-11-02 23:06:42 UTC) #9
Alexander Potapenko
lgtm lgtm https://codereview.chromium.org/1410713009/diff/20001/base/atomicops_unittest.cc File base/atomicops_unittest.cc (right): https://codereview.chromium.org/1410713009/diff/20001/base/atomicops_unittest.cc#newcode93 base/atomicops_unittest.cc:93: // expected number. CAS will always return ...
5 years, 1 month ago (2015-11-02 23:06:43 UTC) #10
Alexander Potapenko
lgtm lgtm lgtm
5 years, 1 month ago (2015-11-02 23:06:45 UTC) #11
Alexander Potapenko
On 2015/11/02 23:06:45, Alexander Potapenko wrote: > lgtm > > lgtm > > lgtm Hm, ...
5 years, 1 month ago (2015-11-02 23:07:37 UTC) #12
bcwhite
https://codereview.chromium.org/1410713009/diff/20001/base/atomicops_unittest.cc File base/atomicops_unittest.cc (right): https://codereview.chromium.org/1410713009/diff/20001/base/atomicops_unittest.cc#newcode93 base/atomicops_unittest.cc:93: // expected number. CAS will always return the actual ...
5 years, 1 month ago (2015-11-03 15:11:36 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1410713009/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1410713009/40001
5 years, 1 month ago (2015-11-03 15:12:24 UTC) #16
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years, 1 month ago (2015-11-03 18:19:13 UTC) #17
commit-bot: I haz the power
5 years, 1 month ago (2015-11-03 18:20:33 UTC) #18
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/85c5a0a91d503d4cf4b5101ec0c83e9299f7074b
Cr-Commit-Position: refs/heads/master@{#357555}

Powered by Google App Engine
This is Rietveld 408576698