New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugger - Filter out the ending of the Module wrapper when using the list command #9773

Closed
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
8 participants
@lholmquist
Contributor

lholmquist commented Nov 23, 2016

Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

Debbuger

Description of change

PR for #9768.

When inside the debugger, doing a list(10) on a file with only say 5 lines, would print the end of the module wrapper on the last line.

There is code currently to make sure that the first part of the Module wrapper is filtered out. that is located here: https://github.com/nodejs/node/blob/master/lib/_debugger.js#L1107

The code added filters out the very last line of the lines array, which is the ending of the module wrapper.

I did not add a test for this. I don't believe there was one that tests List anyways. If there needs to be one, i will try and look at the other debugger tests as an example

@cjihrig

This comment has been minimized.

Show comment
Hide comment
@cjihrig

cjihrig Nov 23, 2016

Contributor

Could you provide a test case please.

Contributor

cjihrig commented Nov 23, 2016

Could you provide a test case please.

@lholmquist

This comment has been minimized.

Show comment
Hide comment
@lholmquist

lholmquist Nov 23, 2016

Contributor

sure

Contributor

lholmquist commented Nov 23, 2016

sure

@lholmquist

This comment has been minimized.

Show comment
Hide comment
@lholmquist

lholmquist Nov 28, 2016

Contributor

@cjihrig Sorry for the delay(Thanksgiving Holiday), I've added a test case here

Contributor

lholmquist commented Nov 28, 2016

@cjihrig Sorry for the delay(Thanksgiving Holiday), I've added a test case here

@lholmquist

This comment has been minimized.

Show comment
Hide comment
@lholmquist

lholmquist Dec 5, 2016

Contributor

and rebased

Contributor

lholmquist commented Dec 5, 2016

and rebased

Show outdated Hide outdated test/parallel/test-debugger-list-no-module-wrapper.js
Show outdated Hide outdated test/parallel/test-debugger-list-no-module-wrapper.js
Show outdated Hide outdated test/parallel/test-debugger-list-no-module-wrapper.js
Show outdated Hide outdated test/parallel/test-debugger-list-no-module-wrapper.js
Show outdated Hide outdated test/parallel/test-debugger-list-no-module-wrapper.js
@lholmquist

This comment has been minimized.

Show comment
Hide comment
@lholmquist

lholmquist Dec 5, 2016

Contributor

@cjihrig ok, i think i got all the changes, and i also rebased against master too

Contributor

lholmquist commented Dec 5, 2016

@cjihrig ok, i think i got all the changes, and i also rebased against master too

@lholmquist

This comment has been minimized.

Show comment
Hide comment
@lholmquist

lholmquist Dec 8, 2016

Contributor

rebased again

Contributor

lholmquist commented Dec 8, 2016

rebased again

@cjihrig

In general, it would be nice if we could reuse the test/debugger/helper-debugger-repl.js file. I'm not sure how feasible it is or not though. Thoughts @nodejs/testing?

Show outdated Hide outdated test/parallel/test-debugger-list-no-module-wrapper.js
Show outdated Hide outdated test/parallel/test-debugger-list-no-module-wrapper.js
Show outdated Hide outdated test/parallel/test-debugger-list-no-module-wrapper.js
@lholmquist

This comment has been minimized.

Show comment
Hide comment
@lholmquist

lholmquist Dec 8, 2016

Contributor

@cjihrig updated

Contributor

lholmquist commented Dec 8, 2016

@cjihrig updated

Show outdated Hide outdated test/parallel/test-debugger-list-no-module-wrapper.js
@cjihrig

This comment has been minimized.

Show comment
Hide comment
Contributor

cjihrig commented Dec 8, 2016

@lholmquist

This comment has been minimized.

Show comment
Hide comment
@lholmquist

lholmquist Dec 8, 2016

Contributor

looks like some failures, not sure whats going on in those platforms though

Contributor

lholmquist commented Dec 8, 2016

looks like some failures, not sure whats going on in those platforms though

@lholmquist

This comment has been minimized.

Show comment
Hide comment
@lholmquist

lholmquist Dec 8, 2016

Contributor

i rebased, maybe there was something missing

Contributor

lholmquist commented Dec 8, 2016

i rebased, maybe there was something missing

@cjihrig

This comment has been minimized.

Show comment
Hide comment
Contributor

cjihrig commented Dec 9, 2016

Show outdated Hide outdated test/parallel/test-debugger-list-no-module-wrapper.js
@lance

lance approved these changes Dec 9, 2016

@lholmquist

This comment has been minimized.

Show comment
Hide comment
@lholmquist

lholmquist Dec 12, 2016

Contributor

rebased

Contributor

lholmquist commented Dec 12, 2016

rebased

@lance

This comment has been minimized.

Show comment
Hide comment
Contributor

lance commented Dec 12, 2016

@lance

This comment has been minimized.

Show comment
Hide comment
@lance

lance Dec 12, 2016

Contributor

Hmm CI failed on smartOS for the common.mustCall() invocation. I'm not sure if this is a flakey test or not. @cjihrig?

Contributor

lance commented Dec 12, 2016

Hmm CI failed on smartOS for the common.mustCall() invocation. I'm not sure if this is a flakey test or not. @cjihrig?

@cjihrig

This comment has been minimized.

Show comment
Hide comment
@cjihrig

cjihrig Dec 13, 2016

Contributor

I'm not sure if this is a flakey test or not.

I'm not sure, but this PR introduces that test, so we don't want to introduce a bad or flakey test.

Contributor

cjihrig commented Dec 13, 2016

I'm not sure if this is a flakey test or not.

I'm not sure, but this PR introduces that test, so we don't want to introduce a bad or flakey test.

@lholmquist

This comment has been minimized.

Show comment
Hide comment
@lholmquist

lholmquist Dec 13, 2016

Contributor

so what are some next steps i should be taking here?

Contributor

lholmquist commented Dec 13, 2016

so what are some next steps i should be taking here?

@lholmquist

This comment has been minimized.

Show comment
Hide comment
@lholmquist

lholmquist Dec 13, 2016

Contributor

i've added something to the assert to see what that stdout var is, would you guys mind re-running ci :)

Contributor

lholmquist commented Dec 13, 2016

i've added something to the assert to see what that stdout var is, would you guys mind re-running ci :)

@lance

This comment has been minimized.

Show comment
Hide comment
@lance

lance Dec 13, 2016

Contributor

I kicked a CI again: https://ci.nodejs.org/job/node-test-pull-request/5382/
It looks like the debugger client is receiving multiple close events before your test has a chance to send any input. We see connecting... but then multiple program terminated lines, which come from the close handler. To be honest, I can't quite figure out what's going on here.

Contributor

lance commented Dec 13, 2016

I kicked a CI again: https://ci.nodejs.org/job/node-test-pull-request/5382/
It looks like the debugger client is receiving multiple close events before your test has a chance to send any input. We see connecting... but then multiple program terminated lines, which come from the close handler. To be honest, I can't quite figure out what's going on here.

@lholmquist

This comment has been minimized.

Show comment
Hide comment
@lholmquist

lholmquist Dec 13, 2016

Contributor

Thanks for taking a look. I wonder if there is some bug with smartOS and the debugger

Contributor

lholmquist commented Dec 13, 2016

Thanks for taking a look. I wonder if there is some bug with smartOS and the debugger

@lholmquist

This comment has been minimized.

Show comment
Hide comment
@lholmquist

lholmquist Jan 17, 2017

Contributor

@cjihrig so i'm not sure how to proceed here, i've actually tried running smartOS in a vm to see if i could duplicate the test failures. I was only able to get node built and tested on the latest version of smartOS(i think 15 or 16?) but wasn't able to build node on the version of smartOS that was failing(which i think was 14, i think it had to do with the gcc version or something).

I followed a bunch of different gists to get things setup, so what i have might not be the same thing that the CI is testing against.

Any guidance on a next step would be appreciated. Thanks

Contributor

lholmquist commented Jan 17, 2017

@cjihrig so i'm not sure how to proceed here, i've actually tried running smartOS in a vm to see if i could duplicate the test failures. I was only able to get node built and tested on the latest version of smartOS(i think 15 or 16?) but wasn't able to build node on the version of smartOS that was failing(which i think was 14, i think it had to do with the gcc version or something).

I followed a bunch of different gists to get things setup, so what i have might not be the same thing that the CI is testing against.

Any guidance on a next step would be appreciated. Thanks

@cjihrig

This comment has been minimized.

Show comment
Hide comment
@cjihrig

cjihrig Jan 20, 2017

Contributor

Let's get a fresh CI and see what happens: https://ci.nodejs.org/job/node-test-pull-request/5959/

Contributor

cjihrig commented Jan 20, 2017

Let's get a fresh CI and see what happens: https://ci.nodejs.org/job/node-test-pull-request/5959/

@lholmquist

This comment has been minimized.

Show comment
Hide comment
@lholmquist

lholmquist Jan 20, 2017

Contributor

i see that the ARM is reporting as failed, but the link to CI looks like it passed.

Also, looks like the smartOS 14-32 isn't failing anymore, but 14-64 still is

Contributor

lholmquist commented Jan 20, 2017

i see that the ARM is reporting as failed, but the link to CI looks like it passed.

Also, looks like the smartOS 14-32 isn't failing anymore, but 14-64 still is

@cjihrig

This comment has been minimized.

Show comment
Hide comment
@cjihrig

cjihrig Jan 20, 2017

Contributor

The ARM failure on GitHub can be ignored. If you look at the actual Jenkins link, only SmartOS failed.

Contributor

cjihrig commented Jan 20, 2017

The ARM failure on GitHub can be ignored. If you look at the actual Jenkins link, only SmartOS failed.

@TimothyGu

This comment has been minimized.

Show comment
Hide comment
@TimothyGu

TimothyGu Mar 20, 2017

Member

@cjihrig can this PR be merged or does it need some more work?

Member

TimothyGu commented Mar 20, 2017

@cjihrig can this PR be merged or does it need some more work?

@cjihrig

This comment has been minimized.

Show comment
Hide comment
@cjihrig

cjihrig Mar 20, 2017

Contributor

The last time we ran the CI, the test in this PR was failing on SmartOS.

Contributor

cjihrig commented Mar 20, 2017

The last time we ran the CI, the test in this PR was failing on SmartOS.

@TimothyGu

This comment has been minimized.

Show comment
Hide comment
@TimothyGu

TimothyGu Mar 20, 2017

Member

The old CI URL seems to have expired. Let's try again then: https://ci.nodejs.org/job/node-test-pull-request/6926/

Member

TimothyGu commented Mar 20, 2017

The old CI URL seems to have expired. Let's try again then: https://ci.nodejs.org/job/node-test-pull-request/6926/

@TimothyGu

CI seems to be passing on SmartOS this time around.

@lholmquist, can you fix this nit and @cjihrig's review comment here (in other words, reverting 8f10635360ffbdd158d3c088a0e19e066ac8cd8c), so we can merge this PR?

Show outdated Hide outdated test/parallel/test-debugger-list-no-module-wrapper.js
@lholmquist

This comment has been minimized.

Show comment
Hide comment
@lholmquist

lholmquist Mar 20, 2017

Contributor

@TimothyGu @cjihrig I've reverted back that commit, and fixed that small nit. I've also rebased against master too.

Contributor

lholmquist commented Mar 20, 2017

@TimothyGu @cjihrig I've reverted back that commit, and fixed that small nit. I've also rebased against master too.

Debugger - Filter out the ending of the Module wrapper when using the…
… list command

When doing the list command using a number that is more than the amount lines in that files, ex: list(10),
the ending of the Module wrapper was still showing.  This removes that line.

Fixes: #9768
@danbev

danbev approved these changes Mar 27, 2017 edited

Minor nit: the subsystem should perhaps be lib:, and the commit message adhere to the guidelines. (I can make those changes when merging after all reviews have been approved)

@danbev

This comment has been minimized.

Show comment
Hide comment
@danbev

danbev Mar 28, 2017

Member

@cjihrig @TimothyGu Would it be alright if I land this?

Member

danbev commented Mar 28, 2017

@cjihrig @TimothyGu Would it be alright if I land this?

@gibfahn

This comment has been minimized.

Show comment
Hide comment
Member

gibfahn commented Mar 28, 2017

@cjihrig

This comment has been minimized.

Show comment
Hide comment
@cjihrig

cjihrig Mar 28, 2017

Contributor

Looks like there are still related test failures.

Contributor

cjihrig commented Mar 28, 2017

Looks like there are still related test failures.

@danbev

This comment has been minimized.

Show comment
Hide comment
@danbev

danbev Mar 28, 2017

Member

Looks like there are still related test failures.

I'm running the test on windows to see if I can track down the issue.

Member

danbev commented Mar 28, 2017

Looks like there are still related test failures.

I'm running the test on windows to see if I can track down the issue.

add wait for prompt
This commit attempts to fix a failure that has been reported by CI and
that I was able to reproduce locally as well. Will run another CI and
see if this takes care of the issue.
@danbev

This comment has been minimized.

Show comment
Hide comment
@BridgeAR

This comment has been minimized.

Show comment
Hide comment
@BridgeAR

BridgeAR Aug 26, 2017

Member

This needs a rebase. @danbev did your commit solve the failure?

Member

BridgeAR commented Aug 26, 2017

This needs a rebase. @danbev did your commit solve the failure?

@lholmquist

This comment has been minimized.

Show comment
Hide comment
@lholmquist

lholmquist Aug 28, 2017

Contributor

@BridgeAR @cjihrig Since the file that i made changes to is now deleted, does it make sense to still continue this PR?

Contributor

lholmquist commented Aug 28, 2017

@BridgeAR @cjihrig Since the file that i made changes to is now deleted, does it make sense to still continue this PR?

@cjihrig

This comment has been minimized.

Show comment
Hide comment
@cjihrig

cjihrig Aug 28, 2017

Contributor

I don't think so. I'll close this.

Contributor

cjihrig commented Aug 28, 2017

I don't think so. I'll close this.

@cjihrig cjihrig closed this Aug 28, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment