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

Issue 1394803002: Unittest for the locking in APM (Closed)

Created:
5 years, 2 months ago by peah-webrtc
Modified:
5 years, 1 month ago
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com, hlundin-webrtc, aluebs-webrtc, bjornv1, ivoc
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Added unittest of the locking functionality in the audio processing module The test is currently disabled as it takes too long to run in a coffe-cup manner BUG=webrtc:5099 Committed: https://crrev.com/1f1912d1f0432c5ddc208b9f7f2b1c1bf210b79a Cr-Commit-Position: refs/heads/master@{#10560}

Patch Set 1 #

Total comments: 56

Patch Set 2 : Updates in response to reviewer comments #

Patch Set 3 : Added missing test disabling by default #

Patch Set 4 : Added a brief level of unittest #

Patch Set 5 : Added threadsafe random value generator and redesigned the shared to local state-variable copy #

Patch Set 6 : Changed the random generator name and description #

Patch Set 7 : Changed name of the random number generator #

Total comments: 70

Patch Set 8 : Various fixes in response to reviewer comments #

Total comments: 12

Patch Set 9 : Moved initialization to struct constructors, moved testcase generators to the TestCase class, fixed… #

Patch Set 10 : Split the code for the different threads into three classes. Added some refactoring of the test cas… #

Patch Set 11 : Fixed an erroneous thruth check" #

Total comments: 18

Patch Set 12 : Changes in rensponse to reviewer comments. #

Total comments: 5

Patch Set 13 : Fixed bug returning the wrong counter #

Patch Set 14 : Merge #

Patch Set 15 : Removed failing and non-possible output check #

Patch Set 16 : Latest merged code #

Patch Set 17 : Replaced asserts by FAIL #

Total comments: 62

Patch Set 18 : Response to reviewer comments #

Total comments: 12

Patch Set 19 : Changes in response to lastest reviewer comments #

Total comments: 4

Patch Set 20 : Changes according to latest excellent reviewer comments #

Patch Set 21 : Corrected the use of rtc::Random to be on par with latest changes in master #

Patch Set 22 : Correction of the previous patch set #

Patch Set 23 : Removed keyboard from the channel data specification that crashed test #

Patch Set 24 : Fixed include path from merge that broke build. #

Patch Set 25 : Disabled the brief lock test as it does not yet pass through memory sanitizer (until the new lock s… #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1119 lines, -0 lines) Patch
A webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +1118 lines, -0 lines 0 comments Download
M webrtc/modules/modules.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 59 (12 generated)
peah-webrtc
I added an extensive unittest for the locking scheme in the APM. It is disabled ...
5 years, 2 months ago (2015-10-08 11:40:08 UTC) #2
minyue-webrtc
On 2015/10/08 11:40:08, peah-webrtc wrote: > I added an extensive unittest for the locking scheme ...
5 years, 2 months ago (2015-10-08 12:02:20 UTC) #3
the sun
https://codereview.webrtc.org/1394803002/diff/1/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc File webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc (right): https://codereview.webrtc.org/1394803002/diff/1/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc#newcode247 webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc:247: int max_absolute_value, amplitude? https://codereview.webrtc.org/1394803002/diff/1/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc#newcode251 webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc:251: for (int ch = ...
5 years, 2 months ago (2015-10-08 12:38:10 UTC) #4
the sun
On 2015/10/08 12:02:20, minyue-webrtc wrote: > On 2015/10/08 11:40:08, peah-webrtc wrote: > > I added ...
5 years, 2 months ago (2015-10-08 12:40:39 UTC) #5
kwiberg-webrtc
+1 to Minyue's idea about putting it in a separate binary. https://codereview.webrtc.org/1394803002/diff/1/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc File webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc (right): ...
5 years, 2 months ago (2015-10-08 13:25:22 UTC) #6
minyue-webrtc
On 2015/10/08 12:40:39, the sun wrote: > On 2015/10/08 12:02:20, minyue-webrtc wrote: > > On ...
5 years, 2 months ago (2015-10-08 13:46:45 UTC) #7
ivoc
https://codereview.webrtc.org/1394803002/diff/1/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc File webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc (right): https://codereview.webrtc.org/1394803002/diff/1/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc#newcode19 webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc:19: #include "webrtc/base/criticalsection.h" These should be in alphabetical order, I ...
5 years, 2 months ago (2015-10-09 15:47:15 UTC) #9
peah-webrtc
Thanks for all the great review comments! I have made changes in response to the ...
5 years, 2 months ago (2015-10-13 06:58:40 UTC) #10
peah-webrtc
Missed part of the text in the previous message, therefore I send the message again: ...
5 years, 2 months ago (2015-10-13 06:59:18 UTC) #11
kwiberg-webrtc
https://codereview.webrtc.org/1394803002/diff/1/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc File webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc (right): https://codereview.webrtc.org/1394803002/diff/1/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc#newcode523 webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc:523: } On 2015/10/13 06:58:39, peah-webrtc wrote: > On 2015/10/08 ...
5 years, 2 months ago (2015-10-13 09:35:12 UTC) #12
peah-webrtc
Added threadsafe random value generator and redesigned the shared to local state-variable copy https://codereview.webrtc.org/1394803002/diff/1/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc File ...
5 years, 2 months ago (2015-10-14 07:57:13 UTC) #13
peah-webrtc
5 years, 2 months ago (2015-10-14 12:21:15 UTC) #14
peah-webrtc
Any more comments on this? I actually realized that the huge (disabled) test causes the ...
5 years, 2 months ago (2015-10-23 09:14:38 UTC) #17
peah-webrtc
https://codereview.webrtc.org/1394803002/diff/1/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc File webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc (right): https://codereview.webrtc.org/1394803002/diff/1/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc#newcode256 webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc:256: static_cast<float>((rand_r(seed) % (32768 + 32768 + 1)) - 32768) ...
5 years, 1 month ago (2015-10-26 07:34:40 UTC) #18
kwiberg-webrtc
I like the effect of separating each thread's private variables from the shared ones. But ...
5 years, 1 month ago (2015-10-26 14:43:15 UTC) #19
hlundin-webrtc
See comments inline. https://codereview.webrtc.org/1394803002/diff/120001/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc File webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc (right): https://codereview.webrtc.org/1394803002/diff/120001/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc#newcode53 webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc:53: BasicWebRtcAecSettingsWithExtentedFilter, I gather that BasicWebRtcAecSettingsWith* alters ...
5 years, 1 month ago (2015-10-27 10:54:25 UTC) #20
the sun
https://codereview.webrtc.org/1394803002/diff/120001/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc File webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc (right): https://codereview.webrtc.org/1394803002/diff/120001/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc#newcode69 webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc:69: class ThreadSafeRandomNumberGenerator { Please use webrtc/test/random.h instead. https://codereview.webrtc.org/1394803002/diff/120001/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc#newcode85 webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc:85: ...
5 years, 1 month ago (2015-10-27 11:02:15 UTC) #21
peah-webrtc
https://codereview.webrtc.org/1394803002/diff/120001/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc File webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc (right): https://codereview.webrtc.org/1394803002/diff/120001/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc#newcode53 webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc:53: BasicWebRtcAecSettingsWithExtentedFilter, On 2015/10/27 10:54:24, hlundin-webrtc wrote: > I gather ...
5 years, 1 month ago (2015-10-29 09:00:09 UTC) #22
peah-webrtc
In order to be able to use the functionality in random.h I needed to do ...
5 years, 1 month ago (2015-10-29 09:06:31 UTC) #23
hlundin-webrtc
LGTM with one nit. https://codereview.webrtc.org/1394803002/diff/140001/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc File webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc (right): https://codereview.webrtc.org/1394803002/diff/140001/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc#newcode296 webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc:296: return rand_gen_.Rand(-amplitude, amplitude); Does this ...
5 years, 1 month ago (2015-10-29 09:13:22 UTC) #24
the sun
https://codereview.webrtc.org/1394803002/diff/140001/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc File webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc (right): https://codereview.webrtc.org/1394803002/diff/140001/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc#newcode37 webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc:37: }; nit: space between the enum declarations https://codereview.webrtc.org/1394803002/diff/140001/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc#newcode80 webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc:80: ...
5 years, 1 month ago (2015-10-29 10:31:31 UTC) #25
peah-webrtc
https://codereview.webrtc.org/1394803002/diff/140001/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc File webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc (right): https://codereview.webrtc.org/1394803002/diff/140001/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc#newcode37 webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc:37: }; On 2015/10/29 10:31:30, the sun wrote: > nit: ...
5 years, 1 month ago (2015-10-29 14:26:51 UTC) #26
peah-webrtc
Quite extensive code changes: -Split the code for the different threads into three separate classes ...
5 years, 1 month ago (2015-11-02 22:53:24 UTC) #27
kwiberg-webrtc
Looks *much* better now. My remaining main concern is that even in this componentized state, ...
5 years, 1 month ago (2015-11-04 07:08:25 UTC) #28
peah-webrtc
Regarding: <Looks *much* better now. My remaining main concern is that <even in this <componentized ...
5 years, 1 month ago (2015-11-04 09:07:16 UTC) #29
kwiberg-webrtc
lgtm Fix nits and suggestions as you see fit. https://codereview.webrtc.org/1394803002/diff/200001/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc File webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc (right): https://codereview.webrtc.org/1394803002/diff/200001/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc#newcode198 webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc:198: ...
5 years, 1 month ago (2015-11-04 09:49:16 UTC) #30
the sun
https://codereview.webrtc.org/1394803002/diff/220001/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc File webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc (right): https://codereview.webrtc.org/1394803002/diff/220001/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc#newcode640 webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc:640: assert(false); FAIL(), RTC_NOTREACHED() or ASSERT_TRUE(false)
5 years, 1 month ago (2015-11-04 12:36:40 UTC) #31
peah-webrtc
https://codereview.webrtc.org/1394803002/diff/200001/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc File webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc (right): https://codereview.webrtc.org/1394803002/diff/200001/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc#newcode198 webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc:198: std::vector<TestConfig> tmp_test_configs; On 2015/11/04 09:49:16, kwiberg-webrtc wrote: > On ...
5 years, 1 month ago (2015-11-05 10:10:09 UTC) #32
kwiberg-webrtc
lgtm https://codereview.webrtc.org/1394803002/diff/220001/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc File webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc (right): https://codereview.webrtc.org/1394803002/diff/220001/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc#newcode640 webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc:640: assert(false); On 2015/11/05 10:10:09, peah-webrtc wrote: > On ...
5 years, 1 month ago (2015-11-05 10:15:23 UTC) #33
peah-webrtc
https://codereview.webrtc.org/1394803002/diff/220001/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc File webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc (right): https://codereview.webrtc.org/1394803002/diff/220001/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc#newcode640 webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc:640: assert(false); On 2015/11/05 10:15:23, kwiberg-webrtc wrote: > On 2015/11/05 ...
5 years, 1 month ago (2015-11-05 10:21:56 UTC) #34
hlundin-webrtc
You have my rubber-stamp LGTM pending the other reviewers.
5 years, 1 month ago (2015-11-05 12:01:35 UTC) #35
the sun
https://codereview.webrtc.org/1394803002/diff/320001/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc File webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc (right): https://codereview.webrtc.org/1394803002/diff/320001/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc#newcode16 webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc:16: #include "testing/gmock/include/gmock/gmock.h" not mocking anything. really needed? https://codereview.webrtc.org/1394803002/diff/320001/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc#newcode31 webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc:31: ...
5 years, 1 month ago (2015-11-05 12:27:50 UTC) #36
ivoc
LGTM with small nit. https://codereview.webrtc.org/1394803002/diff/320001/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc File webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc (right): https://codereview.webrtc.org/1394803002/diff/320001/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc#newcode50 webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc:50: static_cast<float>(rand_gen->Rand(-32767 - 1, 32767)) / ...
5 years, 1 month ago (2015-11-05 12:28:54 UTC) #37
peah-webrtc
https://codereview.webrtc.org/1394803002/diff/320001/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc File webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc (right): https://codereview.webrtc.org/1394803002/diff/320001/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc#newcode16 webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc:16: #include "testing/gmock/include/gmock/gmock.h" On 2015/11/05 12:27:49, the sun wrote: > ...
5 years, 1 month ago (2015-11-05 14:48:52 UTC) #38
the sun
https://codereview.webrtc.org/1394803002/diff/320001/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc File webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc (right): https://codereview.webrtc.org/1394803002/diff/320001/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc#newcode31 webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc:31: class AudioProcessingImplLockTest; On 2015/11/05 14:48:51, peah-webrtc wrote: > On ...
5 years, 1 month ago (2015-11-05 15:05:01 UTC) #39
the sun
https://codereview.webrtc.org/1394803002/diff/320001/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc File webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc (right): https://codereview.webrtc.org/1394803002/diff/320001/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc#newcode612 webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc:612: const float CaptureProcessor::kCaptureInputFloatLevel = 0.03125f; On 2015/11/05 14:48:51, peah-webrtc ...
5 years, 1 month ago (2015-11-05 15:31:15 UTC) #40
peah-webrtc
https://codereview.webrtc.org/1394803002/diff/340001/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc File webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc (right): https://codereview.webrtc.org/1394803002/diff/340001/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc#newcode47 webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc:47: frame[ch][k] = (amplitude * rand_gen->Rand(-32767 - 1, 32767) / ...
5 years, 1 month ago (2015-11-06 06:31:18 UTC) #41
the sun
https://codereview.webrtc.org/1394803002/diff/360001/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc File webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc (right): https://codereview.webrtc.org/1394803002/diff/360001/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc#newcode250 webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc:250: if (ValidTestConfig(test_config)) { So this shouldn't be needed now ...
5 years, 1 month ago (2015-11-06 09:02:05 UTC) #42
peah-webrtc
https://codereview.webrtc.org/1394803002/diff/360001/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc File webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc (right): https://codereview.webrtc.org/1394803002/diff/360001/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc#newcode250 webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc:250: if (ValidTestConfig(test_config)) { On 2015/11/06 09:02:05, the sun wrote: ...
5 years, 1 month ago (2015-11-06 10:14:38 UTC) #43
the sun
lgtm, ship it!
5 years, 1 month ago (2015-11-06 10:19:02 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1394803002/420001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1394803002/420001
5 years, 1 month ago (2015-11-06 14:04:10 UTC) #47
commit-bot: I haz the power
Try jobs failed on following builders: linux_tsan2 on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/linux_tsan2/builds/7827)
5 years, 1 month ago (2015-11-06 14:27:02 UTC) #49
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1394803002/460001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1394803002/460001
5 years, 1 month ago (2015-11-09 08:21:06 UTC) #52
commit-bot: I haz the power
Try jobs failed on following builders: win_drmemory_light on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/win_drmemory_light/builds/7710)
5 years, 1 month ago (2015-11-09 08:52:48 UTC) #54
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1394803002/480001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1394803002/480001
5 years, 1 month ago (2015-11-09 10:22:59 UTC) #57
commit-bot: I haz the power
Committed patchset #25 (id:480001)
5 years, 1 month ago (2015-11-09 11:13:23 UTC) #58
commit-bot: I haz the power
5 years, 1 month ago (2015-11-09 11:13:33 UTC) #59
Message was sent while issue was closed.
Patchset 25 (id:??) landed as
https://crrev.com/1f1912d1f0432c5ddc208b9f7f2b1c1bf210b79a
Cr-Commit-Position: refs/heads/master@{#10560}

Powered by Google App Engine
This is Rietveld 408576698