Skip to content

Commit a034e29

Browse files
committed
Rust: Simplify the test a little.
1 parent 097ac69 commit a034e29

File tree

3 files changed

+61
-65
lines changed

3 files changed

+61
-65
lines changed
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
| test.rs:114:26:114:50 | //... | Missing result: hasTaintFlow=request |
2-
| test.rs:115:25:115:49 | //... | Missing result: hasTaintFlow=request |
3-
| test.rs:121:22:121:46 | //... | Missing result: hasTaintFlow=request |
4-
| test.rs:217:24:217:89 | //... | Missing result: hasTaintFlow |
1+
| test.rs:218:24:218:89 | //... | Missing result: hasTaintFlow |
Lines changed: 58 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#select
21
| test.rs:8:10:8:22 | ...::var | Flow source 'EnvironmentSource' of type environment (DEFAULT). |
32
| test.rs:9:10:9:25 | ...::var_os | Flow source 'EnvironmentSource' of type environment (DEFAULT). |
43
| test.rs:11:16:11:28 | ...::var | Flow source 'EnvironmentSource' of type environment (DEFAULT). |
@@ -22,64 +21,66 @@
2221
| test.rs:77:26:77:37 | ...::get | Flow source 'RemoteSource' of type remote (DEFAULT). |
2322
| test.rs:80:24:80:35 | ...::get | Flow source 'RemoteSource' of type remote (DEFAULT). |
2423
| test.rs:99:18:99:47 | ...::connect | Flow source 'RemoteSource' of type remote (DEFAULT). |
25-
| test.rs:210:22:210:35 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
26-
| test.rs:216:22:216:35 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
27-
| test.rs:222:22:222:35 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
28-
| test.rs:228:22:228:35 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
29-
| test.rs:234:9:234:22 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
30-
| test.rs:238:17:238:30 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
31-
| test.rs:245:50:245:63 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
32-
| test.rs:251:46:251:59 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
33-
| test.rs:258:50:258:63 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
34-
| test.rs:265:50:265:63 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
35-
| test.rs:272:56:272:69 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
36-
| test.rs:280:46:280:59 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
37-
| test.rs:287:46:287:59 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
38-
| test.rs:293:46:293:59 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
39-
| test.rs:308:25:308:40 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
40-
| test.rs:315:25:315:40 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
41-
| test.rs:322:25:322:40 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
42-
| test.rs:329:25:329:40 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
43-
| test.rs:336:25:336:40 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
44-
| test.rs:348:25:348:40 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
45-
| test.rs:357:52:357:67 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
46-
| test.rs:363:48:363:63 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
47-
| test.rs:370:52:370:67 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
48-
| test.rs:377:52:377:67 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
49-
| test.rs:384:58:384:73 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
50-
| test.rs:392:48:392:63 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
51-
| test.rs:407:31:407:43 | ...::read | Flow source 'FileSource' of type file (DEFAULT). |
52-
| test.rs:407:31:407:43 | ...::read | Flow source 'FileSource' of type file (DEFAULT). |
53-
| test.rs:412:31:412:38 | ...::read | Flow source 'FileSource' of type file (DEFAULT). |
54-
| test.rs:412:31:412:38 | ...::read | Flow source 'FileSource' of type file (DEFAULT). |
55-
| test.rs:417:22:417:39 | ...::read_to_string | Flow source 'FileSource' of type file (DEFAULT). |
56-
| test.rs:417:22:417:39 | ...::read_to_string | Flow source 'FileSource' of type file (DEFAULT). |
57-
| test.rs:423:22:423:25 | path | Flow source 'FileSource' of type file (DEFAULT). |
58-
| test.rs:424:27:424:35 | file_name | Flow source 'FileSource' of type file (DEFAULT). |
59-
| test.rs:430:22:430:34 | ...::read_link | Flow source 'FileSource' of type file (DEFAULT). |
60-
| test.rs:439:31:439:45 | ...::read | Flow source 'FileSource' of type file (DEFAULT). |
61-
| test.rs:444:31:444:45 | ...::read | Flow source 'FileSource' of type file (DEFAULT). |
62-
| test.rs:449:22:449:46 | ...::read_to_string | Flow source 'FileSource' of type file (DEFAULT). |
63-
| test.rs:455:26:455:29 | path | Flow source 'FileSource' of type file (DEFAULT). |
64-
| test.rs:455:26:455:29 | path | Flow source 'FileSource' of type file (DEFAULT). |
65-
| test.rs:456:31:456:39 | file_name | Flow source 'FileSource' of type file (DEFAULT). |
66-
| test.rs:456:31:456:39 | file_name | Flow source 'FileSource' of type file (DEFAULT). |
67-
| test.rs:462:22:462:41 | ...::read_link | Flow source 'FileSource' of type file (DEFAULT). |
68-
| test.rs:472:20:472:38 | ...::open | Flow source 'FileSource' of type file (DEFAULT). |
69-
| test.rs:506:21:506:39 | ...::open | Flow source 'FileSource' of type file (DEFAULT). |
24+
| test.rs:114:31:114:42 | send_request | Flow source 'RemoteSource' of type remote (DEFAULT). |
25+
| test.rs:121:31:121:42 | send_request | Flow source 'RemoteSource' of type remote (DEFAULT). |
26+
| test.rs:211:22:211:35 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
27+
| test.rs:217:22:217:35 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
28+
| test.rs:223:22:223:35 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
29+
| test.rs:229:22:229:35 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
30+
| test.rs:235:9:235:22 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
31+
| test.rs:239:17:239:30 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
32+
| test.rs:246:50:246:63 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
33+
| test.rs:252:46:252:59 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
34+
| test.rs:259:50:259:63 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
35+
| test.rs:266:50:266:63 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
36+
| test.rs:273:56:273:69 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
37+
| test.rs:281:46:281:59 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
38+
| test.rs:288:46:288:59 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
39+
| test.rs:294:46:294:59 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
40+
| test.rs:309:25:309:40 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
41+
| test.rs:316:25:316:40 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
42+
| test.rs:323:25:323:40 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
43+
| test.rs:330:25:330:40 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
44+
| test.rs:337:25:337:40 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
45+
| test.rs:349:25:349:40 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
46+
| test.rs:358:52:358:67 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
47+
| test.rs:364:48:364:63 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
48+
| test.rs:371:52:371:67 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
49+
| test.rs:378:52:378:67 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
50+
| test.rs:385:58:385:73 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
51+
| test.rs:393:48:393:63 | ...::stdin | Flow source 'StdInSource' of type stdin (DEFAULT). |
52+
| test.rs:408:31:408:43 | ...::read | Flow source 'FileSource' of type file (DEFAULT). |
53+
| test.rs:408:31:408:43 | ...::read | Flow source 'FileSource' of type file (DEFAULT). |
54+
| test.rs:413:31:413:38 | ...::read | Flow source 'FileSource' of type file (DEFAULT). |
55+
| test.rs:413:31:413:38 | ...::read | Flow source 'FileSource' of type file (DEFAULT). |
56+
| test.rs:418:22:418:39 | ...::read_to_string | Flow source 'FileSource' of type file (DEFAULT). |
57+
| test.rs:418:22:418:39 | ...::read_to_string | Flow source 'FileSource' of type file (DEFAULT). |
58+
| test.rs:424:22:424:25 | path | Flow source 'FileSource' of type file (DEFAULT). |
59+
| test.rs:425:27:425:35 | file_name | Flow source 'FileSource' of type file (DEFAULT). |
60+
| test.rs:431:22:431:34 | ...::read_link | Flow source 'FileSource' of type file (DEFAULT). |
61+
| test.rs:440:31:440:45 | ...::read | Flow source 'FileSource' of type file (DEFAULT). |
62+
| test.rs:445:31:445:45 | ...::read | Flow source 'FileSource' of type file (DEFAULT). |
63+
| test.rs:450:22:450:46 | ...::read_to_string | Flow source 'FileSource' of type file (DEFAULT). |
64+
| test.rs:456:26:456:29 | path | Flow source 'FileSource' of type file (DEFAULT). |
65+
| test.rs:456:26:456:29 | path | Flow source 'FileSource' of type file (DEFAULT). |
66+
| test.rs:457:31:457:39 | file_name | Flow source 'FileSource' of type file (DEFAULT). |
67+
| test.rs:457:31:457:39 | file_name | Flow source 'FileSource' of type file (DEFAULT). |
68+
| test.rs:463:22:463:41 | ...::read_link | Flow source 'FileSource' of type file (DEFAULT). |
69+
| test.rs:473:20:473:38 | ...::open | Flow source 'FileSource' of type file (DEFAULT). |
7070
| test.rs:507:21:507:39 | ...::open | Flow source 'FileSource' of type file (DEFAULT). |
71-
| test.rs:515:21:515:39 | ...::open | Flow source 'FileSource' of type file (DEFAULT). |
72-
| test.rs:527:20:527:40 | ...::open | Flow source 'FileSource' of type file (DEFAULT). |
73-
| test.rs:574:21:574:41 | ...::open | Flow source 'FileSource' of type file (DEFAULT). |
71+
| test.rs:508:21:508:39 | ...::open | Flow source 'FileSource' of type file (DEFAULT). |
72+
| test.rs:516:21:516:39 | ...::open | Flow source 'FileSource' of type file (DEFAULT). |
73+
| test.rs:528:20:528:40 | ...::open | Flow source 'FileSource' of type file (DEFAULT). |
7474
| test.rs:575:21:575:41 | ...::open | Flow source 'FileSource' of type file (DEFAULT). |
75-
| test.rs:583:21:583:41 | ...::open | Flow source 'FileSource' of type file (DEFAULT). |
76-
| test.rs:600:26:600:53 | ...::connect | Flow source 'RemoteSource' of type remote (DEFAULT). |
77-
| test.rs:619:26:619:61 | ...::connect_timeout | Flow source 'RemoteSource' of type remote (DEFAULT). |
78-
| test.rs:671:28:671:57 | ...::connect | Flow source 'RemoteSource' of type remote (DEFAULT). |
79-
| test.rs:753:22:753:49 | ...::connect | Flow source 'RemoteSource' of type remote (DEFAULT). |
80-
| test.rs:779:22:779:50 | ...::new | Flow source 'RemoteSource' of type remote (DEFAULT). |
81-
| test.rs:806:16:806:29 | ...::args | Flow source 'CommandLineArgs' of type commandargs (DEFAULT). |
82-
| test.rs:806:16:806:29 | ...::args | Flow source 'CommandLineArgs' of type commandargs (DEFAULT). |
75+
| test.rs:576:21:576:41 | ...::open | Flow source 'FileSource' of type file (DEFAULT). |
76+
| test.rs:584:21:584:41 | ...::open | Flow source 'FileSource' of type file (DEFAULT). |
77+
| test.rs:601:26:601:53 | ...::connect | Flow source 'RemoteSource' of type remote (DEFAULT). |
78+
| test.rs:620:26:620:61 | ...::connect_timeout | Flow source 'RemoteSource' of type remote (DEFAULT). |
79+
| test.rs:672:28:672:57 | ...::connect | Flow source 'RemoteSource' of type remote (DEFAULT). |
80+
| test.rs:754:22:754:49 | ...::connect | Flow source 'RemoteSource' of type remote (DEFAULT). |
81+
| test.rs:780:22:780:50 | ...::new | Flow source 'RemoteSource' of type remote (DEFAULT). |
82+
| test.rs:807:16:807:29 | ...::args | Flow source 'CommandLineArgs' of type commandargs (DEFAULT). |
83+
| test.rs:807:16:807:29 | ...::args | Flow source 'CommandLineArgs' of type commandargs (DEFAULT). |
8384
| test_futures_io.rs:19:15:19:32 | ...::connect | Flow source 'RemoteSource' of type remote (DEFAULT). |
8485
| web_frameworks.rs:11:31:11:31 | a | Flow source 'RemoteSource' of type remote (DEFAULT). |
8586
| web_frameworks.rs:11:31:11:31 | a | Flow source 'RemoteSource' of type remote (DEFAULT). |
@@ -91,6 +92,3 @@
9192
| web_frameworks.rs:58:14:58:15 | ms | Flow source 'RemoteSource' of type remote (DEFAULT). |
9293
| web_frameworks.rs:68:15:68:15 | a | Flow source 'RemoteSource' of type remote (DEFAULT). |
9394
| web_frameworks.rs:68:15:68:15 | a | Flow source 'RemoteSource' of type remote (DEFAULT). |
94-
testFailures
95-
| test.rs:113:61:113:98 | //... | Missing result: Alert[rust/summary/taint-sources] |
96-
| test.rs:120:61:120:98 | //... | Missing result: Alert[rust/summary/taint-sources] |

rust/ql/test/library-tests/dataflow/sources/test.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ async fn test_hyper_http(case: i64) -> Result<(), Box<dyn std::error::Error>> {
9898
println!("connecting to {}...", address);
9999
let stream = tokio::net::TcpStream::connect(address).await?; // $ Alert[rust/summary/taint-sources]
100100
let io = hyper_util::rt::TokioIo::new(stream);
101-
let (mut sender, conn) = hyper::client::conn::http1::handshake(io).await?;
101+
let (sender, conn) = hyper::client::conn::http1::handshake(io).await?;
102+
let mut sender: hyper::client::conn::http1::SendRequest<String> = sender;
102103

103104
// drive the HTTP connection
104105
tokio::task::spawn(async move {

0 commit comments

Comments
 (0)