Repository navigation
TODO/XXX/FIXME comments in tests #4640
Description
Ref: #264
There are 11 TODO, XXX, and FIXME comments in the test 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:
disconnected += 1; }); // XXX This resume() should be unnecessary. // a stream high water mark should be enough to keep // consuming the input. -
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:
'4', '2', '\'', '\'42\'\n', prompt, prompt],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 kuebzky@gmail.com
// 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});
Activity
Fishrock123 commentedon Jan 12, 2016
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.)
aayn commentedon Jan 15, 2016
I'd like to do this please(as it's tagged 'good first contribution'). So, do I just remove the comments?
Fishrock123 commentedon Jan 15, 2016
@aayn Not quite -- you'd need to do some research in order to check if the comment is still relevant, then decide what to do. Myself or @Trott can probably guide you if you need any help along the way. :)
aayn commentedon Jan 16, 2016
Okay. I'll get to it right away. :)
But yeah, I'll probably need some guidance.
aayn commentedon Jan 16, 2016
For 7: test/parallel/test-punycode.js, the Russian(Cyrillic) test still fails, so an issue should be opened for it probably.
aayn commentedon Jan 16, 2016
For 2: test/parallel/test-child-process-fork-net2.js, seems like the
client.resume()really is unnecessary. To be sure, I ran it 10,000 times without theclient.resume()using a script and it never failed.update: So, both the comment and the
resume()can be removed.aayn commentedon Jan 16, 2016
For 4: test/parallel/test-cluster-http-pipe.js, I think the
// TODO common.PIPEcan be removed straight away. It most likely refers to somecommon.PIPEimplementation which already seems to be done.Even if it doesn't, that comment is not very helpful and should be removed anyway.
Fishrock123 commentedon Jan 16, 2016
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?
aayn commentedon Jan 18, 2016
In 5: test/parallel/test-dgram-oob-buffer.js, I'm not entirely sure why closing a
socketis unnecessary. Seems fine to me. If it is indeed fine, then just removing the comment would do.aayn commentedon Jan 18, 2016
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
eslint test-zerolengthbufferbug.jsthrows:1:1 error Definition for rule 'new-with-error' was not found new-with-error1:1 error Definition for rule 'required-modules' was not found required-modulesupdate: @Trott Yup. That command works. My bad. Turns out that comment(thanks for introducing me to
git blame) was written by 'Oleg Efimov' all the way back in 2010. But, I still can't understand what the comment is referring to.Trott commentedon Jan 18, 2016
@aayn Those lint issues are because (for whatever reason) your eslint is not loading the custom rules that are specified in the project
.eslintrcand contained intools/eslint-rules. They are unrelated to the contents of the file.EDIT: This command should work from the top-level directory of the project:
33 remaining items
test: remove FIXME pummel/test-tls-securepair-client
test: remove obsolete comment from dgram test
test: remove obsolete comment from dgram test
test: remove obsolete comment from dgram test
test: remove obsolete comment from dgram test
test: remove obsolete comment from dgram test
test: remove obsolete comment from dgram test
jasnell commentedon May 30, 2017
@Trott ... any reason to keep this open?
Trott commentedon May 30, 2017
(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.