-
Bug
-
Resolution: Won't Fix
-
Major
-
Jenkins: 1.607
Warnings plugin: 4.46
Static Code Analysis: 1.70
Static Analysis Collector: not installed
I added Warnings Plugin to count all warnings from log files generated by gcc building according the following configuration:
File pattern: results/*.log (all logs files will placed under results folder in the workspace)
Parser: GUN Make + C Compiler(gcc)
but I found there was the inconsistance between the warning totality reported by warning plugin and results/*.log itself.
all full build logs will placed under results folder, i check the warning api files which shows all warnings with 11511
Now when I run a simple command in the workspace under results folder : cat *.log | grep -I warning: | wc -l , results is 44067 warnings
issue 1: Why the result looks so many differences between them?
then i try to check the log files one by one, but found another strange problems:
at the end of the build console output, there is warning plugin output:
(I put the latest result here and list all real warnings in each log files in the bracket)
...........
17:30:10 [WARNINGS] Parsing warnings in files 'results/*.log' with parser GNU Make + GNU C Compiler (gcc)
17:30:16 [WARNINGS] Finding all files that match the pattern results/*.log
17:30:16 [WARNINGS] Parsing 15 files in /home/jenkins/workspace/JOB-DAILY-START
17:30:16 [WARNINGS] Successfully parsed file /home/jenkins/workspace/JOB-DAILY-START/results/1.log with 0 unique warnings and 0 duplicates.
(cat 1.log | grep -I warning: | wc -l -> real warnings result in 1.log: 0)
17:30:16 [WARNINGS] Successfully parsed file /home/jenkins/workspace/JOB-DAILY-START/results/2.log with 703 unique warnings and 0 duplicates.
(cat 2.log | grep -I warning: | wc -l -> real warnings result in 2.log: 2321)
17:30:16 [WARNINGS] Successfully parsed file /home/jenkins/workspace/JOB-DAILY-START/results/3.log with 756 unique warnings and 684 duplicates.
(cat 3.log | grep -I warning: | wc -l -> real warnings result in 3.log: 2222)
17:30:16 [WARNINGS] Successfully parsed file /home/jenkins/workspace/JOB-DAILY-START/results/4.log with 756 unique warnings and 0 duplicates.
(cat 4.log | grep -I warning: | wc -l -> real warnings result in 4.log: 59)
17:30:16 [WARNINGS] Successfully parsed file /home/jenkins/workspace/JOB-DAILY-START/results/5.log with 756 unique warnings and 0 duplicates.
(cat 5.log | grep -I warning: | wc -l -> real warnings result in 5.log: 0)
17:30:16 [WARNINGS] Successfully parsed file /home/jenkins/workspace/JOB-DAILY-START/results/6.log with 1124 unique warnings and 5 duplicates.
(cat 6.log | grep -I warning: | wc -l -> real warnings result in 6.log: 1497)
17:30:16 [WARNINGS] Successfully parsed file /home/jenkins/workspace/JOB-DAILY-START/results/7.log with 1126 unique warnings and 23 duplicates.
(cat 7.log | grep -I warning: | wc -l -> real warnings result in 7.log: 347)
17:30:16 [WARNINGS] Successfully parsed file /home/jenkins/workspace/JOB-DAILY-START/results/8.log with 1126 unique warnings and 0 duplicates.
(cat 8.log | grep -I warning: | wc -l -> real warnings result in 8.log: 1)
17:30:16 [WARNINGS] Successfully parsed file /home/jenkins/workspace/JOB-DAILY-START/results/9.log with 1126 unique warnings and 0 duplicates.
(cat 9.log | grep -I warning: | wc -l -> real warnings result in 9.log: 1)
17:30:16 [WARNINGS] Successfully parsed file /home/jenkins/workspace/JOB-DAILY-START/results/10.log with 1172 unique warnings and 0 duplicates.
(cat 10.log | grep -I warning: | wc -l -> real warnings result in 10.log: 81)
17:30:16 [WARNINGS] Successfully parsed file /home/jenkins/workspace/JOB-DAILY-START/results/11.log with 1173 unique warnings and 0 duplicates.
(cat 11.log | grep -I warning: | wc -l -> real warnings result in 11.log: 1)
17:30:16 [WARNINGS] Successfully parsed file /home/jenkins/workspace/JOB-DAILY-START/results/12.log with 11240 unique warnings and 319 duplicates.
(cat 12.log | grep -I warning: | wc -l -> real warnings result in 12.log: 18710)
17:30:16 [WARNINGS] Successfully parsed file /home/jenkins/workspace/JOB-DAILY-START/results/13.log with 11511 unique warnings and 10127 duplicates.
(cat 13.log | grep -I warning: | wc -l -> real warnings result in 13.log: 18827)
17:30:16 [WARNINGS] Successfully parsed file /home/jenkins/workspace/JOB-DAILY-START/results/14.log with 11511 unique warnings and 0 duplicates.
(cat 14.log | grep -I warning: | wc -l -> real warnings result in 14.log: 0)
17:30:16 [WARNINGS] Successfully parsed file /home/jenkins/workspace/JOB-DAILY-START/results/15.log with 11511 unique warnings and 0 duplicates.
(cat 15.log | grep -I warning: | wc -l -> real warnings result in 15.log: 0)
17:30:26 [WARNINGS] Computing warning deltas based on reference build #146
17:30:28 Archiving artifacts
17:32:57 No emails were triggered.
..........
from console log by Warnings Plugin:
all unique warnings: 0+703+756+756+756+1124+1126+1126+1126+1172+1173+11240+11511+11511+11511 = 55591
all duplicates warnings:0+0+684+0+0+5+23+0+0+0+0+319+10127+0+0 = 11158
from log files itself:
all warnings: 0+2321+2222+59+0+1497+347+1+1+81+1+18710+18827+0+0= 44067
issue 2: all result above are also different with 11511 which reported by Warning Plugins. How to understand all warning results above?
issue 3: forthermore, the warning result from each log files in console log did not equal with the log files itself:
I pick up two log files to check the warnings:
17:30:16 [WARNINGS] Successfully parsed file /home/jenkins/workspace/JOB-DAILY-START/results/8.log with 1126 unique warnings and 0 duplicates.
(cat 8.log | grep -I warning: | wc -l -> real warnings result in 8.log: 1)
17:30:16 [WARNINGS] Successfully parsed file /home/jenkins/workspace/JOB-DAILY-START/results/12.log with 11240 unique warnings and 319 duplicates.
(cat 12.log | grep -I warning: | wc -l -> real warnings result in 12.log: 18710)
which is the right warning result, all above makes me confusing?
[JENKINS-28033] Warnings Plugin: The inconsistance between the totality warnings reported by Warnings Plugin and log files itself
Attachment | New: results.rar [ 29495 ] |
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Status | Original: In Progress [ 3 ] | New: Open [ 1 ] |
Resolution | New: Won't Fix [ 2 ] | |
Status | Original: Open [ 1 ] | New: Resolved [ 5 ] |
Workflow | Original: JNJira [ 162635 ] | New: JNJira + In-Review [ 197014 ] |