Closed
Bug 836061
Opened 11 years ago
Closed 11 years ago
Multiple consistent test failures on m-i and m-c test runs.
Categories
(Add-on SDK Graveyard :: General, defect)
Add-on SDK Graveyard
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: KWierso, Unassigned)
References
()
Details
Attachments
(1 file)
Something in https://tbpl.mozilla.org/?noignore=1&tree=Mozilla-Inbound&jobname=jetpack&rev=67f7ebdea2fe broke several of our tests: The following tests failed: test-addon-installer.test Install: failure test-addon-installer.test Update: failure test-byte-streams.testReadLengths: exception test-byte-streams.testTruncate: exception test-byte-streams.testWriteRead: exception test-byte-streams.testWriteReadBig: exception test-byte-streams.testWriteReadChunks: exception test-file.testOpenTypes: exception test-page-mod.testEvents: timed out test-page-mod.testPageModCssDestroy: failure test-simple-storage.testQuotaExceededHandle: failure test-simple-storage.testQuotaExceededNoHandle: failure test-simple-storage.testSetGet: failure test-simple-storage.testSetGetRootArray: failure test-simple-storage.testSetGetRootBool: failure test-simple-storage.testSetGetRootNull: failure test-simple-storage.testSetGetRootNumber: failure test-simple-storage.testSetGetRootObject: failure test-simple-storage.testSetGetRootString: failure test-simple-storage.testSetNoSetRead: failure test-text-streams.testWriteAsync: timed out test-text-streams.testWriteRead: exception test-tmp-file.testCreateFromString: exception test-tmp-file.testCreateFromURL: exception I'm seeing several tracebacks similar to this: error: addon-sdk: fail: Install failed: -1 info: addon-sdk: Traceback (most recent call last): File "resource://gre/modules/XPIProvider.jsm", line 4869, in AI_onStopRequest this.downloadFailed(AddonManager.ERROR_NETWORK_FAILURE, aStatus); File "resource://gre/modules/XPIProvider.jsm", line 4887, in AI_downloadFailed this.wrapper); File "resource://gre/modules/AddonManager.jsm", line 2064, in AMP_callInstallListeners aArgs); File "resource://gre/modules/AddonManager.jsm", line 1156, in AMI_callInstallListeners if (listener[aMethod].apply(listener, aArgs) === false) File "resource://dc749199-2188-468f-9c2e-836b4ec4d0a4-at-jetpack/addon-sdk/lib/sdk/addon/installer.js", line 62, in install/listener.onDownloadFailed this.onInstallFailed(aInstall); File "resource://dc749199-2188-468f-9c2e-836b4ec4d0a4-at-jetpack/addon-sdk/lib/sdk/addon/installer.js", line 59, in install/listener.onInstallFailed reject(aInstall.error); File "resource://dc749199-2188-468f-9c2e-836b4ec4d0a4-at-jetpack/addon-sdk/lib/sdk/core/promise.js", line 153, in reject deferred.resolve(rejection(reason)) File "resource://dc749199-2188-468f-9c2e-836b4ec4d0a4-at-jetpack/addon-sdk/lib/sdk/core/promise.js", line 143, in resolve while (pending.length) result.then.apply(result, pending.shift()) File "resource://dc749199-2188-468f-9c2e-836b4ec4d0a4-at-jetpack/addon-sdk/lib/sdk/core/promise.js", line 45, in then return { then: function then(resolve, reject) { reject(reason) } } File "resource://dc749199-2188-468f-9c2e-836b4ec4d0a4-at-jetpack/addon-sdk/lib/sdk/core/promise.js", line 118, in rejected function rejected(reason) { deferred.resolve(reject(reason)) } File "resource://dc749199-2188-468f-9c2e-836b4ec4d0a4-at-jetpack/addon-sdk/lib/sdk/core/promise.js", line 55, in effort try { return f(options) } File "resource://dc749199-2188-468f-9c2e-836b4ec4d0a4-at-jetpack/addon-sdk/tests/test-addon-installer.js", line 46, in onFailure assert.fail("Install failed: "+code); File "resource://dc749199-2188-468f-9c2e-836b4ec4d0a4-at-jetpack/addon-sdk/lib/sdk/test/assert.js", line 68, in fail this._log.fail(e); File "resource://dc749199-2188-468f-9c2e-836b4ec4d0a4-at-jetpack/addon-sdk/lib/sdk/deprecated/unit-test.js", line 88, in fail this.console.trace(); And others like this: error: addon-sdk: An exception occurred. NS_ERROR_FILE_ACCESS_DENIED: Component returned failure code: 0x80520015 (NS_ERROR_FILE_ACCESS_DENIED) [nsIFileInputStream.init] undefined 162 Traceback (most recent call last): File "resource://dc749199-2188-468f-9c2e-836b4ec4d0a4-at-jetpack/addon-sdk/lib/sdk/timers.js", line 31, in notify callback.apply(null, args); File "resource://dc749199-2188-468f-9c2e-836b4ec4d0a4-at-jetpack/addon-sdk/lib/sdk/deprecated/unit-test.js", line 286, in null timer.setTimeout(function() { onDone(self); }, 0); File "resource://dc749199-2188-468f-9c2e-836b4ec4d0a4-at-jetpack/addon-sdk/lib/sdk/deprecated/unit-test.js", line 456, in null options.onDone(self); File "resource://dc749199-2188-468f-9c2e-836b4ec4d0a4-at-jetpack/addon-sdk/lib/sdk/deprecated/unit-test.js", line 438, in runNextTest self.start({test: test, onDone: runNextTest}); File "resource://dc749199-2188-468f-9c2e-836b4ec4d0a4-at-jetpack/addon-sdk/lib/sdk/deprecated/unit-test.js", line 469, in start this.test.testFunction(this); File "resource://dc749199-2188-468f-9c2e-836b4ec4d0a4-at-jetpack/addon-sdk/tests/test-byte-streams.js", line 130, in exports.testTruncate stream = open(test, fname); File "resource://dc749199-2188-468f-9c2e-836b4ec4d0a4-at-jetpack/addon-sdk/tests/test-byte-streams.js", line 164, in open let stream = file.open(filename, forWriting ? "wb" : "b"); File "resource://dc749199-2188-468f-9c2e-836b4ec4d0a4-at-jetpack/addon-sdk/lib/sdk/io/file.js", line 162, in open stream.init(file, OPEN_FLAGS.RDONLY, 0, 0); And more: info: addon-sdk: Traceback (most recent call last): File "resource://gre/modules/NetUtil.jsm", line 85, in null aCallback(aStatusCode); File "resource://dc749199-2188-468f-9c2e-836b4ec4d0a4-at-jetpack/addon-sdk/lib/sdk/io/text-streams.js", line 185, in null callback.call(self, err); File "resource://dc749199-2188-468f-9c2e-836b4ec4d0a4-at-jetpack/addon-sdk/lib/sdk/simple-storage.js", line 171, in writeAsync this.onWrite(this); File "resource://dc749199-2188-468f-9c2e-836b4ec4d0a4-at-jetpack/addon-sdk/tests/test-simple-storage.js", line 296, in null test.assert(compare(ss.storage, val), "Value should persist"); File "resource://dc749199-2188-468f-9c2e-836b4ec4d0a4-at-jetpack/addon-sdk/lib/sdk/deprecated/unit-test.js", line 156, in assert this.fail(message); File "resource://dc749199-2188-468f-9c2e-836b4ec4d0a4-at-jetpack/addon-sdk/lib/sdk/deprecated/unit-test.js", line 88, in fail this.console.trace(); Oddly, the Win Opt builds seem unaffected. I don't see anything in that push that stands out as a likely suspect.
Comment 1•11 years ago
|
||
This was caused by bug 786135 turning off the octal behaviour of parseInt which we use to set file and directory permissions in the SDK code.
Comment 2•11 years ago
|
||
Pointer to Github pull-request
Comment 3•11 years ago
|
||
Comment on attachment 708217 [details] Pointer to Github pull request: https://github.com/mozilla/addon-sdk/pull/748 This fixes the test failures on my linux VM
Attachment #708217 -
Flags: review?(poirot.alex)
Comment 4•11 years ago
|
||
Comment on attachment 708217 [details] Pointer to Github pull request: https://github.com/mozilla/addon-sdk/pull/748 Thanks for figuring out that so quickly!
Attachment #708217 -
Flags: review?(poirot.alex) → review+
Comment 5•11 years ago
|
||
Note that really you should add the radix to every call to parseInt, not just the ones where there was a behavior change, as a matter of good style and bug-avoidance both: http://web.archive.org/web/20120711120755/http://whereswalden.com/2011/02/26/the-proper-way-to-call-parseint-tldr-parseintstr-radix/ Style guides these days pretty much always say to specify a radix, partly because of this octal/decimal issue, partly because if your input string format changes you can get unexpectedly weird results.
Comment 6•11 years ago
|
||
Commit pushed to master at https://github.com/mozilla/addon-sdk https://github.com/mozilla/addon-sdk/commit/e55273263c075229c6f3f7d4fd55eb632f1304a0 Bug 836061: Specify the radix for octal parseInt calls. r=ochemeau
Comment 7•11 years ago
|
||
We should cherry-pick this to stabilization and update the m-c test changeset.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 8•11 years ago
|
||
Pushed an update to our tests in m-i to pick up this fix: http://hg.mozilla.org/integration/mozilla-inbound/rev/125b4493eaec
Comment 9•11 years ago
|
||
Commit pushed to release at https://github.com/mozilla/addon-sdk https://github.com/mozilla/addon-sdk/commit/72abaf8258e693b99d784da9e284ebb7e8b3c52c Bug 836061: Specify the radix for octal parseInt calls. r=ochemeau
Comment 10•11 years ago
|
||
Commit pushed to stabilization at https://github.com/mozilla/addon-sdk https://github.com/mozilla/addon-sdk/commit/72abaf8258e693b99d784da9e284ebb7e8b3c52c Bug 836061: Specify the radix for octal parseInt calls. r=ochemeau
You need to log in
before you can comment on or make changes to this bug.
Description
•