History log of /external/webrtc/webrtc/base/thread_checker_unittest.cc
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
e2976c87f7ba627fa1e1246f0ccfb34b4b9f3a73 04-Jan-2016 Peter Boström <pbos@webrtc.org> Remove DISABLED_ON_ macros.

Macro incorrectly displays DISABLED_ON_ANDROID in test names for
parameterized tests under --gtest_list_tests, causing tests to be
disabled on all platforms since they contain the DISABLED_ prefix rather
than their expanded variants.

This expands the macro variants to inline if they're disabled or not,
and removes building some tests under configurations where they should
fail, instead of building them but disabling them by default.

The change also removes gtest_disable.h as an unused include from many
other files.

BUG=webrtc:5387, webrtc:5400
R=kjellander@webrtc.org, phoglund@webrtc.org
TBR=henrik.lundin@webrtc.org

Review URL: https://codereview.webrtc.org/1547343002 .

Cr-Commit-Position: refs/heads/master@{#11150}
/external/webrtc/webrtc/base/thread_checker_unittest.cc
91d6edef35e7275879c30ce16ecb8b6dc73c6e4a 17-Sep-2015 henrikg <henrikg@webrtc.org> Add RTC_ prefix to (D)CHECKs and related macros.

We must remove dependency on Chromium, i.e. we can't use Chromium's base/logging.h. That means we need to define these macros in WebRTC also when doing Chromium builds. And this causes redefinition.

Alternative solutions:
* Check if we already have defined e.g. CHECK, and don't define them in that case. This makes us depend on include order in Chromium, which is not acceptable.
* Don't allow using the macros in WebRTC headers. Error prone since if someone adds it there by mistake it may compile fine, but later break if a header in added or order is changed in Chromium. That will be confusing and hard to enforce.
* Ensure that headers that are included by an embedder don't include our macros. This would require some heavy refactoring to be maintainable and enforcable.
* Changes in Chromium for this is obviously not an option.

BUG=chromium:468375
NOTRY=true

Review URL: https://codereview.webrtc.org/1335923002

Cr-Commit-Position: refs/heads/master@{#9964}
/external/webrtc/webrtc/base/thread_checker_unittest.cc
3c089d751ede283e21e186885eaf705c3257ccd2 16-Sep-2015 henrikg <henrikg@webrtc.org> Add RTC_ prefix to contructormagic macros.

We must remove dependency on Chromium, i.e. we can't use Chromium's base/logging.h. That means we need to define these macros in WebRTC also when doing Chromium builds. And this causes redefinition.

* DISALLOW_ASSIGN -> RTC_DISALLOW_ASSIGN
* DISALLOW_COPY_AND_ASSIGN -> RTC_DISALLOW_COPY_AND_ASSIGN
* DISALLOW_IMPLICIT_CONSTRUCTORS -> RTC_DISALLOW_IMPLICIT_CONSTRUCTORS

Related CL: https://codereview.webrtc.org/1335923002/

BUG=chromium:468375
NOTRY=true

Review URL: https://codereview.webrtc.org/1345433002

Cr-Commit-Position: refs/heads/master@{#9953}
/external/webrtc/webrtc/base/thread_checker_unittest.cc
14665ff7d4024d07e58622f498b23fd980001871 04-Mar-2015 kjellander@webrtc.org <kjellander@webrtc.org> Roll chromium_revision e144d30..6fdb142 (318658:318841) + remove OVERRIDE macro

Clang version changed 223108:230914
Details: https://chromium.googlesource.com/chromium/src/+/e144d30..6fdb142/tools/clang/scripts/update.sh

Removes the OVERRIDE macro defined in:
* webrtc/base/common.h
* webrtc/typedefs.h

The majority of the source changes were done by running this in src/:
perl -0pi -e "s/virtual\s([^({;]*(\([^({;]*\)[^({;]*))(OVERRIDE|override)/\1override/sg" `find {talk,webrtc} -name "*.h" -o -name "*.cc*" -o -name "*.mm*"`

which converted all:
virtual Foo() OVERRIDE
functions to:
Foo() override

Then I manually edited:
* talk/media/webrtc/fakewebrtccommon.h
* webrtc/test/fake_common.h

Remaining uses of OVERRIDE was fixed by search+replace.

Manual edits were done to fix virtual destructors that were
overriding inherited ones.

Finally a build error related to the pure virtual definitions of
Read, Write and Rewind in common_types.h required a bit of
refactoring in:
* webrtc/common_types.cc
* webrtc/common_types.h
* webrtc/system_wrappers/interface/file_wrapper.h
* webrtc/system_wrappers/source/file_impl.cc

This roll should make it possible for us to finally re-enable deadlock
detection for TSan on the buildbots.

BUG=4106
R=pbos@webrtc.org, tommi@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/41069004

Cr-Commit-Position: refs/heads/master@{#8596}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8596 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/base/thread_checker_unittest.cc
2eb166079130628f908f07538333130e6885c12d 07-Feb-2015 tommi@webrtc.org <tommi@webrtc.org> Switch ThreadCheckerImpl over to using PlatformThreadRef.
Like PlatformThreadId, this type is borrowed from Chromium.
The difference between the two is that PlatformThreadRef is pthread_t on posix platforms.
On Windows PlatformThreadRef and PlatformThreadId are the same thing.

The reason for this switch is pretty crazy. On Chromium's "Mac 10.9 dbg" bot,
we have been seeing the following code:

ThreadCheckerImpl::ThreadCheckerImpl() : valid_thread_(CurrentThreadId()) {
fprintf(stderr, "*** valid=%d\n", valid_thread_);
valid_thread_ = CurrentThreadId();
fprintf(stderr, "*** valid after=%d\n", valid_thread_);
}

print this:

*** valid=946872320
*** valid after=5647

This is for the same thread checker instance.

What's worse is that printing out what CurrentThreadId was returning, yielded that it was always returning 5647.

After switching over to pthread_t on Mac, this stopped happening.
So, to remove the current hack, reinstate the class on Mac and take a look at the next problem, I'm switching to pthread_t.
Really looking forward to truly getting to the bottom of this.

Tbr-ing since the build is essentially broken (we can't roll).

TBR=pbos@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/37199004

Cr-Commit-Position: refs/heads/master@{#8283}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8283 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/base/thread_checker_unittest.cc
13a0e184eeb21d6dd68828f600d5886d7550fdf6 06-Feb-2015 tommi@webrtc.org <tommi@webrtc.org> Temporarily disable a couple of ThreadChecker tests on Mac.

TBR=magjed@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/37969004

Cr-Commit-Position: refs/heads/master@{#8272}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8272 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/base/thread_checker_unittest.cc
7f7b0a1cdd43a7facda2d28fef522132db08fbd1 10-Oct-2014 henrike@webrtc.org <henrike@webrtc.org> Re-enable ThreadCheckerDeathTest.MethodNotAllowedOnDifferentThreadInDebug (missed when enabling other base tests).

BUG=3836
R=marpan@google.com

Review URL: https://webrtc-codereview.appspot.com/24909004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7425 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/base/thread_checker_unittest.cc
c732a3e5113bd64c85eeefa7a2ed3a5076e3db87 10-Oct-2014 henrike@webrtc.org <henrike@webrtc.org> Re-enable allmost all base tests.

BUG=3836
R=marpan@google.com

Review URL: https://webrtc-codereview.appspot.com/22989004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7416 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/base/thread_checker_unittest.cc
34ac7762e0e202b3fab859f28aa6a177b1878953 19-Sep-2014 kjellander@webrtc.org <kjellander@webrtc.org> Additional disabled tests in rtc_unittests.

It appears https://review.webrtc.org/30449004 was
not enough to get rtc_unittests up and running.

BUG=3836
TEST=Locally passing rtc_unittests on Mac Debug.
R=henrike@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/27559004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7241 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/base/thread_checker_unittest.cc
fded02c164ea4cc3d28d7f30ac9ce9d94d76ef7a 19-Sep-2014 henrike@webrtc.org <henrike@webrtc.org> base: disabled several base tests on Mac so that rtc_unittests can be turned back on

BUG=N/A
R=kjellander@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/30449004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7240 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/base/thread_checker_unittest.cc
18617cfde8537293ab3fa537f7231b5007844cb3 15-Sep-2014 henrik.lundin@webrtc.org <henrik.lundin@webrtc.org> Fix ThreadChecker unittests when DCHECK_ALWAYS_ON is defined

This requires two fixes:
1. Use DCHECK instead of assert in ThreadChecker's unittest.

2. Activate DCHECK when DCHECK_ALWAYS_ON in enabled.

Both these modifications are in line with Chromium's implementation.
The ThreadChecker unittest was changed to use assert instead of DCHECK
on the initial import (since WebRTC did not have a DCHECK back then).

BUG=3803
TEST=local out/{Debug,Release}/rtc_unittests built with and without DCHECK_ALWAYS_ON
R=andrew@webrtc.org, pbos@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/24569004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7178 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/base/thread_checker_unittest.cc
78b2d56ac67c88820bc69fce9141986ca10350f0 12-Sep-2014 henrike@webrtc.org <henrike@webrtc.org> Disable MethodNotAllowedOnDifferentThreadInDebug.

BUG=3803
R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/19339004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7167 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/base/thread_checker_unittest.cc
1e3c5c248a5314b08765c1f629be5a4409d74013 16-Jun-2014 henrik.lundin@webrtc.org <henrik.lundin@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Importing ThreadChecker class from Chromium

The ThreadChecker class is imported/re-implemented from Chromium.
The implementation is changed to depend on WebRTC primitives.

R=andrew@webrtc.org, henrike@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/21649004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6446 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/base/thread_checker_unittest.cc