New issue
Advanced search Search tips

Issue 856738 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Feature


Participants' hotlists:
Hotlist-Tast


Sign in to add a comment

Add Tast test for powerd backlight use

Project Member Reported by derat@chromium.org, Jun 26 2018

Issue description

I should add a Tast local test that verifies that powerd is able to interact with the internal backlight.

This will probably require a few things:

- a new software feature describing whether powerd is present
- a new check_powerd_config flag that can be used to check at runtime whether powerd has been configured to expect an internal backlight
 
I guess display_backlight USE flag can be used:
https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/master/chromeos-base/power_manager/power_manager-9999.ebuild#94

Looking at the code, despite its name, it seems to mean the internal display is present?
If so, we can use the same flag for  issue 865853 .

Cc: jclinton@chromium.org
I think that my reason for not wanting to use the display_backlight USE flag directly is that it may not be accurate for unibuild devices. We may use the same system image on multiple devices, some of which have internal displays and others which don't. (I don't know whether this happens yet.)

The power_manager ebuild inspects display_backlight to set powerd's external_display_only pref on-disk, but the pref can be overridden at runtime via cros-config; see https://chromium.googlesource.com/chromiumos/platform2/+/master/power_manager/common/cros_config_prefs_source.h.

The check_powerd_config tool checks powerd prefs set via cros-config, so it may be a better choice here than checking the USE flag directly. Unfortunately, this means that the test would need to check the pref itself and return immediately without reporting errors when it can't run.

Going forward, I've been thinking that I may need to make Tast's test dependency code (https://chromium.googlesource.com/chromiumos/platform/tast/+/HEAD/docs/test_dependencies.md) support checking cros-config values in addition to USE flags.

(I believe that using cros-config still fits the goal of checking software dependencies rather than runtime dependencies, since these are characteristics of the type of device where a test is being run rather than of the particular DUT where it's running.)

Sign in to add a comment