Closed Bug 675049 Opened 13 years ago Closed 12 years ago

xpcshell/netwerk/test/unit/test_bug654926.js fails on Android

Categories

(Core :: Networking, defect)

x86
Android
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 751603

People

(Reporter: gbrown, Assigned: gbrown)

References

Details

(Whiteboard: [mobile-testing][xpcshell])

With patches for bug 668349 and 668351, the network xpcshell tests can be run on an Android device. Most of the /unit tests pass, but a few of the /unit tests fail. test_bug654926.js test_bug654926_doom_and_read.js and test_bug654926_test_seek.js fail with similar log output. Here is the output for test_bug654926.js: TEST-INFO | /home/geoff/src/mozilla-central/objdir-droid/_tests/xpcshell/netwerk/test/unit/test_bug654926.js | running test ... TEST-UNEXPECTED-FAIL | /home/geoff/src/mozilla-central/objdir-droid/_tests/xpcshell/netwerk/test/unit/test_bug654926.js | test failed (with xpcshell return code: 0), see following log: >>>>>>> WARNING: XPCOM objects created/destroyed from static ctor/dtor: file /home/geoff/src/mozilla-central/xpcom/base/nsTraceRefcntImpl.cpp, line 172 WARNING: No default pref files found.: file /home/geoff/src/mozilla-central/modules/libpref/src/Preferences.cpp, line 923 WARNING: GetIsLinkUp is not supported without a bridge connection: file /home/geoff/src/mozilla-central/netwerk/system/android/nsAndroidNetworkLinkService.cpp, line 61 TEST-INFO | (xpcshell/head.js) | test 1 pending WARNING: Unable to read system value: 'aValue > 0', file /home/geoff/src/mozilla-central/xpcom/base/nsSystemInfo.cpp, line 191 TEST-PASS | /data/local/tests/xpcshell/scripts/unit/test_bug654926.js | [sync_with_cache_IO_thread : 34] null == null TEST-INFO | (xpcshell/head.js) | test 2 pending TEST-INFO | (xpcshell/head.js) | test 2 finished TEST-INFO | (xpcshell/head.js) | running event loop TEST-UNEXPECTED-FAIL | /data/local/tests/xpcshell/scripts/unit/test_bug654926.js | 2147500037 == 2152398909 - See following stack: JS frame :: /data/local/tests/xpcshell/scripts/head.js :: do_throw :: line 445 JS frame :: /data/local/tests/xpcshell/scripts/head.js :: _do_check_eq :: line 539 JS frame :: /data/local/tests/xpcshell/scripts/head.js :: do_check_eq :: line 560 JS frame :: /data/local/tests/xpcshell/scripts/unit/test_bug654926.js :: oCEA :: line 50 TEST-INFO | (xpcshell/head.js) | exiting test WARNING: nsExceptionService ignoring thread destruction after shutdown: file /home/geoff/src/mozilla-central/xpcom/base/nsExceptionService.cpp, line 197 WARNING: OOPDeinit() without successful OOPInit(): file /home/geoff/src/mozilla-central/toolkit/crashreporter/nsExceptionHandler.cpp, line 1830 nsStringStats => mAllocCount: 1518 => mReallocCount: 92 => mFreeCount: 1518 => mShareCount: 6990 => mAdoptCount: 56 => mAdoptFreeCount: 56 WARNING: XPCOM objects created/destroyed from static ctor/dtor: file /home/geoff/src/mozilla-central/xpcom/base/nsTraceRefcntImpl.cpp, line 172 <<<<<<<
Whiteboard: [mobile-testing][xpcshell]
test_bug654926.js passes if the disk cache is enabled (both .enabled and .capacity prefs need to be updated). The other tests continue to fail with the disk cache enabled.
Now only test_bug654926.js fails. Latest log: mozdev@mozdev-virtual-machine:~/src/objdir-native-droid$ make SOLO_FILE=test_bug654926.js -C netwerk/test check-one-remote make: Entering directory `/home/mozdev/src/objdir-native-droid/netwerk/test' /usr/bin/python2.7 -u /home/mozdev/src/config/pythonpath.py \ -I/home/mozdev/src/build \ -I/home/mozdev/src/build/mobile \ /home/mozdev/src/testing/xpcshell/remotexpcshelltests.py \ --symbols-path=../../dist/crashreporter-symbols \ --build-info-json=../../mozinfo.json \ --test-path=test_bug654926.js \ --profile-name=fennec \ --verbose \ \ --dm_trans=sut \ --deviceIP=192.168.0.70 \ --objdir=../.. \ --noSetup \ ../../_tests/xpcshell/netwerk/test/unit ../../_tests/xpcshell/netwerk/test/unit_ipc reconnecting socket using APK: ../../dist/fennec-14.0a1.en-US.android-arm.apk TEST-INFO | profile dir is /data/local/tests/xpcshell/p TEST-INFO | /home/mozdev/src/objdir-native-droid/_tests/xpcshell/netwerk/test/unit/test_bug654926.js | running test ... TEST-INFO | /home/mozdev/src/objdir-native-droid/_tests/xpcshell/netwerk/test/unit/test_bug654926.js | full command: ['/data/local/tests/xpcshell/b/xpcshell', '-r', '/data/local/tests/xpcshell/c/httpd.manifest', '--greomni', '/data/local/tests/xpcshell/b/fennec-14.0a1.en-US.android-arm.apk', '-s', '-e', 'const _HTTPD_JS_PATH = "/data/local/tests/xpcshell/c/httpd.js";', '-e', 'const _HEAD_JS_PATH = "/data/local/tests/xpcshell/head.js";', '-f', '/data/local/tests/xpcshell/head.js', '-e', 'const _SERVER_ADDR = "localhost"', '-e', 'const _HEAD_FILES = ["/data/local/tests/xpcshell/netwerk/test/unit/head_channels.js"];', '-e', 'const _TAIL_FILES = [];', '-e', 'const _TEST_FILE = ["test_bug654926.js"];', '-e', '_execute_test(); quit(0);'] TEST-INFO | /home/mozdev/src/objdir-native-droid/_tests/xpcshell/netwerk/test/unit/test_bug654926.js | current directory: '/home/mozdev/src/objdir-native-droid/_tests/xpcshell/netwerk/test/unit' TEST-INFO | /home/mozdev/src/objdir-native-droid/_tests/xpcshell/netwerk/test/unit/test_bug654926.js | environment: ['XPCOM_MEM_LEAK_LOG=/data/local/tests/xpcshell/p/runxpcshelltests_leaks.log', 'NS_TRACE_MALLOC_DISABLE_STACKS=1', 'XPCOM_DEBUG_BREAK=stack-and-abort', 'MOZ_CRASHREPORTER_NO_REPORT=1', 'LD_LIBRARY_PATH=/home/mozdev/src/objdir-native-droid/netwerk/test'] TEST-KNOWN-FAIL | /home/mozdev/src/objdir-native-droid/_tests/xpcshell/netwerk/test/unit/test_bug654926.js | test passed (time: 12711.038ms) >>>>>>> TEST-INFO | (xpcshell/head.js) | test 1 pending TEST-PASS | test_bug654926.js | [sync_with_cache_IO_thread : 43] null == null TEST-INFO | (xpcshell/head.js) | test 2 pending TEST-INFO | (xpcshell/head.js) | test 2 finished TEST-INFO | (xpcshell/head.js) | running event loop TEST-PASS | test_bug654926.js | [oCEA : 59] 2152398909 == 2152398909 TEST-PASS | test_bug654926.js | [sync_with_cache_IO_thread : 43] null == null TEST-PASS | test_bug654926.js | [oCEA : 59] 2152398909 == 2152398909 TEST-UNEXPECTED-FAIL | test_bug654926.js | undefined - See following stack: JS frame :: /data/local/tests/xpcshell/head.js :: do_throw :: line 462 JS frame :: test_bug654926.js :: append_datafile :: line 117 JS frame :: /data/local/tests/xpcshell/head.js :: <TOP_LEVEL> :: line 157 TEST-INFO | (xpcshell/head.js) | exiting test TEST-UNEXPECTED-FAIL | test_bug654926.js | undefined - See following stack: JS frame :: /data/local/tests/xpcshell/head.js :: do_throw :: line 462 JS frame :: test_bug654926.js :: append_datafile :: line 124 JS frame :: /data/local/tests/xpcshell/head.js :: <TOP_LEVEL> :: line 157 TEST-INFO | (xpcshell/head.js) | exiting test TEST-PASS | test_bug654926.js | [sync_with_cache_IO_thread : 43] null == null TEST-PASS | test_bug654926.js | [oCEA : 59] 2152398909 == 2152398909
The failure occurs when browser.cache.disk.max_entry_size > browser.cache.disk.capacity. On desktop, max_entry_size is 50MB and capacity is substantially larger; on mobile, max_entry_size is not over-ridden, so 50MB is effective, and capacity is (currently) 20MB. The test fails on mobile when it writes an entry of size > max_entry_size (50MB+) and forces storage to a disk file; it expects the final write to fail, but it does not, because a previous step already caused the entry to be doomed by eviction, caused by exceeding the cache capacity. The test only assumes that max_entry_size < capacity, and that seems quite reasonable; I think bug 751603 is the appropriate response to this failure and I do not recommend any changes to the test.
Depends on: 751603
Assignee: nobody → gbrown
I verified this is working correctly now.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.