Skip to content

Commit e495faa

Browse files
committed
csmock: apply filters of important reports more precisely
In order not to clobber scan properties, we used to use `csmock --mode=grep` while feeding csdiff. This caused spurious matches of important reports in case csdiff parsed the plain-text output differently (namely a wrong event was recognized as the key event in some corner cases). This commit makes csdiff operate solely on the JSON format, which tags key events explicitly.
1 parent c521dc6 commit e495faa

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

make-srpm.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ Tool for plugging static analyzers into the build process, free of mock.
136136
137137
%package -n csmock-common
138138
Summary: Core of csmock (a mock wrapper for Static Analysis tools)
139-
Requires: csdiff > 1.8.0
139+
Requires: csdiff > 2.1.0
140140
Requires: csgcca
141141
Requires: cswrap >= 1.3.1
142142
Requires: mock

py/csmock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ def finalize_results(js_file, results, props):
507507
# then apply custom per-checker filters
508508
for (chk, csgrep_args) in props.imp_csgrep_filters:
509509
chk_re = re_from_checker_set(props.imp_checker_set - set([chk]))
510-
cmd += " | csdiff <(csgrep '%s' --mode=grep --invert-regex --checker '%s' %s) -" \
510+
cmd += " | csdiff <(csgrep '%s' --mode=json --drop-scan-props --invert-regex --checker '%s' %s) -" \
511511
% (js_file, chk_re, csgrep_args)
512512

513513
# write the result into *-imp.js

0 commit comments

Comments
 (0)