Fix DBus-related segfaults when running chromeos_unittests on real chromeos (not linux-chromeos) |
||
Issue descriptionSee https://ci.chromium.org/p/chromium/builders/luci.chromium.try/chromeos-amd64-generic-rel/49551 where I tried running the suite chromeos_unittests inside cros VMs. Most (all?) tests in that suite fail. A common cause is a crash that looks like: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8940548897679064512/+/steps/chromeos_unittests__with_patch_/0/logs/NetworkConnectionHandlerImplTest.NetworkConnectionHandlerConnectBlockedByBlacklist/0 Tracking that down, we get a segfault at the following line: https://codesearch.chromium.org/chromium/src/chromeos/network/network_state_test.cc?rcl=0feb6285e09154d489a4f4fa0088250fabd60d48&l=39 It appears that "dbus_manager->GetShillProfileClient()->GetTestInterface()" returns null. How that service gets initialized in tests looks to be affected by the "use_real_clients" val, defined here: https://codesearch.chromium.org/chromium/src/chromeos/dbus/dbus_thread_manager.cc?rcl=9b23164fb92716ee24c91f0f5e0497e90110cb5d&l=310 Consequently, adding the command line arg "--dbus-stub" to the test makes it pass: https://ci.chromium.org/p/chromium/builders/luci.chromium.try/chromeos-amd64-generic-rel/49607 I'm not sure if that's ideal. Since we're in a true cros environment, presumably we'd want to use the "real" clients? IDK what a "client" here is, so I could very well be wrong. For now, I'll add the suite with the "--dbus-stub" arg and if someone tells me it'd be better to run the test w/o it on cros (and it's functional) I'll remove it.
,
Jul 23
What's the motivation for running Chrome tests on Chrome OS devices? Is there a class of potential bugs that we wouldn't be able to test by running OS_CHROMEOS builds of the same tests on Linux?
,
Dec 3
I don't think we want chromeos_unittests running on device, despite the name. I'm going to remove it as part of a different change. We still might want base_unittests, media_unittests, or things like that.
,
Dec 7
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/209256f5516f6dd1c7fb5e53fa7c3227f8c79eed commit 209256f5516f6dd1c7fb5e53fa7c3227f8c79eed Author: James Cook <jamescook@chromium.org> Date: Fri Dec 07 18:40:50 2018 Don't allow chromeos unit tests to build in "cros chrome-sdk" shell The chromeos_* unit test suites are designed to run on Linux, not on real hardware or in VMs. On the Chromium waterfall they are built with the linux-chromeos configuration. Developers using the "cros chrome-sdk" sometimes think they need to build these targets and run them, either on their host workstation or on device. The tests aren't expected to work in these environments, so prevent them from being built. Bug: 909073 , 865693 Test: ninja -C out_eve/Release chromeos_unittests won't compile Change-Id: Idf8c366f7001ea5bbc744ccba6e627d70f5efebb Reviewed-on: https://chromium-review.googlesource.com/c/1358509 Commit-Queue: James Cook <jamescook@chromium.org> Reviewed-by: Dirk Pranke <dpranke@chromium.org> Reviewed-by: Steven Bennetts <stevenjb@chromium.org> Reviewed-by: Ben Pastene <bpastene@chromium.org> Cr-Commit-Position: refs/heads/master@{#614763} [modify] https://crrev.com/209256f5516f6dd1c7fb5e53fa7c3227f8c79eed/build/config/chromeos/rules.gni [modify] https://crrev.com/209256f5516f6dd1c7fb5e53fa7c3227f8c79eed/build/config/compiler/compiler.gni [modify] https://crrev.com/209256f5516f6dd1c7fb5e53fa7c3227f8c79eed/chromeos/BUILD.gn [modify] https://crrev.com/209256f5516f6dd1c7fb5e53fa7c3227f8c79eed/chromeos/components/BUILD.gn [modify] https://crrev.com/209256f5516f6dd1c7fb5e53fa7c3227f8c79eed/chromeos/components/run_all_unittests.cc [modify] https://crrev.com/209256f5516f6dd1c7fb5e53fa7c3227f8c79eed/chromeos/run_all_unittests.cc [modify] https://crrev.com/209256f5516f6dd1c7fb5e53fa7c3227f8c79eed/testing/buildbot/chromium.chromiumos.json [modify] https://crrev.com/209256f5516f6dd1c7fb5e53fa7c3227f8c79eed/testing/buildbot/chromium.fyi.json [modify] https://crrev.com/209256f5516f6dd1c7fb5e53fa7c3227f8c79eed/testing/buildbot/filters/BUILD.gn [delete] https://crrev.com/1c086040bdda4d0abe86770891aa61de499da645/testing/buildbot/filters/chromeos.chromeos_unittests.filter [modify] https://crrev.com/209256f5516f6dd1c7fb5e53fa7c3227f8c79eed/testing/buildbot/test_suites.pyl [modify] https://crrev.com/209256f5516f6dd1c7fb5e53fa7c3227f8c79eed/testing/buildbot/waterfalls.pyl [modify] https://crrev.com/209256f5516f6dd1c7fb5e53fa7c3227f8c79eed/testing/test.gni [modify] https://crrev.com/209256f5516f6dd1c7fb5e53fa7c3227f8c79eed/ui/chromeos/BUILD.gn [modify] https://crrev.com/209256f5516f6dd1c7fb5e53fa7c3227f8c79eed/ui/chromeos/run_all_unittests.cc |
||
►
Sign in to add a comment |
||
Comment 1 by hashimoto@chromium.org
, Jul 23