New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 699337 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Last visit > 30 days ago
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug

Blocking:
issue 699212



Sign in to add a comment

power_SuspendStress shouldn't parse kernel logs for determining wake source

Project Member Reported by briannorris@chromium.org, Mar 8 2017

Issue description

This code is a bit odd, in autotest's client/cros/power_suspend.py:

            if abort_regex.search(line):
                wake_source = 'unknown'
                match = re.search(r'last active wakeup source: (.*)$',
                        '\n'.join(self._logs[i-5:i+3]), re.MULTILINE)
...
                if "rtc" in driver:
                    raise sys_power.SuspendTimeout('System took too '
                                                   'long to suspend.')

Two problems:
1. It's grepping kernel logs for a pr_debug() message; this is not an ABI, and it might break someday.
2. It assumes that all RTC drivers will have "rtc" in their name; works out fine I guess, but probably unwise.


For #1: why not parse /sys/kernel/debug/wakeup_sources instead? suspend_stress_test does this.

For #2: Might be better to match with /sys/class/rtc/*, or check for an 'rtc' subdevice -- e.g., /sys/devices/.../FOO/rtc
 
Cc: ravisadineni@chromium.org

Comment 2 by tbroch@chromium.org, Mar 24 2017

Blocking: 699212

Comment 3 by tbroch@chromium.org, Mar 24 2017

Owner: ravisadineni@chromium.org
Status: Assigned (was: Untriaged)

Sign in to add a comment