[Cronet] Keep JB support in Cronet dependencies |
|
Issue descriptionChromium support for JellyBean is deprecated: https://bugs.chromium.org/p/chromium/issues/detail?id=847940 but some Cronet consumers still need it. This umbrella bug will be used to explicitly keep JB-specific code needed by Cronet.
,
Jan 18
(4 days ago)
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d79719a90b915d7fd60fe334cb34d9149dd8c464 commit d79719a90b915d7fd60fe334cb34d9149dd8c464 Author: Paul Jensen <pauljensen@chromium.org> Date: Fri Jan 18 15:26:46 2019 [Cronet] Fix CronetUrlRequestTest.testManyRequests to run on Jelly Bean Jelly Bean has a 2000 Java global reference limit. Adjust test to create slightly fewer requests so it stays under the limit on Jelly Bean. Bug: 922656 Change-Id: Idf42e04b1e3f9d716d17f3d6293831b650f19da5 Reviewed-on: https://chromium-review.googlesource.com/c/1421777 Auto-Submit: Paul Jensen <pauljensen@chromium.org> Reviewed-by: Misha Efimov <mef@chromium.org> Commit-Queue: Paul Jensen <pauljensen@chromium.org> Cr-Commit-Position: refs/heads/master@{#624130} [modify] https://crrev.com/d79719a90b915d7fd60fe334cb34d9149dd8c464/components/cronet/android/test/javatests/src/org/chromium/net/CronetUrlRequestTest.java
,
Jan 18
(4 days ago)
I spent some time trying to get the socket tagging tests to pass when run on JB. It appears socket tagging byte accounting in /proc/net/xt_qtaguid/stats isn't done for loopback interfaces like it is on KitKat and newer devices. I spent quite a while getting a test HTTP server bound to WiFi's address but this didn't get the bytes accounted for sadly :( Here's my attempt: https://chromium-review.googlesource.com/c/chromium/src/+/1421682 The simple way to get these tests passing on JB is to change NativeTestServer.getEchoMethodURL() to "http://example.com" and run the test on a device with an Internet connection. |
|
►
Sign in to add a comment |
|
Comment 1 by pauljensen@chromium.org
, Jan 17 (5 days ago)To get Cronet tests to run on a JB device I had to put in the following changes: --- a/build/android/pylib/valgrind_tools.py +++ b/build/android/pylib/valgrind_tools.py @@ -20,7 +20,8 @@ def SetChromeTimeoutScale(device, scale): path = '/data/local/tmp/chrome_timeout_scale' if not scale or scale == 1.0: # Delete if scale is None/0.0/1.0 since the default timeout scale is 1.0 - device.RemovePath(path, force=True, as_root=True) + if device.PathExists(path): + device.RemovePath(path, force=True, as_root=True) else: device.WriteFile(path, '%f' % scale, as_root=True) And in third_party/catapult: --- a/devil/devil/android/device_utils.py +++ b/devil/devil/android/device_utils.py @@ -2485,7 +2485,9 @@ class DeviceUtils(object): """ process_name = process_name or '' processes = [] - for line in self._GetPsOutput(process_name): + for line in self._GetPsOutput(None): + if process_name not in line: + continue row = line.split() try: row = {k: row[i] for k, i in _PS_COLUMNS.iteritems()} --- a/devil/devil/android/md5sum.py +++ b/devil/devil/android/md5sum.py @@ -98,8 +98,9 @@ def CalculateDeviceMd5Sums(paths, device): # If files were previously pushed as root (adbd running as root), trying # to re-push as non-root causes the push command to report success, but # actually fail. So, wipe the directory first. - device.RunShellCommand(['rm', '-rf', MD5SUM_DEVICE_LIB_PATH], - as_root=True, check_return=True) + if device.PathExists(MD5SUM_DEVICE_LIB_PATH): + device.RunShellCommand(['rm', '-rf', MD5SUM_DEVICE_LIB_PATH], + as_root=True, check_return=True) if os.path.isdir(md5sum_dist_path): device.adb.Push(md5sum_dist_path, MD5SUM_DEVICE_LIB_PATH) else: