-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
TODO/XXX/FIXME comments in tests #4640
Comments
In older versions of the test (pre-git) I pointed directly to the fixture, but it ended up erasing it after the run. I am really not sure why. (Something we now do to the temporary file but did not do at the time the comment was written.) |
I'd like to do this please(as it's tagged 'good first contribution'). So, do I just remove the comments? |
Okay. I'll get to it right away. :) |
For 7: test/parallel/test-punycode.js, the Russian(Cyrillic) test still fails, so an issue should be opened for it probably. |
For 2: test/parallel/test-child-process-fork-net2.js, seems like the update: So, both the comment and the |
For 4: test/parallel/test-cluster-http-pipe.js, I think the |
I'd like @bnoordhuis to comment on 4., once he is well again. The origin commit shows some signifigance: de88255 Edit: It was re-added there. The true origin was 296b7a5#diff-92a4de49a056f9e6d4d14bd396d326b0R45, but I think the commits that removed it and then were reverted are more telling? |
In 5: test/parallel/test-dgram-oob-buffer.js, I'm not entirely sure why closing a |
11: test/sequential/test-zerolengthbufferbug.js The comment should just be removed IMO. Not a very helpful comment, but it's probably referring to some linting issues. This is what
update: @Trott Yup. That command works. My bad. Turns out that comment(thanks for introducing me to |
@aayn Those lint issues are because (for whatever reason) your eslint is not loading the custom rules that are specified in the project EDIT: This command should work from the top-level directory of the project:
|
@aayn It might be good (if you haven't) to use EDIT: Referring to |
For 10: test/sequential/test-setproctitle.js, the test file considers anything other than edit: @Trott Is there support for |
Running 3: test/parallel/test-cluster-disconnect-handles.js fails for me. It says: update: @Trott, thanks. Works fine with the flag. |
@aayn If you look at the top of that file, you'll see this comment:
That let's the test harness know that the test needs to be run with the
|
@Trott I don't quite understand the rest of the tests. Could you point me to some resources/code or tell me a bit about them? |
@aayn If the tests themselves are not self-explanatory through their code and comments, I don't think they tend to be documented elsewhere. I usually will use Standardizing a way to document tests is (or should be) on a long list of activities for the Testing WG but I don't think we/they will get to it anytime too soon. |
@Trott For 1(which seems to be written by you), I get the following as the output:
Do I need to make a socket listen or something?(Sorry if I'm asking a noob question 😅) |
@aayn Although I am the last person to touch that comment, it actually originates with @bnoordhuis in 2012 with 46e86aa8. A lot has changed since 2012 and it's possible that the comment is obsolete. Hopefully he can shed some light on it (although like everyone everywhere, he's no doubt got a lot of other things vying for his attention, so we may have to be patient). Regarding getting the test to work: My naive analysis would be that it's possible multicast UDP is disabled on your computer or that you are having firewall issues. |
@Trott Oh yeah. It was something to do with my |
So, in 1, seems like the |
So, here is the summary of changes suggested by me so far:
@Trott If you concur, can I make these changes please( I'd really like to make a contribution 😅 )? I'll suggest changes on other files as I get to know more about node and when @bnoordhuis replies. |
@aayn Pick the one that you feel the most confident about, and open a pull request for it. Then you can take what you learn from the process and apply it to the others. Or open a pull request for each of the first three and an issue for the fourth one if you want. Each of these changes should probably be its own pull request (or, for the last one, issue). Other than being |
It seems that subtask 3 was addressed in c5c28c3 |
Refs:nodejs#4640 Adds check for `SunOS` support
When NODE_REPL_HISTORY isn't defined `repl` defaults to temporary file This prevents the temporary file from being cleared and removes check on fixture Refs: #4640 PR-URL: #8756 Reviewed-By: Ilkka Myller <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]>
In test parallel/child-process-fork-net2 `net.Socket.resume()` is not necessary since `net.Socket.pause()` is never called. PR-URL: #8679 Refs: #4640 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Ilkka Myller <[email protected]>
When NODE_REPL_HISTORY isn't defined `repl` defaults to temporary file This prevents the temporary file from being cleared and removes check on fixture Refs: #4640 PR-URL: #8756 Reviewed-By: Ilkka Myller <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]>
Reverts: 85827bd Using `common.PORT` no longer causes other tests to fail Refs: #4640 PR-URL: #8757 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ilkka Myller <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Reverts: 85827bd Using `common.PORT` no longer causes other tests to fail Refs: #4640 PR-URL: #8757 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ilkka Myller <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
In test parallel/child-process-fork-net2 `net.Socket.resume()` is not necessary since `net.Socket.pause()` is never called. PR-URL: #8679 Refs: #4640 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Ilkka Myller <[email protected]>
When NODE_REPL_HISTORY isn't defined `repl` defaults to temporary file This prevents the temporary file from being cleared and removes check on fixture Refs: #4640 PR-URL: #8756 Reviewed-By: Ilkka Myller <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]>
Reverts: 85827bd Using `common.PORT` no longer causes other tests to fail Refs: #4640 PR-URL: #8757 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ilkka Myller <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
In test parallel/child-process-fork-net2 `net.Socket.resume()` is not necessary since `net.Socket.pause()` is never called. PR-URL: #8679 Refs: #4640 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Ilkka Myller <[email protected]>
Reverts: 85827bd Using `common.PORT` no longer causes other tests to fail Refs: #4640 PR-URL: #8757 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ilkka Myller <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Refs: #4640 PR-URL: #8689 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
Refs: nodejs#4640 PR-URL: nodejs#8689 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
Refs: nodejs#4640 PR-URL: nodejs#8689 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
Refs: nodejs#4640 PR-URL: nodejs#8689 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
Refs: #4640 PR-URL: #8689 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
Refs: #4640 PR-URL: #8689 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
@Trott ... any reason to keep this open? |
(copy/pasted from a related issue) @jasnell I'm OK with closing this and the other TODO/XXX/FIXME issues. If any of those items are things that really ought to be fixed (rather than a wishlist or a "will fix after Magical Feature X is available"), a separate issue should be opened anyway because it's just getting lost in these out-of-date tracking issues. While I think this issue is superfluous personally, anyone else should feel free to re-open (if GitHub permits them to) or comment requesting this be re-opened. |
Ref: #264
There are 11
TODO
,XXX
, andFIXME
comments in thetest
directory. It would be great to either remove them from the code (if they are no longer valid or at least not particularly high value), or get issues opened for them, or just get whatever it is they are addressing addressed. Here they are as of this writing. (Actually, I'm kind of cheating and leaving out two that @santigimeno has PRs in to fix already.)1: test/internet/test-dgram-multicast-multi-process.js:
var sendSocket = dgram.createSocket('udp4');
// FIXME: a libuv limitation makes it necessary to bind()
// before calling any of the set*() functions. The bind()
// call is what creates the actual socket.
EDIT: This one is being discussed in #5023
2: test/parallel/test-child-process-fork-net2.js:
3: test/parallel/test-cluster-disconnect-handles.js:
let isKilling = false;
const handles = require('internal/cluster').handles;
// FIXME(bnoordhuis) lib/cluster.js scans the execArgv arguments for
// debugger flags and renumbers any port numbers it sees starting
// from the default port 5858. Add a '.' that circumvents the
4: test/parallel/test-cluster-http-pipe.js:
http.createServer(function(req, res) {
assert.equal(req.connection.remoteAddress, undefined);
assert.equal(req.connection.localAddress, undefined); // TODO common.PIPE?
res.writeHead(200);
res.end('OK');
5: test/parallel/test-dgram-oob-buffer.js:
});
socket.close(); // FIXME should not be necessary
6: test/parallel/test-domain-multi.js:
});
// XXX this bind should not be necessary.
// the write cb behavior in http/net should use an
// event so that it picks up the domain handling.
7: test/parallel/test-punycode.js:
// (I) Russian (Cyrillic)
/* XXX disabled, fails - possibly a bug in the RFC
'b1abfaaepdrnnbgefbaDotcwatmq2g4l':
'\u043F\u043E\u0447\u0435\u043C\u0443\u0436\u0435\u043E\u043D\u0438' +
8: test/parallel/test-repl-persistent-history.js:
after: function ensureHistoryFixture() {
// XXX(Fishrock123) Make sure nothing weird happened to our fixture
// or it's temporary copy.
// Sometimes this test used to erase the fixture and I'm not sure why.
9: test/pummel/test-tls-securepair-client.js:
function test(keyfn, certfn, check, next) {
// FIXME: Avoid the common PORT as this test currently hits a C-level
// assertion error with node_g. The program aborts without HUPing
// the openssl s_server thus causing many tests to fail with
10: test/parallel/test-setproctitle.js:
// Original test written by Jakub Lekstan [email protected]
// FIXME add sunos support
if ('linux freebsd darwin'.indexOf(process.platform) === -1) {
console.log(
1..0 # Skipped: Unsupported platform [${process.platform}]
);11: test/sequential/test-zerolengthbufferbug.js:
var server = http.createServer(function(req, res) {
var buffer = new Buffer(0);
// FIXME: WTF gjslint want this?
res.writeHead(200, {'Content-Type': 'text/html',
'Content-Length': buffer.length});
/cc @bnoordhuis @Fishrock123
The text was updated successfully, but these errors were encountered: