Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib/lkp_pattern.rb: add parentheses for regexp to obtain the matching…
… fragment In commit dd9da9f, new code was introduced to replace load_regular_expressions method, but missed to add the surrounding parentheses, so other code cannot obtain the matching fragment, leading to many spec failures. Add the parentheses back to obtain the matching fragment correctly. == fix issue == [ 0.861994] sysctl could not get directory: /debug/test_sysctl/mnt/mnt_error -30 ---------------- Traceback (most recent call last): 3: from /lkp/yujie/src/stats/dmesg:107:in `<main>' 2: from /lkp/yujie/src/stats/dmesg:107:in `each' 1: from /lkp/yujie/src/stats/dmesg:142:in `block in <main>' /lkp/yujie/src/lib/dmesg.rb:239:in `analyze_error_id': undefined method `sub' for nil:NilClass (NoMethodError) Add another spec to ensure the error is correctly captured and parsed. Fixes: dd9da9f ("lib/lkp_pattern.rb: load pattern by removing line started with # or empty") Signed-off-by: Yujie Liu <yujie.liu@intel.com> Signed-off-by: Philip Li <philip.li@intel.com>
- Loading branch information