Issue metadata
Sign in to add a comment
|
unit_tests ResetSettingsHandlerTest.HandleResetProfileSettings fails in debug is_chrome_branded=true |
||||||||||||||||||||||||
Issue descriptionWhile looking at https://bugs.chromium.org/p/chromium/issues/detail?id=510836 I found `unit_tests --gtest_filter=ResetSettingsHandlerTest.HandleResetProfileSettings` fails in debug builds with is_chrome_branded=true. I guess we don't have a bot for that. It fails because brandcode_ is "GGLS", and config_fetcher_ is null here: https://cs.chromium.org/chromium/src/chrome/browser/ui/webui/options/reset_profile_settings_handler.cc?q=DCHECK%5C(brandcode_.empty%5C(%5C)+%5C%7C%5C%7C+config_fetcher_%5C);&sq=package:chromium&l=133&dr=C It's not obvious to me which condition should be changed in the unit_tests case. Suggestions? Also, while looking for someone to ask about this, I noticed that the first line of the OWNERS file here doesn't seem to make any sense: https://cs.chromium.org/chromium/src/chrome/browser/ui/webui/options/OWNERS?q=chrome/browser/ui/webui/options/OWNERS&sq=package:chromium&l=1
,
Sep 6 2016
this is probably a real bug in existing code that's being uncovered just by creating this handler in an official, debug version with a brandcode I'd just disable the test #if !NDEBUG to unblock you
,
Sep 13 2016
I am not able to reproduce this, using the following build flags (both debug and release) is_official_build = false is_chrome_branded = true brandcode_ is always empty.
,
Sep 13 2016
Hmm, strange!
[uma-int]d:\src\cr3\src>type out\debug\args.gn
is_debug = true
is_component_build = true
enable_nacl = false
is_chrome_branded = true
symbol_level = 2
target_cpu = "x86"
win_console_app = true
win_linker_timing = true
[uma-int]d:\src\cr3\src>ninja -C out\Debug unit_tests
ninja: Entering directory `out\Debug'
ninja: no work to do.
[uma-int]d:\src\cr3\src>out\debug\unit_tests --gtest_filter=ResetSettingsHandlerTest.HandleResetProfileSettings
IMPORTANT DEBUGGING NOTE: batches of tests are run inside their
own process. For debugging a test inside a debugger, use the
--gtest_filter=<your_test_name> flag along with
--single-process-tests.
Using sharding settings from environment. This is shard 0/1
Using 1 parallel jobs.
Note: Google Test filter = ResetSettingsHandlerTest.HandleResetProfileSettings
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from ResetSettingsHandlerTest
[ RUN ] ResetSettingsHandlerTest.HandleResetProfileSettings
[12280:14312:0913/130258:613818718:FATAL:reset_settings_handler.cc(111)] Check failed: brandcode_.empty() || config_fetcher_.
Backtrace:
base::debug::StackTrace::StackTrace [0x0EDFAE27+23] (d:\src\cr3\src\base\debug\stack_trace_win.cc:214)
logging::LogMessage::~LogMessage [0x0EE4A23B+59] (d:\src\cr3\src\base\logging.cc:533)
settings::ResetSettingsHandler::HandleResetProfileSettings [0x06EA54EE+542] (d:\src\cr3\src\chrome\browser\ui\webui\settings\reset_settings_handler.cc:112)
`anonymous namespace'::ResetSettingsHandlerTest_HandleResetProfileSettings_Test::TestBody [0x017DB0CD+109] (d:\src\cr3\src\chrome\browser\ui\webui\settings\reset_settings_handler_unittest.cc:94)
testing::internal::HandleExceptionsInMethodIfSupported<testing::Test,void> [0x040BD564+52] (d:\src\cr3\src\testing\gtest\src\gtest.cc:2460)
testing::Test::Run [0x040D5827+135] (d:\src\cr3\src\testing\gtest\src\gtest.cc:2474)
...
[1/1] ResetSettingsHandlerTest.HandleResetProfileSettings (CRASHED)
1 test crashed:
ResetSettingsHandlerTest.HandleResetProfileSettings (d:\src\cr3\src\chrome\browser\ui\webui\settings\reset_settings_handler_unittest.cc:87)
Tests took 3 seconds.
Is it possible the brandcode is pulled non-isolated from the system somehow? i.e. depends on what Chrome's you have installed on the local machine maybe?
,
Sep 13 2016
It is possible, so I think it is best to explicitly initialize that global variable in the test instead of relying on external factors. Can you verify that https://codereview.chromium.org/2339753002 is fixing the issue?
,
Sep 13 2016
Yes, that passes for me locally. Thanks!
,
Sep 14 2016
,
Sep 14 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/340cb81a1ebbe7755ed784af71f164544dbbd2cc commit 340cb81a1ebbe7755ed784af71f164544dbbd2cc Author: dpapad <dpapad@chromium.org> Date: Wed Sep 14 16:35:26 2016 MD Settings: Initialize google_brand code in ResetSettingsHandlerTest. BUG= 644451 Review-Url: https://codereview.chromium.org/2339753002 Cr-Commit-Position: refs/heads/master@{#418585} [modify] https://crrev.com/340cb81a1ebbe7755ed784af71f164544dbbd2cc/chrome/browser/ui/webui/settings/reset_settings_handler_unittest.cc
,
Sep 14 2016
,
Nov 7 2017
,
Nov 7 2017
Apologies, applied the wrong component in bulk. |
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by scottmg@chromium.org
, Sep 6 2016