My favorites | Sign in
Project Home Downloads Wiki Issues Code Search
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 52918: Testing using wrong DIR_SOURCE_ROOT
1 person starred this issue and may be notified of changes. Back to list
Status:  Verified
Owner:  thomasvl@chromium.org
Closed:  Sep 2010
Cc:  nsylv...@chromium.org, maruel@chromium.org, rohitrao@chromium.org, phajdan.jr@chromium.org

Restricted
  • Only users with Commit permission may comment.


Sign in to add a comment
 
Project Member Reported by thestig@chromium.org, Aug 20, 2010
I see some FLAKY test failures like http://build.chromium.org/buildbot/waterfall/builders/Mac10.5%20Tests%20(dbg)(3)/builds/10939/steps/browser_tests/logs/stdio, where we're looking for testserver.py in the wrong place:

Note: Google Test filter = SSLUITest.TestHTTP
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from SSLUITest
[ RUN      ] SSLUITest.TestHTTP
[30866:523:0820/151022:2246034617242922:ERROR:/b/slave/chromium-dbg-mac-builder/build/src/chrome/browser/first_run/first_run_mac.mm(63)] Not implemented reached in static bool FirstRun::ProcessMasterPreferences(const FilePath&, FirstRun::MasterPrefs*)
[30866:23299:0820/151022:2246034621664602:INFO:/b/slave/chromium-dbg-mac-builder/build/src/net/base/host_resolver_impl.cc(1101)] IPv6Probe forced AddressFamily setting to ADDRESS_FAMILY_IPV4
[30866:523:0820/151022:2246034629245920:INFO:/b/slave/chromium-dbg-mac-builder/build/src/chrome/browser/extensions/extensions_service.cc(686)] Sending EXTENSION_LOADED
[30866:23299:0820/151022:2246034632405780:INFO:/b/slave/chromium-dbg-mac-builder/build/src/chrome/browser/net/predictor_api.cc(372)] DNS Prefetch service started
[30866:523:0820/151022:2246034651711683:INFO:/b/slave/chromium-dbg-mac-builder/build/src/webkit/support/../glue/plugins/plugin_list.cc(217)] Loaded plugin list in 19 ms.
[30866:21763:0820/151022:2246034728212826:WARNING:/b/slave/chromium-dbg-mac-builder/build/src/net/base/file_stream_posix.cc(350)] Failed to open file: 2 (/private/var/folders/Tf/TfOs8gm+HkuQrkICa3LquE+++TM/-Tmp-/.org.chromium.3Nzx4o/test_user_data/Default/Last Tabs)
[30866:523:0820/151022:2246034736330510:INFO:/b/slave/chromium-dbg-mac-builder/build/src/chrome/browser/sync/profile_sync_service.cc(104)] Unofficial build, using dev channel sync server.
[30866:523:0820/151022:2246034736467700:INFO:/b/slave/chromium-dbg-mac-builder/build/src/chrome/browser/sync/profile_sync_service.cc(130)] Starting ProfileSyncService.
[30866:523:0820/151022:2246034736496686:INFO:/b/slave/chromium-dbg-mac-builder/build/src/chrome/browser/sync/profile_sync_service.cc(212)] Using https://clients4.google.com/chrome-sync/dev for sync server URL.
[30866:523:0820/151022:2246034736767052:INFO:/b/slave/chromium-dbg-mac-builder/build/src/chrome/browser/sync/profile_sync_service.cc(374)] Clearing Sync DB.
[30866:523:0820/151023:2246034898205794:INFO:/b/slave/chromium-dbg-mac-builder/build/src/chrome/browser/history/history.cc(749)] History backend finished loading
[30866:21763:0820/151023:2246034906222059:INFO:/b/slave/chromium-dbg-mac-builder/build/src/chrome/common/important_file_writer.cc(71)] successfully saved /private/var/folders/Tf/TfOs8gm+HkuQrkICa3LquE+++TM/-Tmp-/.org.chromium.3Nzx4o/test_user_data/Default/Bookmarks
/System/Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python: can't open file '/b/slave/net/tools/testserver/testserver.py': [Errno 2] No such file or directory
[30866:523:0820/151033:2246045383398036:ERROR:/b/slave/chromium-dbg-mac-builder/build/src/net/test/test_server.cc(251)] Failed to connect to server
/b/slave/chromium-dbg-mac-builder/build/src/chrome/browser/ssl/ssl_browser_tests.cc:124: Failure
Value of: test_server()->Start()
  Actual: false
Expected: true
[  FAILED  ] SSLUITest.TestHTTP (11115 ms)

In test_server.cc, we have:


  FilePath testserver_path;
  if (!PathService::Get(base::DIR_SOURCE_ROOT, &testserver_path)) {
    LOG(ERROR) << "Failed to get DIR_SOURCE_ROOT";
    return false;
  }
  testserver_path = testserver_path
      .Append(FILE_PATH_LITERAL("net"))
      .Append(FILE_PATH_LITERAL("tools"))
      .Append(FILE_PATH_LITERAL("testserver"))
      .Append(FILE_PATH_LITERAL("testserver.py"));

so somehow we got DIR_SOURCE_ROOT = /b/slave instead of /b/slave/chromium-dbg-mac5-tests-3/build/src.
Aug 21, 2010
#1 anna...@chromium.org
(No comment was entered for this change.)
Labels: not-sync
Aug 23, 2010
#2 phajdan.jr@chromium.org
The problem is with AmIBundled, see http://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/f3500e4fcc468030#
Status: Started
Owner: phajdan...@chromium.org
Cc: -phajdan...@chromium.org thoma...@chromium.org
Aug 23, 2010
#3 thomasvl@chromium.org
(No comment was entered for this change.)
Cc: rohit...@chromium.org
Aug 23, 2010
#4 bugdroid1@gmail.com
The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=57088 

------------------------------------------------------------------------
r57088 | rohitrao@chromium.org | 2010-08-23 12:09:28 -0700 (Mon, 23 Aug 2010) | 7 lines
Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/base/mac_util.mm?r1=57088&r2=57087

[Mac] Add diagnostic logging to AmIBundled() to help with bot failures.

This change should be reverted as soon as we figure out what's going wrong.

BUG=52918
TEST=None
Review URL: http://codereview.chromium.org/3197012
------------------------------------------------------------------------

Aug 23, 2010
#5 rohitrao@chromium.org
Partial revert is ready in http://codereview.chromium.org/3164035/show
Aug 24, 2010
#6 bugdroid1@gmail.com
The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=57194 

------------------------------------------------------------------------
r57194 | rohitrao@chromium.org | 2010-08-24 09:45:45 -0700 (Tue, 24 Aug 2010) | 5 lines
Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/base/mac_util.mm?r1=57194&r2=57193

[Mac] Revert the diagnostic messages added in r57088.

BUG=52918
TEST=Less log spam.
Review URL: http://codereview.chromium.org/3164035
------------------------------------------------------------------------

Aug 24, 2010
#7 thomasvl@chromium.org
Ok, so there's what is happening on Mac.  The FILE_EXE is getting overridden, and that then cause DIR_EXE to get recalculated.  Then when DIR_SOURCE_ROOT is calculated, but it apples the logic based on the running executable to the overridden DIR_EXE.  Causing the wrong value.  I'll build up a CL to fix that, but there maybe or upstream things that get confused.

As far as I can tell, Windows/Linux get lucky here because the overrides are always in the same directory, the fact that Mac bundlers are directories trees is what chokes things here.
Aug 24, 2010
#8 thomasvl@chromium.org
yea, looking at chrome_paths and chrome_paths_mac, the dump of the cache is likely to cause more problems upstream for you.
Aug 24, 2010
#9 bugdroid1@gmail.com
The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=57237 

------------------------------------------------------------------------
r57237 | thomasvl@chromium.org | 2010-08-24 14:32:35 -0700 (Tue, 24 Aug 2010) | 5 lines
Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/base/base_paths_mac.mm?r1=57237&r2=57236

[Mac] if someone overrides FILE_EXE/DIR_EXE in the path service, it can cause the calculation for DIR_SOURCE_ROOT to go wrong.  Avoid this by not using the value from the path service.

BUG=52918
TEST=green tree
Review URL: http://codereview.chromium.org/3176036
------------------------------------------------------------------------

Aug 24, 2010
#10 phajdan.jr@chromium.org
(No comment was entered for this change.)
Owner: thoma...@chromium.org
Cc: -thoma...@chromium.org phajdan...@chromium.org
Aug 24, 2010
#11 thomasvl@chromium.org
(No comment was entered for this change.)
Status: Fixed
Aug 24, 2010
#12 bugdroid1@gmail.com
Verified label updated by AutoAllocator, contact AmolK or KrisR for details
Labels: Verifier-Srikanthk
Aug 25, 2010
#13 phajdan.jr@chromium.org
When you patch in http://codereview.chromium.org/2805100/show locally, there problem is still there. This shouldn't rely on the caching implementation inside PathService.
Status: Assigned
Labels: -Verifier-Srikanthk
Aug 25, 2010
#14 thomasvl@chromium.org
The real problem is people are changing FILE_EXE and then the app can't find things.  the real fix would be to figure out why FILE_EXE is getting overridden and correct that behavior.

ps- you probably need to update the summary if you are morphing this into that larger problem.  Windows/Linux just works by luck (they have is changed to something within the same directory, so DIR_EXE doesn't get changed). If we moved where a binary went, those platform would also blow up for the same reason.
Owner: phajdan...@chromium.org
Cc: -phajdan...@chromium.org
Sep 10, 2010
#15 phajdan.jr@chromium.org
This is fixed now. Thanks, Thomas!
Status: Fixed
Owner: thoma...@chromium.org
Cc: phajdan...@chromium.org
Sep 10, 2010
#16 bugdroid1@gmail.com
Verified label updated by AutoAllocator, contact AmolK or KrisR for details
Labels: Verifier-Rohitbm
Sep 15, 2010
#17 rohi...@chromium.org
(No comment was entered for this change.)
Status: Verified
Mar 18, 2011
#18 lafo...@chromium.org
I see some FLAKY test failures like http://build.chromium.org/buildbot/waterfall/builders/Mac10.5%20Tests%20(dbg)(3)/builds/10939/steps/browser_tests/logs/stdio, where we're looking for testserver.py in the wrong place:

Note: Google Test filter = SSLUITest.TestHTTP
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from SSLUITest
[ RUN      ] SSLUITest.TestHTTP
[30866:523:0820/151022:2246034617242922:ERROR:/b/slave/chromium-dbg-mac-builder/build/src/chrome/browser/first_run/first_run_mac.mm(63)] Not implemented reached in static bool FirstRun::ProcessMasterPreferences(const FilePath&amp;, FirstRun::MasterPrefs*)
[30866:23299:0820/151022:2246034621664602:INFO:/b/slave/chromium-dbg-mac-builder/build/src/net/base/host_resolver_impl.cc(1101)] IPv6Probe forced AddressFamily setting to ADDRESS_FAMILY_IPV4
[30866:523:0820/151022:2246034629245920:INFO:/b/slave/chromium-dbg-mac-builder/build/src/chrome/browser/extensions/extensions_service.cc(686)] Sending EXTENSION_LOADED
[30866:23299:0820/151022:2246034632405780:INFO:/b/slave/chromium-dbg-mac-builder/build/src/chrome/browser/net/predictor_api.cc(372)] DNS Prefetch service started
[30866:523:0820/151022:2246034651711683:INFO:/b/slave/chromium-dbg-mac-builder/build/src/webkit/support/../glue/plugins/plugin_list.cc(217)] Loaded plugin list in 19 ms.
[30866:21763:0820/151022:2246034728212826:WARNING:/b/slave/chromium-dbg-mac-builder/build/src/net/base/file_stream_posix.cc(350)] Failed to open file: 2 (/private/var/folders/Tf/TfOs8gm+HkuQrkICa3LquE+++TM/-Tmp-/.org.chromium.3Nzx4o/test_user_data/Default/Last Tabs)
[30866:523:0820/151022:2246034736330510:INFO:/b/slave/chromium-dbg-mac-builder/build/src/chrome/browser/sync/profile_sync_service.cc(104)] Unofficial build, using dev channel sync server.
[30866:523:0820/151022:2246034736467700:INFO:/b/slave/chromium-dbg-mac-builder/build/src/chrome/browser/sync/profile_sync_service.cc(130)] Starting ProfileSyncService.
[30866:523:0820/151022:2246034736496686:INFO:/b/slave/chromium-dbg-mac-builder/build/src/chrome/browser/sync/profile_sync_service.cc(212)] Using https://clients4.google.com/chrome-sync/dev for sync server URL.
[30866:523:0820/151022:2246034736767052:INFO:/b/slave/chromium-dbg-mac-builder/build/src/chrome/browser/sync/profile_sync_service.cc(374)] Clearing Sync DB.
[30866:523:0820/151023:2246034898205794:INFO:/b/slave/chromium-dbg-mac-builder/build/src/chrome/browser/history/history.cc(749)] History backend finished loading
[30866:21763:0820/151023:2246034906222059:INFO:/b/slave/chromium-dbg-mac-builder/build/src/chrome/common/important_file_writer.cc(71)] successfully saved /private/var/folders/Tf/TfOs8gm+HkuQrkICa3LquE+++TM/-Tmp-/.org.chromium.3Nzx4o/test_user_data/Default/Bookmarks
/System/Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python: can't open file '/b/slave/net/tools/testserver/testserver.py': [Errno 2] No such file or directory
[30866:523:0820/151033:2246045383398036:ERROR:/b/slave/chromium-dbg-mac-builder/build/src/net/test/test_server.cc(251)] Failed to connect to server
/b/slave/chromium-dbg-mac-builder/build/src/chrome/browser/ssl/ssl_browser_tests.cc:124: Failure
Value of: test_server()-&gt;Start()
  Actual: false
Expected: true
[  FAILED  ] SSLUITest.TestHTTP (11115 ms)

In test_server.cc, we have:


  FilePath testserver_path;
  if (!PathService::Get(base::DIR_SOURCE_ROOT, &amp;testserver_path)) {
    LOG(ERROR) &lt;&lt; &quot;Failed to get DIR_SOURCE_ROOT&quot;;
    return false;
  }
  testserver_path = testserver_path
      .Append(FILE_PATH_LITERAL(&quot;net&quot;))
      .Append(FILE_PATH_LITERAL(&quot;tools&quot;))
      .Append(FILE_PATH_LITERAL(&quot;testserver&quot;))
      .Append(FILE_PATH_LITERAL(&quot;testserver.py&quot;));

so somehow we got DIR_SOURCE_ROOT = /b/slave instead of /b/slave/chromium-dbg-mac5-tests-3/build/src.
Labels: -GreenTreeTaskForce bulkmove TaskForce-GreenTree
Oct 12, 2012
#19 bugdroid1@chromium.org
This issue has been closed for some time. No one will pay attention to new comments.
If you are seeing this bug or have new data, please click New Issue to start a new bug.
Labels: Restrict-AddIssueComment-Commit
Mar 10, 2013
#20 bugdroid1@chromium.org
(No comment was entered for this change.)
Labels: -Area-Internals -Tests Cr-Internals Cr-Tests
Sign in to add a comment

Powered by Google Project Hosting