New issue
Advanced search Search tips

Issue 598918 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Apr 2016
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

URLRequestTest.FileTest Release builds fail on Android User build devices

Reported by kra...@amazon.com, Mar 29 2016

Issue description

Version: Any (e.g. tip of master)
OS: Android (any version)

What steps will reproduce the problem?
Run URLRequestTest.FileTest on any Android device on a user build, using the release net_unittests_apk

What is the expected result?
C   41.758s Main  ********************************************************************************
C   41.758s Main  [==========] 1 test ran.
C   41.758s Main  [  PASSED  ] 1 test.
C   41.758s Main  ********************************************************************************

What happens instead?
C   41.772s Main  Detailed Logs
C   41.772s Main  ********************************************************************************
C   41.772s Main  [FAIL] URLRequestTest.FileTest:
C   41.772s Main  [ RUN      ] URLRequestTest.FileTest
C   41.772s Main  ../../net/url_request/url_request_unittest.cc:848: Failure
C   41.772s Main  Value of: base::GetFileSize(app_path, &file_size)
C   41.773s Main    Actual: false
C   41.773s Main  Expected: true
C   41.773s Main  ../../net/url_request/url_request_unittest.cc:853: Failure
C   41.773s Main  Value of: static_cast<int>(file_size)
C   41.773s Main    Actual: -1
C   41.773s Main  Expected: d.bytes_received()
C   41.773s Main  Which is: 3200
C   41.773s Main  [  FAILED  ] URLRequestTest.FileTest (331 ms)
C   41.773s Main  ********************************************************************************
C   41.773s Main  Summary
C   41.773s Main  ********************************************************************************
C   41.774s Main  [==========] 1 test ran.
C   41.774s Main  [  PASSED  ] 0 tests.
C   41.774s Main  [  FAILED  ] 1 test, listed below:
C   41.774s Main  [  FAILED  ] URLRequestTest.FileTest
C   41.774s Main
C   41.774s Main  1 FAILED TEST
C   41.774s Main  ********************************************************************************

Please provide any additional information below. Attach a screenshot if
possible.
Tested on Nexus 5X, Nexus 7 (original version on KitKat, and new model on Lollipop), Nexus 9, and Nexus 10

 

Comment 1 by kra...@amazon.com, Mar 30 2016

Proposed test fix:
https://codereview.chromium.org/1839273002/
Project Member

Comment 2 by bugdroid1@chromium.org, Apr 7 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5a645820f0e600e96d3e96eb247ce62819156f89

commit 5a645820f0e600e96d3e96eb247ce62819156f89
Author: kraush <kraush@amazon.com>
Date: Thu Apr 07 18:35:04 2016

Use /etc/hosts for URLRequestTest.FileTest on Android

URLRequestTest.FileTest tries to read /self/proc/exe, which
Android's security model will prevent on User platform builds
running a Release apk.
This change uses /etc/hosts instead for Android to verify file
access.

BUG= 598918 

Review URL: https://codereview.chromium.org/1839273002

Cr-Commit-Position: refs/heads/master@{#385817}

[modify] https://crrev.com/5a645820f0e600e96d3e96eb247ce62819156f89/net/url_request/url_request_unittest.cc

Status: Fixed (was: Untriaged)

Sign in to add a comment