Last Comment Bug 664029 - Make indexeddb mochitests run in fennec
: Make indexeddb mochitests run in fennec
Status: RESOLVED FIXED
[qa-]
:
Product: Core
Classification: Components
Component: DOM: Core & HTML (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla16
Assigned To: Ben Turner (not reading bugmail, use the needinfo flag!)
:
:
Mentors:
: 682349 (view as bug list)
Depends on: 621362 621363 621367 715862
Blocks: 666693 mochi10s 726378 761125
  Show dependency treegraph
 
Reported: 2011-06-13 16:56 PDT by Josh Matthews [:jdm]
Modified: 2012-08-14 08:28 PDT (History)
13 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
-
fixed
fixed
.N+
+


Attachments
Fix indexeddb mochitests to run green in Fennec. (8.22 KB, patch)
2011-06-13 16:58 PDT, Josh Matthews [:jdm]
no flags Details | Diff | Splinter Review
Fix. (1.92 KB, patch)
2012-06-11 14:56 PDT, Ben Turner (not reading bugmail, use the needinfo flag!)
khuey: review+
blassey.bugs: approval‑mozilla‑aurora+
blassey.bugs: approval‑mozilla‑beta+
Details | Diff | Splinter Review

Description Josh Matthews [:jdm] 2011-06-13 16:56:51 PDT

    
Comment 1 Josh Matthews [:jdm] 2011-06-13 16:58:13 PDT
Created attachment 539045 [details] [diff] [review]
Fix indexeddb mochitests to run green in Fennec.
Comment 2 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2011-08-26 11:30:48 PDT
*** Bug 682349 has been marked as a duplicate of this bug. ***
Comment 3 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-01-06 02:12:55 PST
A very serious regression (bug 715074) just arose because we're not running these tests.  Anything preventing this patch from landing?
Comment 4 Jan Varga [:janv] 2012-01-06 02:35:14 PST
How do I enable these tests on Fennec (in a patch for testing on the try server) ?
Comment 5 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2012-01-06 03:42:23 PST
The tests should just work on native Fennec without this patch.  I have no idea why we're not running them.
Comment 6 Joel Maher ( :jmaher) 2012-01-06 04:28:11 PST
if the tests run fine, please add them to the http://mxr.mozilla.org/mozilla-central/source/testing/mochitest/android.json file.
Comment 7 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2012-01-06 04:38:46 PST
jmaher tells me that there's no way to say "these tests work in native fennec but not xul fennec"
Comment 8 Joel Maher ( :jmaher) 2012-01-06 05:07:59 PST
hmm, it appears that android.json isn't supported yet in releng as per bug 695351.  

I filed bug 664029 to track this.
Comment 9 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-01-06 12:07:26 PST
Why should they not run in xul fennec?
Comment 10 Joel Maher ( :jmaher) 2012-01-06 12:13:40 PST
the tests failed there, I believe due to e10s issues with indexedDB and/or the tests.
Comment 11 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-01-06 12:32:03 PST
If I recall correctly, we had something of a hacky remoting stopgap that should have worked.  If it doesn't, we need to fix it.  Will chat with bent/sicking.  There were longer-range plans for a better one but scheduling that is harder.  In this case, we should enable the tests.

But I don't remember correctly and there wasn't a hacky remoting stopgap, OK, makes sense to have them off.
Comment 12 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2012-01-06 12:34:08 PST
IDL (allegedly) works in e10s, in a single process (I haven't actually tried it myself, wouldn't be surprised if we broke it).   The tests set preferences and permissions though, which is why they don't work.
Comment 13 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2012-01-06 12:36:29 PST
That's IDB, of course.
Comment 14 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-01-06 12:37:06 PST
We have support for cross-process friendly pref-setting now.  ISTR we did the same for permissions.  We really need to get these tests back on: one product (firefox/mobile/tablet) is currently shipping the code (apparently completely untested) and will continue to do so for the foreseeable future, and another product (b2g) will soon be shipping it.
Comment 15 Joel Maher ( :jmaher) 2012-01-23 06:36:40 PST
Feel free to add directories to the testing/mochitest/android.json file and run them on try.  If they work land them and you have new tests turned on.
Comment 16 Jan Varga [:janv] 2012-01-24 07:05:34 PST
https://tbpl.mozilla.org/?tree=Try&rev=5b12dfdfcccb

https://tbpl.mozilla.org/php/getParsedLog.php?id=8788674&tree=Try&full=1

19870 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/indexedDB/test/test_deleteDatabase.html | indexedDB error, code 12
19884 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/indexedDB/test/test_deleteDatabase_interactions.html | indexedDB error, code 12
20184 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/indexedDB/test/test_file_os_delete.html | OS file deleted - got 864000, expected 76400

we need to fix that
Comment 17 Jan Varga [:janv] 2012-01-24 11:01:22 PST
ok, it seems sqlite3_quota_remove() doesn't work on mobile

https://hg.mozilla.org/try/rev/253a99839007
Comment 18 Jan Varga [:janv] 2012-03-27 16:53:40 PDT
we need this for unprefixing IDB
Comment 19 Josh Matthews [:jdm] 2012-03-27 17:56:49 PDT
A SpecialPowers permissions API corresponding to pushPrefEnv was never created. We need to create that, then update the patch in this bug to use it.
Comment 20 Josh Matthews [:jdm] 2012-03-27 17:58:32 PDT
At least, the previous comment is in regards to B2G's e10s model. I don't exactly understand what unprefixing IDB has to do with this patch.
Comment 21 Jonas Sicking (:sicking) No longer reading bugmail consistently 2012-03-27 23:17:50 PDT
We don't want to unprefix an API which is basically completely untested on mobile.
Comment 22 Jonas Sicking (:sicking) No longer reading bugmail consistently 2012-05-24 16:23:18 PDT
Jan: Does your comment 17 mean that IndexedDB doesn't currently work in Fennec? If so, can you file a separate bug on that?
Comment 23 Ben Turner (not reading bugmail, use the needinfo flag!) 2012-06-06 13:22:46 PDT
Comment on attachment 539045 [details] [diff] [review]
Fix indexeddb mochitests to run green in Fennec.

This should have landed as part of e10s stuff. Tests are still orange, but for a different reason.
Comment 24 Joel Maher ( :jmaher) 2012-06-06 13:29:13 PDT
I have ran these recently without this patch and 3 tests timeout and the rest take a long time, before we turn these on, can we make a pass through to ensure these tests are running without major kinks to slow them down?
Comment 25 Joel Maher ( :jmaher) 2012-06-06 14:22:17 PDT
There are a few tests which run noticeably slower on android:
test_add_put.html
test_complex_keyPaths.html
test_clear.html
test_index_update_delete.html

And there are a few that timeout:
test_deleteDatabase.html
test_deleteDatabase_interactions.html
test_file_os_delete.html

These are all unrelated to the patch, but related to getting indexedDB tests running on android.
Comment 26 Jonas Sicking (:sicking) No longer reading bugmail consistently 2012-06-06 18:11:21 PDT
Joel, when I pushed a patch to try which enabled the IDB tests, the test you mention as timing out straight up failed for me, with what looked as legitimate failures.

Bent is looking into this though.
Comment 27 Ben Turner (not reading bugmail, use the needinfo flag!) 2012-06-11 14:56:58 PDT
Created attachment 632030 [details] [diff] [review]
Fix.

This was our fault. Fixed.
Comment 28 Ben Turner (not reading bugmail, use the needinfo flag!) 2012-06-11 15:08:42 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/da773d72a620
Comment 29 Jan Varga [:janv] 2012-06-11 23:25:46 PDT
(In reply to ben turner [:bent] from comment #27)
> Created attachment 632030 [details] [diff] [review]
> Fix.
> 
> This was our fault. Fixed.

So databases and stored files are not quota tracked on Android ?
Comment 30 Graeme McCutcheon [:graememcc] 2012-06-12 03:05:00 PDT
https://hg.mozilla.org/mozilla-central/rev/da773d72a620
Comment 31 Joel Maher ( :jmaher) 2012-06-12 09:30:39 PDT
when I run these locally on my tegra, I get this:
2269 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/indexedDB/test/test_deleteDatabase.html | indexedDB error, 'VersionError'
2270 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/indexedDB/test/test_deleteDatabase.html | an unexpected uncaught JS exception reported through window.onerror - [object Event] at undefined:undefined
2273 INFO TEST-UNEXPECTED-FAIL | /tests/dom/indexedDB/test/test_deleteDatabase_interactions.html | finished in a non-clean fashion (in /tests/dom/indexedDB/test/test_deleteDatabase.html)
2572 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/indexedDB/test/test_file_os_delete.html | OS file deleted - got 864000, expected 764000


I had mentioned these specific test files before.  this is while running with --test-path=dom/indexedDB/test.
Comment 32 Ben Turner (not reading bugmail, use the needinfo flag!) 2012-06-12 10:44:10 PDT
Wait, they're passing on tinderbox right?
Comment 33 Joel Maher ( :jmaher) 2012-06-12 10:50:13 PDT
yes, they are passing, I double checked that.  I was just confused as I can't see them passing on my local tegra with a build from tinderbox.
Comment 34 Ben Turner (not reading bugmail, use the needinfo flag!) 2012-06-13 12:26:55 PDT
This fixes a bug where we didn't properly clear databases in some racy conditions. It bit android tests in particular, but it can happen on any platform.
Comment 35 Ben Turner (not reading bugmail, use the needinfo flag!) 2012-06-13 12:28:32 PDT
Comment on attachment 632030 [details] [diff] [review]
Fix.

[Approval Request Comment]
Bug caused by (feature/regressing bug #): IndexedDB (been around forever)
User impact if declined: Some databases may persist after pages request their deletion.
Testing completed (on m-c, etc.): Good tests on m-c, even fennec.
Risk to taking this patch (and alternatives if risky): This is a very small and very safe patch. I don't expect any risk, to be honest.
String or UUID changes made by this patch: None.
Comment 36 Brad Lassey [:blassey] (use needinfo?) 2012-06-14 12:16:22 PDT
Comment on attachment 632030 [details] [diff] [review]
Fix.

Please land on mozilla-aurora and mozilla-beta, default branch (not 14.0 release branch).

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