Skip to content

Commit 8f34281

Browse files
committed
Update expected test output
1 parent 4de57f4 commit 8f34281

File tree

41 files changed

+1941
-117
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1941
-117
lines changed

Diff for: cpp/ql/test/library-tests/dataflow/dataflow-tests/test-source-sink.expected

+5-1
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,14 @@ irFlow
182182
| dispatch.cpp:107:17:107:22 | call to source | dispatch.cpp:96:8:96:8 | x |
183183
| dispatch.cpp:140:8:140:13 | call to source | dispatch.cpp:96:8:96:8 | x |
184184
| dispatch.cpp:144:8:144:13 | call to source | dispatch.cpp:96:8:96:8 | x |
185+
| flowOut.cpp:5:16:5:21 | call to source | flowOut.cpp:19:9:19:9 | x |
185186
| flowOut.cpp:5:16:5:21 | call to source | flowOut.cpp:31:9:31:9 | x |
187+
| flowOut.cpp:5:16:5:21 | call to source | flowOut.cpp:46:8:46:11 | access to array |
186188
| flowOut.cpp:5:16:5:21 | call to source | flowOut.cpp:61:8:61:11 | access to array |
187-
| flowOut.cpp:84:18:84:23 | call to source | flowOut.cpp:85:8:85:9 | * ... |
189+
| flowOut.cpp:8:16:8:23 | call to source | flowOut.cpp:73:8:73:9 | * ... |
190+
| flowOut.cpp:8:16:8:23 | call to source | flowOut.cpp:117:8:117:9 | * ... |
188191
| flowOut.cpp:90:8:90:13 | call to source | flowOut.cpp:102:8:102:9 | * ... |
192+
| flowOut.cpp:131:15:131:20 | call to source | flowOut.cpp:146:8:146:10 | * ... |
189193
| flowOut.cpp:131:15:131:20 | call to source | flowOut.cpp:161:8:161:10 | * ... |
190194
| flowOut.cpp:131:15:131:20 | call to source | flowOut.cpp:202:8:202:10 | * ... |
191195
| flowOut.cpp:168:14:168:19 | call to source | flowOut.cpp:185:8:185:9 | * ... |
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
11
testFailures
2+
| flowOut.cpp:19:9:19:9 | x | Unexpected result: ir |
3+
| flowOut.cpp:46:8:46:11 | access to array | Unexpected result: ir |
4+
| flowOut.cpp:73:8:73:9 | * ... | Unexpected result: ir |
5+
| flowOut.cpp:85:13:85:32 | // $ ir MISSING: ast | Missing result: ir |
6+
| flowOut.cpp:117:8:117:9 | * ... | Unexpected result: ir |
7+
| flowOut.cpp:146:8:146:10 | * ... | Unexpected result: ir |
28
failures
+2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
testFailures
2+
| A.cpp:65:14:65:14 | c | Unexpected result: ast |
3+
| A.cpp:74:14:74:14 | c | Unexpected result: ast |
24
failures

Diff for: cpp/ql/test/library-tests/dataflow/fields/ir-path-flow.expected

+167-39
Large diffs are not rendered by default.

Diff for: cpp/ql/test/library-tests/dataflow/fields/path-flow.expected

+108-12
Large diffs are not rendered by default.

Diff for: cpp/ql/test/library-tests/dataflow/taint-tests/taint.expected

+28
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,32 @@ WARNING: module 'DataFlow' has been deprecated and may be removed in future (tai
44
WARNING: module 'DataFlow' has been deprecated and may be removed in future (taint.ql:68,25-33)
55
WARNING: module 'TaintTracking' has been deprecated and may be removed in future (taint.ql:73,20-33)
66
testFailures
7+
| arrayassignment.cpp:66:12:66:31 | // $ ir MISSING: ast | Missing result: ir |
8+
| arrayassignment.cpp:67:18:67:28 | // $ ast,ir | Missing result: ir |
9+
| arrayassignment.cpp:110:19:110:38 | // $ ir MISSING: ast | Missing result: ir |
10+
| vector.cpp:52:12:52:30 | // $ ir MISSING:ast | Missing result: ir |
11+
| vector.cpp:53:15:53:33 | // $ ir MISSING:ast | Missing result: ir |
12+
| vector.cpp:54:15:54:31 | // $ SPURIOUS: ir | Fixed spurious result: ir |
13+
| vector.cpp:55:15:55:33 | // $ ir MISSING:ast | Missing result: ir |
14+
| vector.cpp:58:12:58:30 | // $ ir MISSING:ast | Missing result: ir |
15+
| vector.cpp:59:15:59:33 | // $ ir MISSING:ast | Missing result: ir |
16+
| vector.cpp:60:15:60:31 | // $ SPURIOUS: ir | Fixed spurious result: ir |
17+
| vector.cpp:61:15:61:33 | // $ ir MISSING:ast | Missing result: ir |
18+
| vector.cpp:64:12:64:30 | // $ ir MISSING:ast | Missing result: ir |
19+
| vector.cpp:65:15:65:33 | // $ ir MISSING:ast | Missing result: ir |
20+
| vector.cpp:66:15:66:33 | // $ ir MISSING:ast | Missing result: ir |
21+
| vector.cpp:67:15:67:33 | // $ ir MISSING:ast | Missing result: ir |
22+
| vector.cpp:75:12:75:30 | // $ ir MISSING:ast | Missing result: ir |
23+
| vector.cpp:76:22:76:40 | // $ ir MISSING:ast | Missing result: ir |
24+
| vector.cpp:97:12:97:30 | // $ ir MISSING:ast | Missing result: ir |
25+
| vector.cpp:98:18:98:36 | // $ ir MISSING:ast | Missing result: ir |
26+
| vector.cpp:99:18:99:36 | // $ ir MISSING:ast | Missing result: ir |
27+
| vector.cpp:100:18:100:36 | // $ ir MISSING:ast | Missing result: ir |
28+
| vector.cpp:171:19:171:37 | // $ ir MISSING:ast | Missing result: ir |
29+
| vector.cpp:180:19:180:37 | // $ ir MISSING:ast | Missing result: ir |
30+
| vector.cpp:201:19:201:37 | // $ ir MISSING:ast | Missing result: ir |
31+
| vector.cpp:212:22:212:41 | // $ ir MISSING: ast | Missing result: ir |
32+
| vector.cpp:290:12:290:18 | // $ ir | Missing result: ir |
33+
| vector.cpp:291:19:291:37 | // $ ir MISSING:ast | Missing result: ir |
34+
| vector.cpp:292:22:292:40 | // $ ir MISSING:ast | Missing result: ir |
735
failures

Diff for: cpp/ql/test/query-tests/Security/CWE/CWE-119/SAMATE/OverrunWriteProductFlow.expected

+3-1
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ edges
5353
| test.cpp:228:27:228:54 | call to malloc | test.cpp:228:27:228:54 | call to malloc | provenance | |
5454
| test.cpp:228:27:228:54 | call to malloc | test.cpp:232:10:232:15 | buffer | provenance | |
5555
| test.cpp:235:40:235:45 | buffer | test.cpp:236:5:236:26 | ... = ... | provenance | |
56-
| test.cpp:236:5:236:9 | *p_str [post update] [string] | test.cpp:235:27:235:31 | *p_str [Return] [string] | provenance | |
56+
| test.cpp:236:5:236:9 | *p_str [Reverse] [string] | test.cpp:235:27:235:31 | *p_str [Return] [string] | provenance | |
5757
| test.cpp:236:5:236:9 | *p_str [post update] [string] | test.cpp:235:27:235:31 | *p_str [string] | provenance | |
58+
| test.cpp:236:5:236:9 | *p_str [post update] [string] | test.cpp:236:5:236:9 | *p_str [Reverse] [string] | provenance | |
5859
| test.cpp:236:5:236:26 | ... = ... | test.cpp:236:5:236:9 | *p_str [post update] [string] | provenance | |
5960
| test.cpp:241:20:241:38 | call to malloc | test.cpp:241:20:241:38 | call to malloc | provenance | |
6061
| test.cpp:241:20:241:38 | call to malloc | test.cpp:242:22:242:27 | buffer | provenance | |
@@ -132,6 +133,7 @@ nodes
132133
| test.cpp:235:27:235:31 | *p_str [Return] [string] | semmle.label | *p_str [Return] [string] |
133134
| test.cpp:235:27:235:31 | *p_str [string] | semmle.label | *p_str [string] |
134135
| test.cpp:235:40:235:45 | buffer | semmle.label | buffer |
136+
| test.cpp:236:5:236:9 | *p_str [Reverse] [string] | semmle.label | *p_str [Reverse] [string] |
135137
| test.cpp:236:5:236:9 | *p_str [post update] [string] | semmle.label | *p_str [post update] [string] |
136138
| test.cpp:236:5:236:26 | ... = ... | semmle.label | ... = ... |
137139
| test.cpp:241:20:241:38 | call to malloc | semmle.label | call to malloc |

Diff for: cpp/ql/test/query-tests/Security/CWE/CWE-119/semmle/tests/OverflowDestination.expected

+4
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@ edges
55
| overflowdestination.cpp:27:2:27:15 | *... = ... | overflowdestination.cpp:30:17:30:20 | *arg1 | provenance | |
66
| overflowdestination.cpp:43:8:43:10 | fgets output argument | overflowdestination.cpp:46:15:46:17 | *src | provenance | |
77
| overflowdestination.cpp:50:52:50:54 | *src | overflowdestination.cpp:50:52:50:54 | *src | provenance | |
8+
| overflowdestination.cpp:50:52:50:54 | *src | overflowdestination.cpp:50:52:50:54 | *src [Return] | provenance | DataFlowFunction |
89
| overflowdestination.cpp:50:52:50:54 | *src | overflowdestination.cpp:53:15:53:17 | *src | provenance | |
910
| overflowdestination.cpp:57:52:57:54 | *src | overflowdestination.cpp:60:15:60:17 | *src | provenance | |
1011
| overflowdestination.cpp:60:15:60:17 | *src | overflowdestination.cpp:64:16:64:19 | *src2 | provenance | |
1112
| overflowdestination.cpp:73:8:73:10 | fgets output argument | overflowdestination.cpp:75:30:75:32 | *src | provenance | |
1213
| overflowdestination.cpp:73:8:73:10 | fgets output argument | overflowdestination.cpp:76:30:76:32 | *src | provenance | |
1314
| overflowdestination.cpp:75:30:75:32 | *src | overflowdestination.cpp:50:52:50:54 | *src | provenance | |
1415
| overflowdestination.cpp:75:30:75:32 | *src | overflowdestination.cpp:75:30:75:32 | overflowdest_test2 output argument | provenance | |
16+
| overflowdestination.cpp:75:30:75:32 | *src | overflowdestination.cpp:75:30:75:32 | overflowdest_test2 output argument | provenance | DataFlowFunction |
1517
| overflowdestination.cpp:75:30:75:32 | overflowdest_test2 output argument | overflowdestination.cpp:76:30:76:32 | *src | provenance | |
1618
| overflowdestination.cpp:76:30:76:32 | *src | overflowdestination.cpp:57:52:57:54 | *src | provenance | |
1719
nodes
@@ -24,6 +26,7 @@ nodes
2426
| overflowdestination.cpp:46:15:46:17 | *src | semmle.label | *src |
2527
| overflowdestination.cpp:50:52:50:54 | *src | semmle.label | *src |
2628
| overflowdestination.cpp:50:52:50:54 | *src | semmle.label | *src |
29+
| overflowdestination.cpp:50:52:50:54 | *src [Return] | semmle.label | *src [Return] |
2730
| overflowdestination.cpp:53:15:53:17 | *src | semmle.label | *src |
2831
| overflowdestination.cpp:57:52:57:54 | *src | semmle.label | *src |
2932
| overflowdestination.cpp:60:15:60:17 | *src | semmle.label | *src |
@@ -34,6 +37,7 @@ nodes
3437
| overflowdestination.cpp:76:30:76:32 | *src | semmle.label | *src |
3538
subpaths
3639
| overflowdestination.cpp:75:30:75:32 | *src | overflowdestination.cpp:50:52:50:54 | *src | overflowdestination.cpp:50:52:50:54 | *src | overflowdestination.cpp:75:30:75:32 | overflowdest_test2 output argument |
40+
| overflowdestination.cpp:75:30:75:32 | *src | overflowdestination.cpp:50:52:50:54 | *src | overflowdestination.cpp:50:52:50:54 | *src [Return] | overflowdestination.cpp:75:30:75:32 | overflowdest_test2 output argument |
3741
#select
3842
| overflowdestination.cpp:30:2:30:8 | call to strncpy | main.cpp:6:27:6:30 | **argv | overflowdestination.cpp:30:17:30:20 | *arg1 | To avoid overflow, this operation should be bounded by destination-buffer size, not source-buffer size. |
3943
| overflowdestination.cpp:46:2:46:7 | call to memcpy | overflowdestination.cpp:43:8:43:10 | fgets output argument | overflowdestination.cpp:46:15:46:17 | *src | To avoid overflow, this operation should be bounded by destination-buffer size, not source-buffer size. |
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,38 @@
11
unexpectedModel
22
expectedModel
3+
| Expected contentbased-summary missing: Models;BasicFlow;false;ReturnField;();;Argument[this].SyntheticField[Models.BasicFlow.tainted];ReturnValue;value;dfc-generated |
4+
| Expected contentbased-summary missing: Models;BasicFlow;false;SetField;(System.String);;Argument[0];Argument[this].SyntheticField[Models.BasicFlow.tainted];value;dfc-generated |
5+
| Expected contentbased-summary missing: Models;CollectionFlow;false;AddFieldToList;(System.Collections.Generic.List<System.String>);;Argument[this].SyntheticField[Models.CollectionFlow.tainted];Argument[0].Element;value;dfc-generated |
6+
| Expected contentbased-summary missing: Models;CollectionFlow;false;AddToList;(System.Collections.Generic.List<System.Object>,System.Object);;Argument[1];Argument[0].Element;value;dfc-generated |
7+
| Expected contentbased-summary missing: Models;CollectionFlow;false;AssignFieldToArray;(System.Object[]);;Argument[this].SyntheticField[Models.CollectionFlow.tainted];Argument[0].Element;value;dfc-generated |
8+
| Expected contentbased-summary missing: Models;CollectionFlow;false;AssignToArray;(System.Object,System.Object[]);;Argument[0];Argument[1].Element;value;dfc-generated |
9+
| Expected contentbased-summary missing: Models;CollectionFlow;false;CollectionFlow;(System.String);;Argument[0];Argument[this].SyntheticField[Models.CollectionFlow.tainted];value;dfc-generated |
10+
| Expected contentbased-summary missing: Models;CollectionFlow;false;ReturnFieldInAList;();;Argument[this].SyntheticField[Models.CollectionFlow.tainted];ReturnValue.Element;value;dfc-generated |
11+
| Expected contentbased-summary missing: Models;GenericFlow<T>;false;AddFieldToGenericList;(System.Collections.Generic.List<T>);;Argument[this].SyntheticField[Models.GenericFlow`1.tainted];Argument[0].Element;value;dfc-generated |
12+
| Expected contentbased-summary missing: Models;GenericFlow<T>;false;AddToGenericList<S>;(System.Collections.Generic.List<S>,S);;Argument[1];Argument[0].Element;value;dfc-generated |
13+
| Expected contentbased-summary missing: Models;GenericFlow<T>;false;ReturnFieldInGenericList;();;Argument[this].SyntheticField[Models.GenericFlow`1.tainted];ReturnValue.Element;value;dfc-generated |
14+
| Expected contentbased-summary missing: Models;GenericFlow<T>;false;ReturnGenericField;();;Argument[this].SyntheticField[Models.GenericFlow`1.tainted];ReturnValue;value;dfc-generated |
15+
| Expected contentbased-summary missing: Models;GenericFlow<T>;false;SetGenericField;(T);;Argument[0];Argument[this].SyntheticField[Models.GenericFlow`1.tainted];value;dfc-generated |
16+
| Expected contentbased-summary missing: Models;HigherOrderExtensionMethods;false;Select<TSource,TResult>;(System.Collections.Generic.IEnumerable<TSource>,System.Func<TSource,TResult>);;Argument[0].Element;Argument[1].Parameter[0];value;dfc-generated |
17+
| Expected contentbased-summary missing: Models;HigherOrderParameters;false;Apply2;(System.Object,System.Func<System.Object,System.Object,System.Object>);;Argument[0];Argument[1].Parameter[1];value;dfc-generated |
18+
| Expected contentbased-summary missing: Models;HigherOrderParameters;false;Apply;(System.Action<System.Object>,System.Object);;Argument[1];Argument[0].Parameter[0];value;dfc-generated |
19+
| Expected contentbased-summary missing: Models;HigherOrderParameters;false;Apply;(System.Func<System.Object,System.Object>,System.Object);;Argument[1];Argument[0].Parameter[0];value;dfc-generated |
20+
| Expected contentbased-summary missing: Models;IEnumerableFlow;false;IEnumerableFlow;(System.String);;Argument[0];Argument[this].SyntheticField[Models.IEnumerableFlow.tainted];value;dfc-generated |
21+
| Expected contentbased-summary missing: Models;IEnumerableFlow;false;ReturnFieldInIEnumerable;();;Argument[this].SyntheticField[Models.IEnumerableFlow.tainted];ReturnValue.Element;value;dfc-generated |
22+
| Expected contentbased-summary missing: Models;Inheritance+DImpl;false;DImpl;(System.String);;Argument[0];Argument[this].SyntheticField[Models.Inheritance+DImpl.tainted];value;dfc-generated |
23+
| Expected contentbased-summary missing: Models;Inheritance+DImpl;true;get_Prop;();;Argument[this].SyntheticField[Models.Inheritance+DImpl.tainted];ReturnValue;value;dfc-generated |
24+
| Expected contentbased-summary missing: Models;OperatorFlow;false;OperatorFlow;(System.Object);;Argument[0];Argument[this].Field[Models.OperatorFlow.Field];value;dfc-generated |
25+
| Expected contentbased-summary missing: Models;Properties;false;get_Prop1;();;Argument[this].SyntheticField[Models.Properties.tainted];ReturnValue;value;dfc-generated |
26+
| Expected contentbased-summary missing: Models;Properties;false;set_Prop2;(System.String);;Argument[0];Argument[this].SyntheticField[Models.Properties.tainted];value;dfc-generated |
27+
| Expected contentbased-summary missing: Models;SyntheticCollections;false;GetElement;(System.Int32);;Argument[this].SyntheticField[Models.SyntheticCollections.array].Element;ReturnValue;value;dfc-generated |
28+
| Expected contentbased-summary missing: Models;SyntheticCollections;false;SyntheticCollections;(System.Object[]);;Argument[0];Argument[this].SyntheticField[Models.SyntheticCollections.array];value;dfc-generated |
29+
| Expected contentbased-summary missing: Models;SyntheticFields+InnerSyntheticFields;false;InnerSyntheticFields;(System.String);;Argument[0];Argument[this].SyntheticField[Models.SyntheticFields+InnerSyntheticFields.value];value;dfc-generated |
30+
| Expected contentbased-summary missing: Models;SyntheticFields;false;CopyChainValue;();;Argument[this].SyntheticField[Models.SyntheticFields.chainBegin];Argument[this].SyntheticField[Models.SyntheticFields.chainEnd];value;dfc-generated |
31+
| Expected contentbased-summary missing: Models;SyntheticFields;false;GetChainEnd;();;Argument[this].SyntheticField[Models.SyntheticFields.chainEnd];ReturnValue;value;dfc-generated |
32+
| Expected contentbased-summary missing: Models;SyntheticFields;false;GetValue1;();;Argument[this].SyntheticField[Models.SyntheticFields.value1];ReturnValue;value;dfc-generated |
33+
| Expected contentbased-summary missing: Models;SyntheticFields;false;GetValue2;();;Argument[this].SyntheticField[Models.SyntheticFields.value2];ReturnValue;value;dfc-generated |
34+
| Expected contentbased-summary missing: Models;SyntheticFields;false;SetChainBegin;(System.String);;Argument[0];Argument[this].SyntheticField[Models.SyntheticFields.chainBegin];value;dfc-generated |
35+
| Expected contentbased-summary missing: Models;SyntheticFields;false;SetValue2;(System.String);;Argument[0];Argument[this].SyntheticField[Models.SyntheticFields.value2];value;dfc-generated |
36+
| Expected contentbased-summary missing: Models;SyntheticFields;false;SyntheticFields;(System.String);;Argument[0];Argument[this].SyntheticField[Models.SyntheticFields.value1];value;dfc-generated |
37+
| Expected contentbased-summary missing: Models;SyntheticProperties;false;GetProp1;();;Argument[this].SyntheticField[Models.SyntheticProperties.Prop1];ReturnValue;value;dfc-generated |
38+
| Expected contentbased-summary missing: Models;SyntheticProperties;false;SyntheticProperties;(System.String);;Argument[0];Argument[this].SyntheticField[Models.SyntheticProperties.Prop1];value;dfc-generated |
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,25 @@
11
unexpectedModel
2+
| Unexpected neutral found: Models;BasicFlow;SetField;(System.String);summary;df-generated |
3+
| Unexpected neutral found: Models;CollectionFlow;AddFieldToList;(System.Collections.Generic.List<System.String>);summary;df-generated |
4+
| Unexpected neutral found: Models;CollectionFlow;AddToList;(System.Collections.Generic.List<System.Object>,System.Object);summary;df-generated |
5+
| Unexpected neutral found: Models;CollectionFlow;AssignFieldToArray;(System.Object[]);summary;df-generated |
6+
| Unexpected neutral found: Models;CollectionFlow;AssignToArray;(System.Object,System.Object[]);summary;df-generated |
7+
| Unexpected neutral found: Models;CollectionFlow;CollectionFlow;(System.String);summary;df-generated |
8+
| Unexpected neutral found: Models;GenericFlow<T>;AddFieldToGenericList;(System.Collections.Generic.List<T>);summary;df-generated |
9+
| Unexpected neutral found: Models;GenericFlow<T>;AddToGenericList<S>;(System.Collections.Generic.List<S>,S);summary;df-generated |
10+
| Unexpected neutral found: Models;GenericFlow<T>;SetGenericField;(T);summary;df-generated |
11+
| Unexpected neutral found: Models;IEnumerableFlow;IEnumerableFlow;(System.String);summary;df-generated |
12+
| Unexpected neutral found: Models;Inheritance+BaseContent;SetValue;(System.Object);summary;df-generated |
13+
| Unexpected neutral found: Models;Inheritance+DImpl;DImpl;(System.String);summary;df-generated |
14+
| Unexpected neutral found: Models;OperatorFlow;OperatorFlow;(System.Object);summary;df-generated |
15+
| Unexpected neutral found: Models;Properties;set_Prop2;(System.String);summary;df-generated |
16+
| Unexpected neutral found: Models;SyntheticCollections;SyntheticCollections;(System.Object[]);summary;df-generated |
17+
| Unexpected neutral found: Models;SyntheticFields+InnerSyntheticFields;InnerSyntheticFields;(System.String);summary;df-generated |
18+
| Unexpected neutral found: Models;SyntheticFields;SetBrokenChainBegin;(System.String);summary;df-generated |
19+
| Unexpected neutral found: Models;SyntheticFields;SetChainBegin;(System.String);summary;df-generated |
20+
| Unexpected neutral found: Models;SyntheticFields;SetValue2;(System.String);summary;df-generated |
21+
| Unexpected neutral found: Models;SyntheticFields;SetValue3;(System.String);summary;df-generated |
22+
| Unexpected neutral found: Models;SyntheticFields;SyntheticFields;(System.String);summary;df-generated |
23+
| Unexpected neutral found: Models;SyntheticProperties;SetProp2;(System.String);summary;df-generated |
24+
| Unexpected neutral found: Models;SyntheticProperties;SyntheticProperties;(System.String);summary;df-generated |
225
expectedModel

0 commit comments

Comments
 (0)