|
|
Created:
3 years, 12 months ago by Marijn Kruisselbrink Modified:
3 years, 11 months ago CC:
Aaron Boodman, abarth-chromium, chromium-reviews, darin (slow to review), darin-cc_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionAdd tests for how LocalStorageContextMojo interacts with file/leveldb services.
Also fixes bugs exposed by those tests:
- when database does not exists it needs to be created.
- when database can't be opened null is passed to LevelDBWrapper.
BUG=586194
Committed: https://crrev.com/38d9efa1374c0cb319450f965d09f4ac83dc4a09
Cr-Commit-Position: refs/heads/master@{#440886}
Patch Set 1 #Patch Set 2 : make gn happy #Patch Set 3 : fix invalid path test #Patch Set 4 : add init_edk parameter to ServiceTest constructor #Patch Set 5 : rebase #Patch Set 6 : disable tests on android #Patch Set 7 : rebase #Patch Set 8 : reapply change that got lost during rebase #
Messages
Total messages: 60 (48 generated)
The CQ bit was checked by mek@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: cast_shell_android on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/cast_shell_a...) cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linu...)
The CQ bit was checked by mek@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by mek@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
mek@chromium.org changed reviewers: + jam@chromium.org
This is my attempt to add some unit tests that test how LocalStorageContextMojo behaves when it is using the actual file service. The good part, the tests seem to work (and found some bugs). The bad part, they cause content_unittests to quit on exit, with a stack trace like: Received signal 11 <unknown> 000000000000 #0 0x7fd885d2372e base::debug::StackTrace::StackTrace() #1 0x7fd885d2326f base::debug::(anonymous namespace)::StackDumpSignalHandler() #2 0x7fd889101330 <unknown> #3 0x7fd87bc43cd6 _ZN4base8internal13FunctorTraitsIMN4mojo3edk14NodeControllerEFvvEvE6InvokeIPS4_JEEEvS6_OT_DpOT0_ #4 0x7fd87bc72071 _ZN4base8internal12InvokeHelperILb0EvE8MakeItSoIRKMN4mojo3edk15ProcessDelegateEFvvEJPS6_EEEvOT_DpOT0_ #5 0x7fd87bc72017 _ZN4base8internal7InvokerINS0_9BindStateIMN4mojo3edk15ProcessDelegateEFvvEJNS0_17UnretainedWrapperIS5_EEEEEFvvEE7RunImplIRKS7_RKSt5tupleIJS9_EEJLm0EEEEvOT_OT0_NS_13IndexSequenceIJXspT1_EEEE #6 0x7fd87bc71f5c _ZN4base8internal7InvokerINS0_9BindStateIMN4mojo3edk15ProcessDelegateEFvvEJNS0_17UnretainedWrapperIS5_EEEEEFvvEE3RunEPNS0_13BindStateBaseE #7 0x7fd87bc3ef6b base::internal::RunMixin<>::Run() #8 0x7fd87bc3185b mojo::edk::NodeController::AttemptShutdownIfRequested() #9 0x7fd87bc3156a mojo::edk::NodeController::RequestShutdown() #10 0x7fd87bc03a75 mojo::edk::Core::RequestShutdown() #11 0x7fd87bc718af mojo::edk::ShutdownIPCSupport() #12 0x00000218953d mojo::edk::test::ScopedIPCSupport::~ScopedIPCSupport() #13 0x000002189719 mojo::edk::test::ScopedIPCSupport::~ScopedIPCSupport() #14 0x0000007059bf std::default_delete<>::operator()() #15 0x0000017664cc std::unique_ptr<>::reset() #16 0x000001766599 std::unique_ptr<>::~unique_ptr() #17 0x0000017663cf main #18 0x7fd874bc3f45 __libc_start_main #19 0x0000006837e5 <unknown> So apparently/possibly there is something incompatible between how content_unittests sets up mojo, and how service_manager::test::ServiceTest expects things to be setup. But well, I really have no idea how all the low level mojo bits work. Also it's very possible that I should just not be using ServiceTest in content_unittests at all (or that the way I'm using it is wrong). But the tests themselves do seem to actually work, so I don't know.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linu...)
Description was changed from ========== WIP: Add tests for how LocalStorageContextMojo interacts with file/leveldb services. Also fixes bugs exposed by those tests: - when database does not exists it needs to be created. - when database can't be opened null is passed to LevelDBWrapper. BUG=586194 ========== to ========== WIP: Add tests for how LocalStorageContextMojo interacts with file/leveldb services. Also fixes bugs exposed by those tests: - when database does not exists it needs to be created. - when database can't be opened null is passed to LevelDBWrapper. BUG=586194 ==========
jam@chromium.org changed reviewers: + rockot@chromium.org
On 2016/12/22 23:52:08, Marijn Kruisselbrink wrote: > This is my attempt to add some unit tests that test how LocalStorageContextMojo > behaves when it is using the actual file service. The good part, the tests seem > to work (and found some bugs). The bad part, they cause content_unittests to > quit on exit, with a stack trace like: > > Received signal 11 <unknown> 000000000000 > #0 0x7fd885d2372e base::debug::StackTrace::StackTrace() > #1 0x7fd885d2326f base::debug::(anonymous namespace)::StackDumpSignalHandler() > #2 0x7fd889101330 <unknown> > #3 0x7fd87bc43cd6 > _ZN4base8internal13FunctorTraitsIMN4mojo3edk14NodeControllerEFvvEvE6InvokeIPS4_JEEEvS6_OT_DpOT0_ > #4 0x7fd87bc72071 > _ZN4base8internal12InvokeHelperILb0EvE8MakeItSoIRKMN4mojo3edk15ProcessDelegateEFvvEJPS6_EEEvOT_DpOT0_ > #5 0x7fd87bc72017 > _ZN4base8internal7InvokerINS0_9BindStateIMN4mojo3edk15ProcessDelegateEFvvEJNS0_17UnretainedWrapperIS5_EEEEEFvvEE7RunImplIRKS7_RKSt5tupleIJS9_EEJLm0EEEEvOT_OT0_NS_13IndexSequenceIJXspT1_EEEE > #6 0x7fd87bc71f5c > _ZN4base8internal7InvokerINS0_9BindStateIMN4mojo3edk15ProcessDelegateEFvvEJNS0_17UnretainedWrapperIS5_EEEEEFvvEE3RunEPNS0_13BindStateBaseE > #7 0x7fd87bc3ef6b base::internal::RunMixin<>::Run() > #8 0x7fd87bc3185b mojo::edk::NodeController::AttemptShutdownIfRequested() > #9 0x7fd87bc3156a mojo::edk::NodeController::RequestShutdown() > #10 0x7fd87bc03a75 mojo::edk::Core::RequestShutdown() > #11 0x7fd87bc718af mojo::edk::ShutdownIPCSupport() > #12 0x00000218953d mojo::edk::test::ScopedIPCSupport::~ScopedIPCSupport() > #13 0x000002189719 mojo::edk::test::ScopedIPCSupport::~ScopedIPCSupport() > #14 0x0000007059bf std::default_delete<>::operator()() > #15 0x0000017664cc std::unique_ptr<>::reset() > #16 0x000001766599 std::unique_ptr<>::~unique_ptr() > #17 0x0000017663cf main > #18 0x7fd874bc3f45 __libc_start_main > #19 0x0000006837e5 <unknown> > > So apparently/possibly there is something incompatible between how > content_unittests sets up mojo, and how service_manager::test::ServiceTest > expects things to be setup. But well, I really have no idea how all the low > level mojo bits work. Also it's very possible that I should just not be using > ServiceTest in content_unittests at all (or that the way I'm using it is wrong). > But the tests themselves do seem to actually work, so I don't know. +Ken for the test harness issue
On 2016/12/27 at 18:23:37, jam wrote: > On 2016/12/22 23:52:08, Marijn Kruisselbrink wrote: > > This is my attempt to add some unit tests that test how LocalStorageContextMojo > > behaves when it is using the actual file service. The good part, the tests seem > > to work (and found some bugs). The bad part, they cause content_unittests to > > quit on exit, with a stack trace like: > > > > Received signal 11 <unknown> 000000000000 > > #0 0x7fd885d2372e base::debug::StackTrace::StackTrace() > > #1 0x7fd885d2326f base::debug::(anonymous namespace)::StackDumpSignalHandler() > > #2 0x7fd889101330 <unknown> > > #3 0x7fd87bc43cd6 > > _ZN4base8internal13FunctorTraitsIMN4mojo3edk14NodeControllerEFvvEvE6InvokeIPS4_JEEEvS6_OT_DpOT0_ > > #4 0x7fd87bc72071 > > _ZN4base8internal12InvokeHelperILb0EvE8MakeItSoIRKMN4mojo3edk15ProcessDelegateEFvvEJPS6_EEEvOT_DpOT0_ > > #5 0x7fd87bc72017 > > _ZN4base8internal7InvokerINS0_9BindStateIMN4mojo3edk15ProcessDelegateEFvvEJNS0_17UnretainedWrapperIS5_EEEEEFvvEE7RunImplIRKS7_RKSt5tupleIJS9_EEJLm0EEEEvOT_OT0_NS_13IndexSequenceIJXspT1_EEEE > > #6 0x7fd87bc71f5c > > _ZN4base8internal7InvokerINS0_9BindStateIMN4mojo3edk15ProcessDelegateEFvvEJNS0_17UnretainedWrapperIS5_EEEEEFvvEE3RunEPNS0_13BindStateBaseE > > #7 0x7fd87bc3ef6b base::internal::RunMixin<>::Run() > > #8 0x7fd87bc3185b mojo::edk::NodeController::AttemptShutdownIfRequested() > > #9 0x7fd87bc3156a mojo::edk::NodeController::RequestShutdown() > > #10 0x7fd87bc03a75 mojo::edk::Core::RequestShutdown() > > #11 0x7fd87bc718af mojo::edk::ShutdownIPCSupport() > > #12 0x00000218953d mojo::edk::test::ScopedIPCSupport::~ScopedIPCSupport() > > #13 0x000002189719 mojo::edk::test::ScopedIPCSupport::~ScopedIPCSupport() > > #14 0x0000007059bf std::default_delete<>::operator()() > > #15 0x0000017664cc std::unique_ptr<>::reset() > > #16 0x000001766599 std::unique_ptr<>::~unique_ptr() > > #17 0x0000017663cf main > > #18 0x7fd874bc3f45 __libc_start_main > > #19 0x0000006837e5 <unknown> > > > > So apparently/possibly there is something incompatible between how > > content_unittests sets up mojo, and how service_manager::test::ServiceTest > > expects things to be setup. But well, I really have no idea how all the low > > level mojo bits work. Also it's very possible that I should just not be using > > ServiceTest in content_unittests at all (or that the way I'm using it is wrong). > > But the tests themselves do seem to actually work, so I don't know. > > +Ken for the test harness issue ServiceTest (via BackgroundServiceManager) always initializes and shutdown the EDK, but the content_unittests test runner also does this. BackgroundServiceManager::InitParams provides a mechanism to prevent this behavior, but it needs to be plumbed through to ServiceTest::SetUp.
Otherwise ServiceTest usage LG
The CQ bit was checked by mek@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== WIP: Add tests for how LocalStorageContextMojo interacts with file/leveldb services. Also fixes bugs exposed by those tests: - when database does not exists it needs to be created. - when database can't be opened null is passed to LevelDBWrapper. BUG=586194 ========== to ========== Add tests for how LocalStorageContextMojo interacts with file/leveldb services. Also fixes bugs exposed by those tests: - when database does not exists it needs to be created. - when database can't be opened null is passed to LevelDBWrapper. BUG=586194 ==========
On 2016/12/27 at 18:25:36, rockot wrote: > On 2016/12/27 at 18:23:37, jam wrote: > > +Ken for the test harness issue > > ServiceTest (via BackgroundServiceManager) always initializes and shutdown the EDK, but the content_unittests test runner also does this. BackgroundServiceManager::InitParams provides a mechanism to prevent this behavior, but it needs to be plumbed through to ServiceTest::SetUp. Ah yes, that did the trick. Plumbed it through by adding a init_edk parameter (defaulting to true) to the ServiceTest constructor.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_...) linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by mek@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
The CQ bit was checked by mek@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
and when https://codereview.chromium.org/2604843002 and https://codereview.chromium.org/2600153003 (or similar fixes for those issues) land, I believe this should be green on all bots
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
lgtm
The CQ bit was checked by mek@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by mek@chromium.org
The CQ bit was checked by mek@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds...) ios-device-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device-xcode-...) ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...) ios-simulator-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator-xco...)
Patchset #7 (id:120001) has been deleted
Patchset #7 (id:140001) has been deleted
The CQ bit was checked by mek@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by mek@chromium.org
The CQ bit was checked by mek@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from jam@chromium.org Link to the patchset: https://codereview.chromium.org/2597983003/#ps160001 (title: "rebase")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by mek@chromium.org
The CQ bit was checked by mek@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by mek@chromium.org
The CQ bit was checked by mek@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from jam@chromium.org Link to the patchset: https://codereview.chromium.org/2597983003/#ps180001 (title: "reapply change that got lost during rebase")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 180001, "attempt_start_ts": 1482955548132970, "parent_rev": "74a98b1b47bac7b856e4713b0fa8456a64d3c91a", "commit_rev": "eeda0a91b96741217756081575f808a068e3cd49"}
Message was sent while issue was closed.
Description was changed from ========== Add tests for how LocalStorageContextMojo interacts with file/leveldb services. Also fixes bugs exposed by those tests: - when database does not exists it needs to be created. - when database can't be opened null is passed to LevelDBWrapper. BUG=586194 ========== to ========== Add tests for how LocalStorageContextMojo interacts with file/leveldb services. Also fixes bugs exposed by those tests: - when database does not exists it needs to be created. - when database can't be opened null is passed to LevelDBWrapper. BUG=586194 Review-Url: https://codereview.chromium.org/2597983003 ==========
Message was sent while issue was closed.
Committed patchset #8 (id:180001)
Message was sent while issue was closed.
Description was changed from ========== Add tests for how LocalStorageContextMojo interacts with file/leveldb services. Also fixes bugs exposed by those tests: - when database does not exists it needs to be created. - when database can't be opened null is passed to LevelDBWrapper. BUG=586194 Review-Url: https://codereview.chromium.org/2597983003 ========== to ========== Add tests for how LocalStorageContextMojo interacts with file/leveldb services. Also fixes bugs exposed by those tests: - when database does not exists it needs to be created. - when database can't be opened null is passed to LevelDBWrapper. BUG=586194 Committed: https://crrev.com/38d9efa1374c0cb319450f965d09f4ac83dc4a09 Cr-Commit-Position: refs/heads/master@{#440886} ==========
Message was sent while issue was closed.
Patchset 8 (id:??) landed as https://crrev.com/38d9efa1374c0cb319450f965d09f4ac83dc4a09 Cr-Commit-Position: refs/heads/master@{#440886} |