Last Comment Bug 836061 - Multiple consistent test failures on m-i and m-c test runs.
: Multiple consistent test failures on m-i and m-c test runs.
Product: Add-on SDK
Classification: Client Software
Component: General (show other bugs)
: unspecified
: All All
: -- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
Depends on:
Blocks: 786135 836564
  Show dependency treegraph
Reported: 2013-01-29 15:10 PST by Wes Kocher (:KWierso)
Modified: 2013-01-31 13:35 PST (History)
5 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---

Pointer to Github pull request: (355 bytes, text/html)
2013-01-30 10:38 PST, Dave Townsend [:mossop]
poirot.alex: review+

Description Wes Kocher (:KWierso) 2013-01-29 15:10:14 PST
Something in 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
  File "resource://gre/modules/AddonManager.jsm", line 2064, in AMP_callInstallListeners
  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
  File "resource://dc749199-2188-468f-9c2e-836b4ec4d0a4-at-jetpack/addon-sdk/lib/sdk/addon/installer.js", line 59, in install/listener.onInstallFailed
  File "resource://dc749199-2188-468f-9c2e-836b4ec4d0a4-at-jetpack/addon-sdk/lib/sdk/core/promise.js", line 153, in reject
  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"Install failed: "+code);
  File "resource://dc749199-2188-468f-9c2e-836b4ec4d0a4-at-jetpack/addon-sdk/lib/sdk/test/assert.js", line 68, in fail;
  File "resource://dc749199-2188-468f-9c2e-836b4ec4d0a4-at-jetpack/addon-sdk/lib/sdk/deprecated/unit-test.js", line 88, in fail

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
  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
  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 =, 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
  File "resource://dc749199-2188-468f-9c2e-836b4ec4d0a4-at-jetpack/addon-sdk/lib/sdk/io/text-streams.js", line 185, in null, err);
  File "resource://dc749199-2188-468f-9c2e-836b4ec4d0a4-at-jetpack/addon-sdk/lib/sdk/simple-storage.js", line 171, in writeAsync
  File "resource://dc749199-2188-468f-9c2e-836b4ec4d0a4-at-jetpack/addon-sdk/tests/test-simple-storage.js", line 296, in null
    test.assert(compare(, 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;
  File "resource://dc749199-2188-468f-9c2e-836b4ec4d0a4-at-jetpack/addon-sdk/lib/sdk/deprecated/unit-test.js", line 88, in fail

Oddly, the Win Opt builds seem unaffected.

I don't see anything in that push that stands out as a likely suspect.
Comment 1 Dave Townsend [:mossop] 2013-01-30 09:54:11 PST
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 Dave Townsend [:mossop] 2013-01-30 10:38:09 PST
Created attachment 708217 [details]
Pointer to Github pull request:

Pointer to Github pull-request
Comment 3 Dave Townsend [:mossop] 2013-01-30 10:38:40 PST
Comment on attachment 708217 [details]
Pointer to Github pull request:

This fixes the test failures on my linux VM
Comment 4 Alexandre Poirot [:ochameau] 2013-01-30 11:35:13 PST
Comment on attachment 708217 [details]
Pointer to Github pull request:

Thanks for figuring out that so quickly!
Comment 5 Jeff Walden [:Waldo] (remove +bmo to email) 2013-01-30 11:49:58 PST
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:

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 [github robot] 2013-01-30 12:06:20 PST
Commit pushed to master at
Bug 836061: Specify the radix for octal parseInt calls. r=ochemeau
Comment 7 Dave Townsend [:mossop] 2013-01-30 12:07:02 PST
We should cherry-pick this to stabilization and update the m-c test changeset.
Comment 8 Wes Kocher (:KWierso) 2013-01-30 14:06:01 PST
Pushed an update to our tests in m-i to pick up this fix:
Comment 9 [github robot] 2013-01-30 20:38:15 PST
Commit pushed to release at
Bug 836061: Specify the radix for octal parseInt calls. r=ochemeau
Comment 10 [github robot] 2013-01-30 20:40:45 PST
Commit pushed to stabilization at
Bug 836061: Specify the radix for octal parseInt calls. r=ochemeau
Comment 11 Ryan VanderMeulen [:RyanVM] 2013-01-31 13:35:41 PST

Note You need to log in before you can comment on or make changes to this bug.