Add tests for nsI*Stream

RESOLVED FIXED in mozilla1.9beta2

Status

()

RESOLVED FIXED
11 years ago
11 years ago

People

(Reporter: WeirdAl, Assigned: WeirdAl)

Tracking

(Depends on: 2 bugs)

Trunk
mozilla1.9beta2
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

11 years ago
Created attachment 286745 [details] [diff] [review]
initial test file

Binary, string, async, scriptable, converters, tees, multiplexes, seekable, unichar...

This first test is for binary streams.  (I needed to learn how to do them anyway.  I also need to write a test for binary sockets, but that's under netwerk.)
Flags: in-testsuite?
Attachment #286745 - Flags: review?(benjamin)

Updated

11 years ago
Attachment #286745 - Flags: review?(benjamin) → review+
(Assignee)

Comment 1

11 years ago
tests only, shouldn't need approval
Keywords: checkin-needed
Assignee: nobody → ajvincent
RCS file: /cvsroot/mozilla/xpcom/tests/unit/test_streams.js,v
done
Checking in xpcom/tests/unit/test_streams.js;
/cvsroot/mozilla/xpcom/tests/unit/test_streams.js,v  <--  test_streams.js
initial revision: 1.1
done
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9 M10
This test caused orange on the unit test boxen after it was checked-in.

*** CHECK FAILED: -0.22227387432800896 == 1.4142135623730951

Offending lines:
  os.writeDouble(Math.SQRT2);
  do_check_eq(is.readDouble(), Math.SQRT2);

Commenting these lines out makes the test pass. bz thinks it may actually be a bug in the streams. He is going to look tomorrow.
Flags: in-testsuite? → in-testsuite+
(In reply to comment #3)
> Commenting these lines out makes the test pass. bz thinks it may actually be a
> bug in the streams. He is going to look tomorrow.

Interestingly, this test is still failing on the SeaMonkey linux tinderbox:

*** CHECK FAILED: -0.02285707593528823 == 1.4142135623730951
  JS frame :: /builds/tinderbox/SeaMonkey-Trunk/Linux_2.6.18-8.el5_Depend/mozilla/tools/test-harness/xpcshell-simple/head.js :: do_throw :: line 99
  JS frame :: /builds/tinderbox/SeaMonkey-Trunk/Linux_2.6.18-8.el5_Depend/mozilla/tools/test-harness/xpcshell-simple/head.js :: do_check_eq :: line 114
  JS frame :: ../../_tests/xpcshell-simple/xpcom/unit/test_streams.js :: test_binary_streams :: line 138
  JS frame :: ../../_tests/xpcshell-simple/xpcom/unit/test_streams.js :: run_test :: line 183
  JS frame :: /builds/tinderbox/SeaMonkey-Trunk/Linux_2.6.18-8.el5_Depend/mozilla/tools/test-harness/xpcshell-simple/tail.js :: _execute_test :: line 41
  JS frame :: /builds/tinderbox/SeaMonkey-Trunk/Linux_2.6.18-8.el5_Depend/mozilla/tools/test-harness/xpcshell-simple/execute_test.js :: <TOP_LEVEL> :: line 38
  2147500036
  *** FAIL ***

looks like line 138: 

do_check_eq(is.readDouble(), Math.SQRT2);

needs commenting out as well.

Somehow the Firefox tinderbox is passing despite this...

Comment 5

11 years ago
This blocks SeaMonkey from getting nightly builds at the moment.

Comment 6

11 years ago
Of course, the matching .writeDouble() also needs to be commented out.

I checked in comments for those lines (119 and 138) as well with r+sr=biesi in #developers so that SeaMonkey can go green and build nightlies.

Something definitely is wrong here though, maybe even a real stream failure detected by the test.
Unfortunately, I can't reproduce the breakage locally.  :(  So not much I can do here.
(Assignee)

Comment 8

11 years ago
bz: do you want a new bug filed for this test bustage?
Yes.  And it would be great if someone can reproduce...
(Assignee)

Updated

11 years ago
Depends on: 403783
(Assignee)

Updated

11 years ago
Depends on: 409881
You need to log in before you can comment on or make changes to this bug.