Last Comment Bug 677427 - xpcshell test netwerk/test/unit/test_bug650955.js fails on Android
: xpcshell test netwerk/test/unit/test_bug650955.js fails on Android
Status: RESOLVED FIXED
[mobile-testing][xpcshell]
:
Product: Core
Classification: Components
Component: Networking: Cache (show other bugs)
: Trunk
: x86 Android
: -- normal (vote)
: mozilla9
Assigned To: Geoff Brown [:gbrown] (pto May 28-June 13)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-08 17:17 PDT by Geoff Brown [:gbrown] (pto May 28-June 13)
Modified: 2011-09-07 07:58 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
log showing xpcshell output for test_bug650955.js on Android (15.07 KB, text/plain)
2011-08-08 17:19 PDT, Geoff Brown [:gbrown] (pto May 28-June 13)
no flags Details
necko log of failed test run on Android (104.00 KB, text/plain)
2011-08-15 14:58 PDT, Geoff Brown [:gbrown] (pto May 28-June 13)
no flags Details
patch for review (2.09 KB, patch)
2011-08-23 10:10 PDT, Geoff Brown [:gbrown] (pto May 28-June 13)
no flags Details | Diff | Review
patch for review (2.34 KB, patch)
2011-08-23 18:05 PDT, Geoff Brown [:gbrown] (pto May 28-June 13)
bjarne: review+
Details | Diff | Review

Description Geoff Brown [:gbrown] (pto May 28-June 13) 2011-08-08 17:17:17 PDT
With patches for bug 668349 and 668351, xpcshell tests can be run on an Android device, and the majority of tests pass. 

However, netwerk/test/unit/test_bug650955.js consistently fails when run on Android.

(I thought this might be related to intermittent failures of this test on Mac, and tried applying the patch from Bug 667593, but that did not help -- the test failed with identical error messages).
Comment 1 Geoff Brown [:gbrown] (pto May 28-June 13) 2011-08-08 17:19:52 PDT
Created attachment 551632 [details]
log showing xpcshell output for test_bug650955.js on Android
Comment 2 Geoff Brown [:gbrown] (pto May 28-June 13) 2011-08-15 14:58:06 PDT
Created attachment 553275 [details]
necko log of failed test run on Android
Comment 3 Geoff Brown [:gbrown] (pto May 28-June 13) 2011-08-23 09:48:17 PDT
The memory cache tests pass, but the disk cache tests fail. The problem is that the preference browser.cache.disk.capacity has a default of 0 in Fennec, so the disk cache is still effectively disabled, even after browser.cache.disk.enable is set to true.
Comment 4 Geoff Brown [:gbrown] (pto May 28-June 13) 2011-08-23 10:10:55 PDT
Created attachment 555125 [details] [diff] [review]
patch for review

test_bug650955.js passes reliably with this patch. If enabling the disk cache and disk cache capacity is 0, capacity is set to 1024 (an arbitrary, small cache). To guard against a similar issue arising with the memory cache, a similar check is made for the memory cache capacity, when enabling the memory cache.
Comment 5 Geoff Brown [:gbrown] (pto May 28-June 13) 2011-08-23 18:05:57 PDT
Created attachment 555265 [details] [diff] [review]
patch for review

I noticed a problem with the previous patch: If either of the capacity prefs does not exist, the test fails. Now updated to allow for non-existent prefs.
Comment 6 Bjarne (:bjarne) 2011-09-05 06:07:54 PDT
Comment on attachment 555265 [details] [diff] [review]
patch for review

Review of attachment 555265 [details] [diff] [review]:
-----------------------------------------------------------------

Nice
Comment 7 Daniel Holbert [:dholbert] 2011-09-06 16:59:40 PDT
Comment on attachment 555265 [details] [diff] [review]
patch for review

I fixed end-of-line whitespace...
>+        if (memDevice) {
>+            try {
>+                cap = prefService.getIntPref("browser.cache.memory.capacity");
>+            } 
...here -------^

>+        if (diskDevice) {
>+            try {
>+                cap = prefService.getIntPref("browser.cache.disk.capacity");
>+            } 
...and here ---^

and pushed to mozilla-inbound:
http://hg.mozilla.org/integration/mozilla-inbound/rev/bc6b53c4e931
Comment 8 :Ehsan Akhgari (busy, don't ask for review please) 2011-09-07 07:58:00 PDT
http://hg.mozilla.org/mozilla-central/rev/bc6b53c4e931

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