Parsing log files for test results
Colin Ian King
colin.king at canonical.com
Tue Dec 6 16:40:21 UTC 2011
On 05/12/11 22:29, Marc Tardif wrote:
> Hi folks,
>
> After a user has been running a proposed kernel for a couple days, I would
> like to parse the logs of the system to detect what parts of the kernel
> might have been tested implicitly during that period. These results could
> then be uploaded to Launchpad, with the consent of the user of course,
> without having to actually run tests manually. [1]
>
> First, I would like to consider suspending. I looked in /var/log/syslog
> where I found strings that could be parsed to detect a successful wakeup
> from suspend:
>
> kernel: [ 137.402845] ACPI: Waking up from system sleep state S3
>
> However, the problem is that syslog does not seem to contain the kernel
> version to validate that the proposed kernel is effectively being tested.
>
> So, I then discovered /var/log/pm-suspend.log which contained both the
> kernel version and the result of resuming from suspend:
>
> Linux 200910-4253 3.0.0-12-generic #20-Ubuntu SMP Fri Oct...
> [snip]
> /var/lib/pm-utils/sleep.d/00kernel-change resume suspend: success.
>
> Second, I would also like to consider the same for hibernating. I looked
> at /var/log/pm-suspend.log which also seemed to contain the result of
> thawing from hibernate:
>
> /var/lib/pm-utils/sleep.d/000kernel-change thaw hibernate: success.
>
> Would you say that these are reliable ways to detect that suspend and
> hibernate were successful?
>
> 1. https://blueprints.launchpad.net/certify-planning/+spec/hardware-p-cert-sru-community
>
This kind of S3 success detection has implemented in fwts. I refer you
to the git
repo: git://kernel.ubuntu.com/lexical/fwts.git and the relevant source:
src/acpi/s3/s3.c - see s3_check_log()
src/lib/src/fwts_hwinfo.c - see fwts_hwinfo_get() and
fwts_hwinfo_lists_differ()
src/lib/src/fwts_klog.c and data/klog.json (containing >160 regexs
to scan the kernel log)
Colin
More information about the kernel-team
mailing list