Bug 1275142 - [RFE] ability to whitelist dmesg checks based on the entire message rather than individual lines
Summary: [RFE] ability to whitelist dmesg checks based on the entire message rather th...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: tests
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: 21.2
Assignee: Dan Callaghan
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-26 05:40 UTC by Dan Callaghan
Modified: 2015-12-09 06:00 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-09 06:00:27 UTC
Embargoed:


Attachments (Terms of Use)

Description Dan Callaghan 2015-10-26 05:40:10 UTC
Currently we have /usr/share/rhts/failurestrings and /usr/share/rhts/falsestrings for controlling the dmesg checks which rhts-db-submit-result does. There is also some specific handling of kernel traces delimited by '[ cut here ]' which is basically all kernel warns/oopses/bugs on modern kernels.

Each line of failurestrings and falsestrings is treated as a regexp pattern. For each line of dmesg, if a pattern from failurestrings matches and no pattern from falsestrings matches, it's reported as a failure. However the kernel trace handling with '[ cut here ]' is unconditional and there is no way to whitelist items found by it.

Ideally we would be able to craft a regexp which matches against the entire multi-line trace string.

In this particular case we have warnings like this, which we want to whitelist only on IBM X3250 M4 models where the firmware will likely never be fixed. However we don't want to ignore every single instance of "mapping multiple BARs" warning. So we want to put a pattern like "mapping multiple BARs.*IBM System X3250 M4 " into falsestrings and let it be matched with re.DOTALL against the entire kernel trace.


[   11.625289] ------------[ cut here ]------------
[   11.630445] WARNING: at arch/x86/mm/ioremap.c:195 __ioremap_caller+0x286/0x370()
[   11.638705] Info: mapping multiple BARs. Your kernel is fine.
[   11.644928] Modules linked in:
[   11.656962] ipmi_si ipmi_si.0: Found new BMC (man_id: 0x004f4d, prod_id: 0x012e, dev_id: 0x20)
[   11.656966] ipmi_si ipmi_si.0: IPMI kcs interface initialized
[   11.648357]  ie31200_edac(+) edac_core wmi ipmi_si(+) ipmi_msghandler shpchp nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables xfs libcrc32c sd_mod crc_t10dif sr_mod crct10dif_generic cdrom ata_generic pata_acpi mgag200 syscopyarea sysfillrect sysimgblt i2c_algo_bit drm_kms_helper ttm ata_piix e1000e crct10dif_pclmul crct10dif_common drm ptp libata crc32c_intel i2c_core pps_core dm_mirror dm_region_hash dm_log dm_mod
[   11.705006] CPU: 0 PID: 568 Comm: systemd-udevd Not tainted 3.10.0-324.el7.x86_64 #1
[   11.713646] Hardware name: IBM IBM System X3250 M4 -[2583AC1]-/00D3729, BIOS -[JQE164AUS-1.07]- 12/09/2013
[   11.724417]  ffff88023241ba88 00000000653d7f8a ffff88023241ba40 ffffffff816350c1
[   11.732710]  ffff88023241ba78 ffffffff8107b200 ffffc90004e50000 ffffc90004e50000
[   11.741002]  00000000fed18000 ffffc90004e50000 0000000000008000 ffff88023241bae0
[   11.749295] Call Trace:
[   11.752023]  [<ffffffff816350c1>] dump_stack+0x19/0x1b
[   11.757756]  [<ffffffff8107b200>] warn_slowpath_common+0x70/0xb0
[   11.764458]  [<ffffffff8107b29c>] warn_slowpath_fmt+0x5c/0x80
[   11.770870]  [<ffffffff81086b54>] ? iomem_map_sanity_check+0xc4/0xd0
[   11.777959]  [<ffffffff8105fdd6>] __ioremap_caller+0x286/0x370
[   11.784468]  [<ffffffff8105fed7>] ioremap_nocache+0x17/0x20
[   11.790684]  [<ffffffffa03d7133>] ie31200_init_one+0xf3/0x490 [ie31200_edac]
[   11.798550]  [<ffffffff81327c25>] local_pci_probe+0x45/0xa0
[   11.804767]  [<ffffffff81328f15>] ? pci_match_device+0xe5/0x120
[   11.811374]  [<ffffffff81329089>] pci_device_probe+0xf9/0x150
[   11.817786]  [<ffffffff813f62c7>] driver_probe_device+0x87/0x390
[   11.824488]  [<ffffffff813f66a3>] __driver_attach+0x93/0xa0
[   11.830704]  [<ffffffff813f6610>] ? __device_attach+0x40/0x40
[   11.837115]  [<ffffffff813f4033>] bus_for_each_dev+0x73/0xc0
[   11.843428]  [<ffffffff813f5d1e>] driver_attach+0x1e/0x20
[   11.849452]  [<ffffffff813f5870>] bus_add_driver+0x200/0x2d0
[   11.855764]  [<ffffffff813f6d24>] driver_register+0x64/0xf0
[   11.861981]  [<ffffffff81328bc5>] __pci_register_driver+0xa5/0xc0
[   11.868778]  [<ffffffffa003c000>] ? 0xffffffffa003bfff
[   11.874512]  [<ffffffffa003c031>] ie31200_init+0x31/0x1000 [ie31200_edac]
[   11.882086]  [<ffffffff810020e8>] do_one_initcall+0xb8/0x230
[   11.888401]  [<ffffffff810ed4ae>] load_module+0x134e/0x1b50
[   11.894617]  [<ffffffff813166b0>] ? ddebug_proc_write+0xf0/0xf0
[   11.901223]  [<ffffffff810e9743>] ? copy_module_from_fd.isra.42+0x53/0x150
[   11.908893]  [<ffffffff810ede66>] SyS_finit_module+0xa6/0xd0
[   11.915207]  [<ffffffff816457c9>] system_call_fastpath+0x16/0x1b
[   11.921907] ---[ end trace 5fcf161d6e45465f ]---

Comment 1 Dan Callaghan 2015-10-26 05:40:22 UTC
http://gerrit.beaker-project.org/4457

Comment 6 wangdong 2015-11-02 08:47:23 UTC
Verified passed in https://beaker-devel.app.eng.bos.redhat.com/

Steps

1. Provision a job with x3250m4 machine.

2. After job successful complete check demsg log.
   There isn't have Warning message.

Change status to verified.


Note You need to log in before you can comment on or make changes to this bug.