New issue
Advanced search Search tips

Issue 785609 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2018
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

cros_config: should not output "ERROR" when processing submodels if it's actually working correctly

Project Member Reported by pbe...@chromium.org, Nov 16 2017

Issue description

Run cros_config on the workstation to accelarate debugging changes in the model.dtsi files, like this

~/trunk/src/scripts $ /usr/bin/cros_config --test_database=/build/coral/usr/share/config.dtb --test_sku_id=163 --test_name=Coral --abspath /audio/main cras-config-dir
[1115/174831:INFO:lookup.cc(147)] Looking up name Coral, SKU ID 163
[1115/174831:INFO:lookup.cc(76)] Simple SKU map match 
[1115/174831:INFO:lookup.cc(85)] Platform name Coral
[1115/174831:INFO:cros_config.cc(317)] Using master configuration for model nasher360, submodel nasher360_1mic
[1115/174831:ERROR:cros_config.cc(103)] The path /chromeos/models/nasher360/audio/main does not exist.
/etc/cras/nasher(cr) ...

Even though it correctly returns /etc/cras/nasher, it first outputs a line with ERROR message, which is misleading.
 

Comment 1 by pbe...@chromium.org, Nov 16 2017

Description: Show this description

Comment 2 by sjg@chromium.org, Jan 5 2018

Status: Started (was: Assigned)
Project Member

Comment 3 by bugdroid1@chromium.org, Jan 11 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/17e91bbc4a5556b50b04cc4aaa805dfc84ee5f24

commit 17e91bbc4a5556b50b04cc4aaa805dfc84ee5f24
Author: Simon Glass <sjg@chromium.org>
Date: Thu Jan 11 08:20:44 2018

chromeos-config: Avoid printing premature errors

At present we try to obtain the config in several ways, printing warnings
or errors along the way. Thus, even if eventually we succeed, we can print
error messages. This is confusing.

Adjust the code to collect the errors it finds and display them them at
the end, when we definitely know that no config could be found. Otherwise
the messages are not displayed.

BUG= chromium:785609 
TEST=manual test on robo, adjusted to appear as a nasher360:
Before:
CROS_CONFIG_DEBUG=1 cros_config / brand-code
[1202/092111:ERROR:cros_config.cc(87)] The path /chromeos/models/nasher360
	/audio/main does not exist.
bxtda7219max

With this CL, that message is gone

Change-Id: Id2305d8e14b1db2ff0f1a480c81340d1b04f1c51
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/852574
Reviewed-by: Benjamin Gordon <bmgordon@chromium.org>
Reviewed-by: Patrick Berny <pberny@chromium.org>

[modify] https://crrev.com/17e91bbc4a5556b50b04cc4aaa805dfc84ee5f24/chromeos-config/libcros_config/cros_config_unittest.cc
[modify] https://crrev.com/17e91bbc4a5556b50b04cc4aaa805dfc84ee5f24/chromeos-config/libcros_config/cros_config.cc
[modify] https://crrev.com/17e91bbc4a5556b50b04cc4aaa805dfc84ee5f24/chromeos-config/libcros_config/cros_config.h

Comment 4 by sjg@chromium.org, Jan 29 2018

Status: Fixed (was: Started)

Sign in to add a comment