Closed Bug 521191 Opened 15 years ago Closed 15 years ago

xpcshell-tests: some unit tests fail with the '-S' option ('strict' & 'werror' on)

Categories

(Core :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.3a1
Tracking Status
status1.9.2 --- final-fixed

People

(Reporter: lusian, Assigned: lusian)

References

Details

Attachments

(1 file, 2 obsolete files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.3a1pre) Gecko/20091007 Minefield/3.7a1pre (.NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.3a1pre) Gecko/20091007 Minefield/3.7a1pre (.NET CLR 3.5.30729)

dom/src/json/test/unit/:
TEST-UNEXPECTED-FAIL | c:\mozilla-build\mozilla-central\_tests\xpcshell\json_tes
t\unit\test_decode.js | test failed (with xpcshell return code: 3), see followin
g log:
  >>>>>>>
  json2.js:349: TypeError: function str does not always return a value:
json2.js:349:     }

json2.js:349: ........^

  <<<<<<<

/intl/uconv/tests/unit/test_charset_conversion.js
TEST-UNEXPECTED-FAIL | c:\mozilla-build\mozilla-central\_tests\xpcshell\test_int
l_uconv\unit\test_charset_conversion.js | test failed (with xpcshell return code
: 3), see following log:
  >>>>>>>
  c:/mozilla-build/mozilla-central/_tests/xpcshell/test_intl_uconv/unit/test_cha
rset_conversion.js:202: TypeError: function equal does not always return a value
:
c:/mozilla-build/mozilla-central/_tests/xpcshell/test_intl_uconv/unit/test_chars
et_conversion.js:202: }

c:/mozilla-build/mozilla-central/_tests/xpcshell/test_intl_uconv/unit/test_chars
et_conversion.js:202: .........................^

  <<<<<<<

/modules/libjar/zipwriter/test/unit/test_zippermissions.js
TEST-UNEXPECTED-FAIL | (xpcshell/head.js) | TypeError: assignment to undeclared
variable zipR
uncaught exception: [Exception... "Component returned failure code: 0x80004005 (
NS_ERROR_FAILURE) [nsIFile.remove]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"
location: "JS frame :: c:/mozilla-build/mozilla-central/_tests/xpcshell/test_zip
writer/unit/tail_zipwriter.js :: <TOP_LEVEL> :: line 47"  data: no]

  <<<<<<<

/toolkit/mozapps/extensions/test/unit/test_bug386153.js
TEST-UNEXPECTED-FAIL | c:\mozilla-build\mozilla-central\_tests\xpcshell\test_ext
ensionmanager\unit\test_bug386153.js | test failed (with xpcshell return code: 3
), see following log:
  >>>>>>>
  c:/mozilla-build/mozilla-central/_tests/xpcshell/test_extensionmanager/unit/te
st_bug386153.js:51: TypeError: function findXPI does not always return a value:
c:/mozilla-build/mozilla-central/_tests/xpcshell/test_extensionmanager/unit/test
_bug386153.js:51: }

c:/mozilla-build/mozilla-central/_tests/xpcshell/test_extensionmanager/unit/test
_bug386153.js:51: ........................................^

  <<<<<<<

Reproducible: Always

Steps to Reproduce:
1. Run the xpcshell tests with the '-S' option

Actual Results:  
Failed

Expected Results:  
Passed
Attached patch Fix errors (obsolete) — Splinter Review
Version: unspecified → Trunk
Attachment #405228 - Flags: review?(tglek)
Attachment #405228 - Flags: review?(smontagu)
Attachment #405228 - Flags: review?(mano)
Attachment #405228 - Flags: review?(jonas)
Assignee: nobody → lusian
Status: UNCONFIRMED → NEW
Ever confirmed: true
Severity: trivial → normal
Product: Testing → Core
QA Contact: general → general
Attached patch Convert to UNIX newline (obsolete) — Splinter Review
Attachment #405228 - Attachment is obsolete: true
Attachment #405444 - Flags: review?(tglek)
Attachment #405444 - Flags: review?(smontagu)
Attachment #405444 - Flags: review?(mano)
Attachment #405444 - Flags: review?(jonas)
Attachment #405228 - Flags: review?(tglek)
Attachment #405228 - Flags: review?(smontagu)
Attachment #405228 - Flags: review?(mano)
Attachment #405228 - Flags: review?(jonas)
Comment on attachment 405444 [details] [diff] [review]
Convert to UNIX newline

r=smontagu for intl
Attachment #405444 - Flags: review?(smontagu) → review+
Comment on attachment 405444 [details] [diff] [review]
Convert to UNIX newline


>diff --git a/toolkit/mozapps/extensions/test/unit/test_bug386153.js b/toolkit/mozapps/extensions/test/unit/test_bug386153.js
>--- a/toolkit/mozapps/extensions/test/unit/test_bug386153.js
>+++ b/toolkit/mozapps/extensions/test/unit/test_bug386153.js
>@@ -43,16 +43,17 @@ const URI_XPINSTALL_CONFIRM_DIALOG = "ch
> 
> // Finds the index of the given xpi in the dialogparamblock strings
> function findXPI(dpb, name) {
>   for (var i = 0; i < 5; i++) {
>     if (dpb.GetString(i * 4 + 1).substr(-(name.length + 1)) == "/" + name)
>       return i * 4;
>   }
>   do_throw(name + " wasn't in the list");
>+  return false;
> }
> 

should be |return 0;|

r=mano for toolkit.
Attachment #405444 - Flags: review?(mano) → review+
Blocks: 524781
Comment on attachment 405444 [details] [diff] [review]
Convert to UNIX newline

I really don't know any of this code. Have you tried checking with the people that wrote the tests?
Attachment #405444 - Flags: review?(jonas)
Whom should I ask to review /dom/src/json/test/unit/json2.js?  It seems to be taken from http://www.json.org/json2.js.
Comment on attachment 405444 [details] [diff] [review]
Convert to UNIX newline

Dave Townsend, can you review the /modules/ part?
Attachment #405444 - Flags: review?(tglek) → review?(dtownsend)
Attachment #405444 - Flags: review?(dtownsend) → review+
Attachment #405444 - Attachment is obsolete: true
Keywords: checkin-needed
http://hg.mozilla.org/mozilla-central/rev/5c9f28baa878
Status: NEW → RESOLVED
Closed: 15 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a1
Flags: in-testsuite+
Keywords: checkin-needed
Whiteboard: [c-n: m-1.9.2, m-1.9.1]
Pushed to 1.9.2: http://hg.mozilla.org/releases/mozilla-1.9.2/rev/a97754ee5736
Whiteboard: [c-n: m-1.9.2, m-1.9.1] → [c-n: m-1.9.1]
Clearing checkin keywords since these patches don't have 1.9.1 approval. Please request approval on the patches, and once granted, replace the checkin keyword.
Keywords: checkin-needed
Whiteboard: [c-n: m-1.9.1]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: