|
|
Created:
4 years, 3 months ago by kozy Modified:
4 years, 2 months ago Reviewers:
dgozman, jochen (gone - plz use gerrit), alph, Michael Achenbach CC:
v8-reviews_googlegroups.com Target Ref:
refs/pending/heads/master Project:
v8 Visibility:
Public. |
Description[inspector] added inspector test runner [part 1]
- added a inspector folder,
- added related GN and gyp files,
- added task handling infrastructure for test runner.
BUG=chromium:635948
R=dgozman@chromium.org,alph@chromium.org
Committed: https://crrev.com/dc1c71c0dc8a5c4ade4aa291f2ddcd02e90c64b2
Committed: https://crrev.com/80d400641fd829a280ca6ef4f88f55eb41c1c7c0
Cr-Original-Commit-Position: refs/heads/master@{#39866}
Cr-Commit-Position: refs/heads/master@{#39918}
Patch Set 1 #Patch Set 2 : removed inspector-protocol.status #
Total comments: 29
Patch Set 3 : addressed comments #
Total comments: 12
Patch Set 4 : addressed comments #Patch Set 5 : fixed .gn file for test #Patch Set 6 : added missing microtask scope #Patch Set 7 : fixed TaskRunner::GetNext logic #Patch Set 8 : is_protocol_task -> is_inspector_task #Patch Set 9 : use String16 in test-runner #
Total comments: 4
Patch Set 10 #Patch Set 11 : StringView -> String16 in ExecuteStringTask cstor #Patch Set 12 : renamed target: inspector-protocol -> inspector-protocol-test #Patch Set 13 : renamed test/inspector-protocol folder into test/inspector #Patch Set 14 : renamed test/inspector-protocol folder into test/inspector #Patch Set 15 : added test/inspector folder for cpplint #Patch Set 16 : added missing headers #
Created: 4 years, 2 months ago
Messages
Total messages: 54 (38 generated)
Dmitry, please take a look! It's first part of https://codereview.chromium.org/2358943002/
https://codereview.chromium.org/2361623006/diff/20001/test/inspector-protocol... File test/inspector-protocol/DEPS (right): https://codereview.chromium.org/2361623006/diff/20001/test/inspector-protocol... test/inspector-protocol/DEPS:6: "+src/inspector", Should not include src/inspector. https://codereview.chromium.org/2361623006/diff/20001/test/inspector-protocol... File test/inspector-protocol/inspector-protocol.gyp (right): https://codereview.chromium.org/2361623006/diff/20001/test/inspector-protocol... test/inspector-protocol/inspector-protocol.gyp:8: 'inspector_protocol_sources': [ ### gcmole(all) ### Is this a gcmole exception? Do we need it? https://codereview.chromium.org/2361623006/diff/20001/test/inspector-protocol... File test/inspector-protocol/task-runner.cc (right): https://codereview.chromium.org/2361623006/diff/20001/test/inspector-protocol... test/inspector-protocol/task-runner.cc:47: v8::MaybeLocal<v8::Value> result; ... = script->Run(context); https://codereview.chromium.org/2361623006/diff/20001/test/inspector-protocol... test/inspector-protocol/task-runner.cc:91: isolate_(NULL) { nullptr https://codereview.chromium.org/2361623006/diff/20001/test/inspector-protocol... test/inspector-protocol/task-runner.cc:97: void TaskRunner::SetContext(v8::Local<v8::Context> context) { Why not pass in constructor? https://codereview.chromium.org/2361623006/diff/20001/test/inspector-protocol... test/inspector-protocol/task-runner.cc:104: Task* task = queue_->GetNext(false); Looks like this runs forever even if Stop was called. I'd merge TaskQueue with TaskRunner to avoid this problem. https://codereview.chromium.org/2361623006/diff/20001/test/inspector-protocol... test/inspector-protocol/task-runner.cc:107: task->Run(isolate_, context_); Why two different types of tasks? https://codereview.chromium.org/2361623006/diff/20001/test/inspector-protocol... File test/inspector-protocol/task-runner.h (right): https://codereview.chromium.org/2361623006/diff/20001/test/inspector-protocol... test/inspector-protocol/task-runner.h:17: class TaskScope { STACK_ALLOCATED? https://codereview.chromium.org/2361623006/diff/20001/test/inspector-protocol... test/inspector-protocol/task-runner.h:36: class Task : public v8::Task { Let's make this inner class of TaskQueue to avoid too generic Task classname? https://codereview.chromium.org/2361623006/diff/20001/test/inspector-protocol... test/inspector-protocol/task-runner.h:41: DCHECK(false); Just make it = 0 https://codereview.chromium.org/2361623006/diff/20001/test/inspector-protocol... test/inspector-protocol/task-runner.h:43: virtual void Run() { DCHECK(false); } ditto https://codereview.chromium.org/2361623006/diff/20001/test/inspector-protocol... test/inspector-protocol/task-runner.h:49: bool is_protocol_task() { return false; } override https://codereview.chromium.org/2361623006/diff/20001/test/inspector-protocol... test/inspector-protocol/task-runner.h:54: v8_inspector::String16 expression_; Let's avoid using String16. https://codereview.chromium.org/2361623006/diff/20001/test/inspector-protocol... test/inspector-protocol/task-runner.h:71: v8::internal::LockedQueue<Task*> queue_; Can we use std::unique_ptr<Task>? https://codereview.chromium.org/2361623006/diff/20001/test/inspector-protocol... test/inspector-protocol/task-runner.h:82: explicit TaskRunner(TaskQueue* queue); Shouldn't task runner create a queue itself?
Dmitry, please take another look! https://codereview.chromium.org/2361623006/diff/20001/test/inspector-protocol... File test/inspector-protocol/DEPS (right): https://codereview.chromium.org/2361623006/diff/20001/test/inspector-protocol... test/inspector-protocol/DEPS:6: "+src/inspector", On 2016/09/23 03:09:55, dgozman wrote: > Should not include src/inspector. Done. https://codereview.chromium.org/2361623006/diff/20001/test/inspector-protocol... File test/inspector-protocol/inspector-protocol.gyp (right): https://codereview.chromium.org/2361623006/diff/20001/test/inspector-protocol... test/inspector-protocol/inspector-protocol.gyp:8: 'inspector_protocol_sources': [ ### gcmole(all) ### On 2016/09/23 03:09:55, dgozman wrote: > Is this a gcmole exception? Do we need it? Yes, I think we don't need this, removed. https://codereview.chromium.org/2361623006/diff/20001/test/inspector-protocol... File test/inspector-protocol/task-runner.cc (right): https://codereview.chromium.org/2361623006/diff/20001/test/inspector-protocol... test/inspector-protocol/task-runner.cc:47: v8::MaybeLocal<v8::Value> result; On 2016/09/23 03:09:55, dgozman wrote: > ... = script->Run(context); I split it into two lines to avoid redundant check (because taskscope will check exceptions and terminate test if it is thrown). https://codereview.chromium.org/2361623006/diff/20001/test/inspector-protocol... test/inspector-protocol/task-runner.cc:91: isolate_(NULL) { On 2016/09/23 03:09:55, dgozman wrote: > nullptr Done. https://codereview.chromium.org/2361623006/diff/20001/test/inspector-protocol... test/inspector-protocol/task-runner.cc:97: void TaskRunner::SetContext(v8::Local<v8::Context> context) { On 2016/09/23 03:09:56, dgozman wrote: > Why not pass in constructor? Moved isolate and context initialization logic into task runner. https://codereview.chromium.org/2361623006/diff/20001/test/inspector-protocol... test/inspector-protocol/task-runner.cc:104: Task* task = queue_->GetNext(false); On 2016/09/23 03:09:56, dgozman wrote: > Looks like this runs forever even if Stop was called. I'd merge TaskQueue with > TaskRunner to avoid this problem. I expose RunMessageLoop and QuitMessageLoop interface. QuitMessageLoop can be used only inside of Task::Run. https://codereview.chromium.org/2361623006/diff/20001/test/inspector-protocol... test/inspector-protocol/task-runner.cc:107: task->Run(isolate_, context_); On 2016/09/23 03:09:55, dgozman wrote: > Why two different types of tasks? Removed. https://codereview.chromium.org/2361623006/diff/20001/test/inspector-protocol... File test/inspector-protocol/task-runner.h (right): https://codereview.chromium.org/2361623006/diff/20001/test/inspector-protocol... test/inspector-protocol/task-runner.h:17: class TaskScope { On 2016/09/23 03:09:56, dgozman wrote: > STACK_ALLOCATED? I couldn't find any like this in macros.h. Moved this to implementation file. https://codereview.chromium.org/2361623006/diff/20001/test/inspector-protocol... test/inspector-protocol/task-runner.h:36: class Task : public v8::Task { On 2016/09/23 03:09:56, dgozman wrote: > Let's make this inner class of TaskQueue to avoid too generic Task classname? Done. https://codereview.chromium.org/2361623006/diff/20001/test/inspector-protocol... test/inspector-protocol/task-runner.h:41: DCHECK(false); On 2016/09/23 03:09:56, dgozman wrote: > Just make it = 0 Done. https://codereview.chromium.org/2361623006/diff/20001/test/inspector-protocol... test/inspector-protocol/task-runner.h:49: bool is_protocol_task() { return false; } On 2016/09/23 03:09:56, dgozman wrote: > override Done. https://codereview.chromium.org/2361623006/diff/20001/test/inspector-protocol... test/inspector-protocol/task-runner.h:54: v8_inspector::String16 expression_; On 2016/09/23 03:09:56, dgozman wrote: > Let's avoid using String16. Done. https://codereview.chromium.org/2361623006/diff/20001/test/inspector-protocol... test/inspector-protocol/task-runner.h:71: v8::internal::LockedQueue<Task*> queue_; On 2016/09/23 03:09:56, dgozman wrote: > Can we use std::unique_ptr<Task>? LockedQueue doesn't ready for unique_ptr. Added a comment that TaskRunner takes ownership. https://codereview.chromium.org/2361623006/diff/20001/test/inspector-protocol... test/inspector-protocol/task-runner.h:82: explicit TaskRunner(TaskQueue* queue); On 2016/09/23 03:09:56, dgozman wrote: > Shouldn't task runner create a queue itself? Done.
lgtm https://codereview.chromium.org/2361623006/diff/40001/test/inspector-protocol... File test/inspector-protocol/task-runner.cc (right): https://codereview.chromium.org/2361623006/diff/40001/test/inspector-protocol... test/inspector-protocol/task-runner.cc:112: for (;;) { Let's remove this for() https://codereview.chromium.org/2361623006/diff/40001/test/inspector-protocol... test/inspector-protocol/task-runner.cc:139: v8::Local<v8::String> source = HandleScope https://codereview.chromium.org/2361623006/diff/40001/test/inspector-protocol... test/inspector-protocol/task-runner.cc:146: if (!v8::ScriptCompiler::Compile(context, &scriptSource).ToLocal(&script)) ContextScope https://codereview.chromium.org/2361623006/diff/40001/test/inspector-protocol... File test/inspector-protocol/task-runner.h (right): https://codereview.chromium.org/2361623006/diff/40001/test/inspector-protocol... test/inspector-protocol/task-runner.h:47: v8::base::Semaphore* ready_; ready_semaphore_ https://codereview.chromium.org/2361623006/diff/40001/test/inspector-protocol... test/inspector-protocol/task-runner.h:52: v8::internal::LockedQueue<Task*> queue_; // deferred_queue_ combined with queue_ (in this order) have all tasks in the correct order. // Sometimes we skip non-protocol tasks by moving them from queue_ to deferred_queue_. https://codereview.chromium.org/2361623006/diff/40001/test/inspector-protocol... test/inspector-protocol/task-runner.h:56: int nested_loops_; nested_loop_count_;
All done! https://codereview.chromium.org/2361623006/diff/40001/test/inspector-protocol... File test/inspector-protocol/task-runner.cc (right): https://codereview.chromium.org/2361623006/diff/40001/test/inspector-protocol... test/inspector-protocol/task-runner.cc:112: for (;;) { On 2016/09/24 00:56:10, dgozman wrote: > Let's remove this for() Done. https://codereview.chromium.org/2361623006/diff/40001/test/inspector-protocol... test/inspector-protocol/task-runner.cc:139: v8::Local<v8::String> source = On 2016/09/24 00:56:09, dgozman wrote: > HandleScope Done. https://codereview.chromium.org/2361623006/diff/40001/test/inspector-protocol... test/inspector-protocol/task-runner.cc:146: if (!v8::ScriptCompiler::Compile(context, &scriptSource).ToLocal(&script)) On 2016/09/24 00:56:09, dgozman wrote: > ContextScope Done. https://codereview.chromium.org/2361623006/diff/40001/test/inspector-protocol... File test/inspector-protocol/task-runner.h (right): https://codereview.chromium.org/2361623006/diff/40001/test/inspector-protocol... test/inspector-protocol/task-runner.h:47: v8::base::Semaphore* ready_; On 2016/09/24 00:56:10, dgozman wrote: > ready_semaphore_ Done. https://codereview.chromium.org/2361623006/diff/40001/test/inspector-protocol... test/inspector-protocol/task-runner.h:52: v8::internal::LockedQueue<Task*> queue_; On 2016/09/24 00:56:10, dgozman wrote: > // deferred_queue_ combined with queue_ (in this order) have all tasks in the > correct order. > // Sometimes we skip non-protocol tasks by moving them from queue_ to > deferred_queue_. Done. https://codereview.chromium.org/2361623006/diff/40001/test/inspector-protocol... test/inspector-protocol/task-runner.h:56: int nested_loops_; On 2016/09/24 00:56:10, dgozman wrote: > nested_loop_count_; Done.
kozyatinskiy@chromium.org changed reviewers: + machenbach@chromium.org
Michael, please take a look! It's first part of 3. Full test runner PoC: https://codereview.chromium.org/2358943002/.
The CQ bit was checked by kozyatinskiy@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: v8_linux_chromium_gn_rel on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_chromium_gn_rel/bu...)
The CQ bit was checked by kozyatinskiy@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: This issue passed the CQ dry run.
machenbach@chromium.org changed reviewers: + jochen@chromium.org
lgtm with comments. I didn't review c++ files. Please find an owner for review if you need more attention to it. +jochen as he's added to the owners. https://codereview.chromium.org/2361623006/diff/160001/test/inspector-protoco... File test/inspector-protocol/BUILD.gn (right): https://codereview.chromium.org/2361623006/diff/160001/test/inspector-protoco... test/inspector-protocol/BUILD.gn:27: # inspector-protocol can't be built against a shared library, so we Are you sure it can't? Or was this c/p from cctest? Maybe it can, or there are just a few symbols that need to be exported so that it works? It'd be preferable if shared libs would work as otherwise this is a space waster in debug builds. https://codereview.chromium.org/2361623006/diff/160001/test/inspector-protoco... File test/inspector-protocol/inspector-protocol.gyp (right): https://codereview.chromium.org/2361623006/diff/160001/test/inspector-protoco... test/inspector-protocol/inspector-protocol.gyp:19: 'resources', What's resources for a dependency? What's the correspondent in GN?
Updated OWNERS file and addressed comments. https://codereview.chromium.org/2361623006/diff/160001/test/inspector-protoco... File test/inspector-protocol/BUILD.gn (right): https://codereview.chromium.org/2361623006/diff/160001/test/inspector-protoco... test/inspector-protocol/BUILD.gn:27: # inspector-protocol can't be built against a shared library, so we On 2016/09/28 10:13:46, machenbach (slow) wrote: > Are you sure it can't? Or was this c/p from cctest? Maybe it can, or there are > just a few symbols that need to be exported so that it works? It'd be preferable > if shared libs would work as otherwise this is a space waster in debug builds. We use String16 that isn't exported from inspector component and v8::internal::Flags. https://codereview.chromium.org/2361623006/diff/160001/test/inspector-protoco... File test/inspector-protocol/inspector-protocol.gyp (right): https://codereview.chromium.org/2361623006/diff/160001/test/inspector-protoco... test/inspector-protocol/inspector-protocol.gyp:19: 'resources', On 2016/09/28 10:13:46, machenbach (slow) wrote: > What's resources for a dependency? What's the correspondent in GN? Removed.
The CQ bit was checked by kozyatinskiy@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: This issue passed the CQ dry run.
Description was changed from ========== [inspector] added inspector protocol test runner [part 1] - added a inspector-protocol folder, - added related GN and gyp files, - added task handling infrastructure for test runner. BUG=chromium:645640 R=dgozman@chromium.org,alph@chromium.org ========== to ========== [inspector] added inspector protocol test runner [part 1] - added a inspector-protocol folder, - added related GN and gyp files, - added task handling infrastructure for test runner. BUG=chromium:635948 R=dgozman@chromium.org,alph@chromium.org ==========
The CQ bit was checked by kozyatinskiy@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: This issue passed the CQ dry run.
Description was changed from ========== [inspector] added inspector protocol test runner [part 1] - added a inspector-protocol folder, - added related GN and gyp files, - added task handling infrastructure for test runner. BUG=chromium:635948 R=dgozman@chromium.org,alph@chromium.org ========== to ========== [inspector] added inspector protocol test runner [part 1] - added a inspector folder, - added related GN and gyp files, - added task handling infrastructure for test runner. BUG=chromium:635948 R=dgozman@chromium.org,alph@chromium.org ==========
The CQ bit was checked by kozyatinskiy@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 ========== [inspector] added inspector protocol test runner [part 1] - added a inspector folder, - added related GN and gyp files, - added task handling infrastructure for test runner. BUG=chromium:635948 R=dgozman@chromium.org,alph@chromium.org ========== to ========== [inspector] added inspector test runner [part 1] - added a inspector folder, - added related GN and gyp files, - added task handling infrastructure for test runner. BUG=chromium:635948 R=dgozman@chromium.org,alph@chromium.org ==========
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
lgtm
The CQ bit was checked by kozyatinskiy@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from dgozman@chromium.org, machenbach@chromium.org Link to the patchset: https://codereview.chromium.org/2361623006/#ps280001 (title: "added test/inspector folder for cpplint")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== [inspector] added inspector test runner [part 1] - added a inspector folder, - added related GN and gyp files, - added task handling infrastructure for test runner. BUG=chromium:635948 R=dgozman@chromium.org,alph@chromium.org ========== to ========== [inspector] added inspector test runner [part 1] - added a inspector folder, - added related GN and gyp files, - added task handling infrastructure for test runner. BUG=chromium:635948 R=dgozman@chromium.org,alph@chromium.org ==========
Message was sent while issue was closed.
Committed patchset #15 (id:280001)
Message was sent while issue was closed.
Description was changed from ========== [inspector] added inspector test runner [part 1] - added a inspector folder, - added related GN and gyp files, - added task handling infrastructure for test runner. BUG=chromium:635948 R=dgozman@chromium.org,alph@chromium.org ========== to ========== [inspector] added inspector test runner [part 1] - added a inspector folder, - added related GN and gyp files, - added task handling infrastructure for test runner. BUG=chromium:635948 R=dgozman@chromium.org,alph@chromium.org Committed: https://crrev.com/dc1c71c0dc8a5c4ade4aa291f2ddcd02e90c64b2 Cr-Commit-Position: refs/heads/master@{#39866} ==========
Message was sent while issue was closed.
Patchset 15 (id:??) landed as https://crrev.com/dc1c71c0dc8a5c4ade4aa291f2ddcd02e90c64b2 Cr-Commit-Position: refs/heads/master@{#39866}
Message was sent while issue was closed.
Description was changed from ========== [inspector] added inspector test runner [part 1] - added a inspector folder, - added related GN and gyp files, - added task handling infrastructure for test runner. BUG=chromium:635948 R=dgozman@chromium.org,alph@chromium.org Committed: https://crrev.com/dc1c71c0dc8a5c4ade4aa291f2ddcd02e90c64b2 Cr-Commit-Position: refs/heads/master@{#39866} ========== to ========== [inspector] added inspector test runner [part 1] - added a inspector folder, - added related GN and gyp files, - added task handling infrastructure for test runner. BUG=chromium:635948 R=dgozman@chromium.org,alph@chromium.org Committed: https://crrev.com/dc1c71c0dc8a5c4ade4aa291f2ddcd02e90c64b2 Cr-Commit-Position: refs/heads/master@{#39866} ==========
The CQ bit was checked by kozyatinskiy@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: This issue passed the CQ dry run.
The CQ bit was checked by kozyatinskiy@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from dgozman@chromium.org, jochen@chromium.org, machenbach@chromium.org Link to the patchset: https://codereview.chromium.org/2361623006/#ps300001 (title: "added missing headers")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== [inspector] added inspector test runner [part 1] - added a inspector folder, - added related GN and gyp files, - added task handling infrastructure for test runner. BUG=chromium:635948 R=dgozman@chromium.org,alph@chromium.org Committed: https://crrev.com/dc1c71c0dc8a5c4ade4aa291f2ddcd02e90c64b2 Cr-Commit-Position: refs/heads/master@{#39866} ========== to ========== [inspector] added inspector test runner [part 1] - added a inspector folder, - added related GN and gyp files, - added task handling infrastructure for test runner. BUG=chromium:635948 R=dgozman@chromium.org,alph@chromium.org Committed: https://crrev.com/dc1c71c0dc8a5c4ade4aa291f2ddcd02e90c64b2 Cr-Commit-Position: refs/heads/master@{#39866} ==========
Message was sent while issue was closed.
Committed patchset #16 (id:300001)
Message was sent while issue was closed.
Description was changed from ========== [inspector] added inspector test runner [part 1] - added a inspector folder, - added related GN and gyp files, - added task handling infrastructure for test runner. BUG=chromium:635948 R=dgozman@chromium.org,alph@chromium.org Committed: https://crrev.com/dc1c71c0dc8a5c4ade4aa291f2ddcd02e90c64b2 Cr-Commit-Position: refs/heads/master@{#39866} ========== to ========== [inspector] added inspector test runner [part 1] - added a inspector folder, - added related GN and gyp files, - added task handling infrastructure for test runner. BUG=chromium:635948 R=dgozman@chromium.org,alph@chromium.org Committed: https://crrev.com/dc1c71c0dc8a5c4ade4aa291f2ddcd02e90c64b2 Committed: https://crrev.com/80d400641fd829a280ca6ef4f88f55eb41c1c7c0 Cr-Original-Commit-Position: refs/heads/master@{#39866} Cr-Commit-Position: refs/heads/master@{#39918} ==========
Message was sent while issue was closed.
Patchset 16 (id:??) landed as https://crrev.com/80d400641fd829a280ca6ef4f88f55eb41c1c7c0 Cr-Commit-Position: refs/heads/master@{#39918}
Message was sent while issue was closed.
lgtm, thanks |