Uh oh!
There was an error while loading. Please reload this page.
Test: stdio.js SIGWINCH test coverage - #10063
Conversation
sarahmeyer
commented
Dec 1, 2016
@Fishrock123 peep it 👀 -- is this what you were going for? |
MylesBorins
commented
Dec 1, 2016
ci: https://ci.nodejs.org/job/node-test-pull-request/5056/ @sarahmeyer great work! you will need to update the title of the first commit to follow our commit guidelines |
Trott
commented
Dec 1, 2016
SmartOS failure looks related. |
Fishrock123
commented
Dec 1, 2016
Hmmm, the following output occurs on SmartOS (Solaris): I suspect that Python does not correctly emulate this on SmartOS but I'll try to take a deeper look soon. Skipping on SmartOS may be the appropriate solution by the looks, though. |
@sarahmeyer As we briefly discussed, it would be useful to check the properties modifiable by I think everything should be the same so it also should not call the We could also check for an Edit: Forgot to say most things like checking what platform we are running on have helpers in the common "module", such as |
Got the coverage to (mostly) work locally, after some tweaking... You can find it at nodejs/testing#46 if you are interested. (To run it, run (from the node repo) the Suffice to say, this hits the correct paths (aside from the fact that the pty emulation always has the same values). |
Fishrock123
commented
Dec 9, 2016
@sarahmeyer Think you'll be able to take a look this weekend? |
jbergstroem
commented
Dec 9, 2016
/cc @nodejs/platform-smartos |
Trott
commented
Dec 22, 2016
Ping @sarahmeyer: Are you still working on this? (No rush. Just want to make sure it's not stalled and, if it is, see if there's anything we can do to get it un-stalled.) |
I took the liberty of adding a few lines of code to swallow CI: https://ci.nodejs.org/job/node-test-pull-request/5583/ (If CI passes and this gets approval, will squash my commit away on landing.) |
Trott
commented
Dec 26, 2016
CI is green. Reviews/comments? @sarahmeyer@Fishrock123 @nodejs/testing @nodejs/platform-smartos |
| }; | ||
| const refreshSizeWrapperStdout = () => { | ||
| console.log('calling stdout._refreshSize'); |
There was a problem hiding this comment.
A comment indicating that the console.log is part of the test would be helpful.
There was a problem hiding this comment.
Sure, done. Will run Ci again because there was some refactoring that accompanied it.
Trott
commented
Dec 27, 2016
Trott
commented
Dec 27, 2016
Not to bikeshed this thing forever, but it seems like we could wrap the functions in |
Trott
commented
Dec 27, 2016
Possible additional advantage to going that route: I think using the |
Trott
commented
Dec 28, 2016
Going to land this working version. We can always switch to 'use strict';constcommon=require('../common');constoriginalRefreshSizeStderr=process.stderr._refreshSize;constoriginalRefreshSizeStdout=process.stdout._refreshSize;constwrap=(fn,ioStream,string)=>{returncommon.mustCall(()=>{try{fn.call(ioStream);}catch(e){// EINVAL happens on SmartOS if emulation is incompleteif(!common.isSunOS||e.code!=='EINVAL')throwe;}});};process.stderr._refreshSize=wrap(originalRefreshSizeStderr,process.stderr);process.stdout._refreshSize=wrap(originalRefreshSizeStdout,process.stdout);process.emit('SIGWINCH');In that case, |
PR-URL: nodejs#10063 Reviewed-By: James M Snell <jasnell@gmail.com>
Trott
commented
Dec 28, 2016
Landed in a9b59ff. Thanks for the contribution, @sarahmeyer! 🎉 |
PR-URL: #10063 Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #10063 Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #10063 Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #10063 Reviewed-By: James M Snell <jasnell@gmail.com>
Fishrock123
commented
Jan 23, 2017
heh, forgot to get back to this This doesn't really test all that it should IIRC. I can give pointers for improvement if anyone else wants or otherwise I'll just do it myself I guess. |
PR-URL: #10063 Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #10063 Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #10063 Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #10063 Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #10063 Reviewed-By: James M Snell <jasnell@gmail.com>
Checklist
make -j8 test(UNIX), orvcbuild test nosign(Windows) passesAffected core subsystem(s)
test
Description of change
Provides coverage for calling
process._refreshSizewhen aSIGWINCHis emitted withinstderrandstdoutfunctions instdio.js