From 8336a956c01e9dc8208c3a7f963501d9745471a9 Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Wed, 22 Oct 2025 13:50:49 +0100 Subject: [PATCH] Rust: Add consistency check failures. --- .../PathResolutionConsistency.expected | 3 +++ .../PathResolutionConsistency.expected | 3 +++ .../PathResolutionConsistency.expected | 17 +++++++++++++++++ .../PathResolutionConsistency.expected | 2 ++ .../PathResolutionConsistency.expected | 9 +++++++++ .../TypeInferenceConsistency.expected | 4 ++++ 6 files changed, 38 insertions(+) create mode 100644 rust/ql/test/library-tests/dataflow/sources/database/CONSISTENCY/PathResolutionConsistency.expected create mode 100644 rust/ql/test/library-tests/dataflow/sources/file/CONSISTENCY/PathResolutionConsistency.expected create mode 100644 rust/ql/test/library-tests/dataflow/sources/net/CONSISTENCY/PathResolutionConsistency.expected create mode 100644 rust/ql/test/library-tests/dataflow/sources/stdin/CONSISTENCY/PathResolutionConsistency.expected create mode 100644 rust/ql/test/library-tests/dataflow/sources/web_frameworks/CONSISTENCY/PathResolutionConsistency.expected create mode 100644 rust/ql/test/library-tests/dataflow/sources/web_frameworks/CONSISTENCY/TypeInferenceConsistency.expected diff --git a/rust/ql/test/library-tests/dataflow/sources/database/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/dataflow/sources/database/CONSISTENCY/PathResolutionConsistency.expected new file mode 100644 index 00000000000..b6a4a56f9f7 --- /dev/null +++ b/rust/ql/test/library-tests/dataflow/sources/database/CONSISTENCY/PathResolutionConsistency.expected @@ -0,0 +1,3 @@ +multiplePathResolutions +| test.rs:10:28:10:65 | Result::<...> | +| test.rs:97:40:97:49 | Result::<...> | diff --git a/rust/ql/test/library-tests/dataflow/sources/file/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/dataflow/sources/file/CONSISTENCY/PathResolutionConsistency.expected new file mode 100644 index 00000000000..134c5e70e5c --- /dev/null +++ b/rust/ql/test/library-tests/dataflow/sources/file/CONSISTENCY/PathResolutionConsistency.expected @@ -0,0 +1,3 @@ +multipleCallTargets +| test.rs:266:22:266:43 | file.read(...) | +| test.rs:275:22:275:41 | f1.read(...) | diff --git a/rust/ql/test/library-tests/dataflow/sources/net/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/dataflow/sources/net/CONSISTENCY/PathResolutionConsistency.expected new file mode 100644 index 00000000000..f117431f873 --- /dev/null +++ b/rust/ql/test/library-tests/dataflow/sources/net/CONSISTENCY/PathResolutionConsistency.expected @@ -0,0 +1,17 @@ +multipleCallTargets +| test.rs:59:62:59:77 | ...::from(...) | +| test.rs:66:58:66:73 | ...::from(...) | +| test.rs:399:31:399:88 | ...::read(...) | +| test.rs:403:31:403:55 | reader.read(...) | +| test.rs:437:26:437:43 | reader2.fill_buf() | +| test.rs:457:31:457:89 | ...::read(...) | +| test.rs:461:31:461:56 | reader2.read(...) | +| test.rs:479:26:479:43 | reader2.fill_buf() | +| test.rs:486:31:486:66 | reader2.read_until(...) | +| test.rs:493:31:493:58 | reader2.read_line(...) | +| test.rs:500:31:500:62 | reader2.read_to_end(...) | +| test.rs:506:36:506:50 | reader2.lines() | +| test.rs:507:18:507:36 | lines_stream.next() | +| test.rs:508:36:508:54 | lines_stream.next() | +| test.rs:519:50:519:66 | ...::from(...) | +| test.rs:519:50:519:66 | ...::from(...) | diff --git a/rust/ql/test/library-tests/dataflow/sources/stdin/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/dataflow/sources/stdin/CONSISTENCY/PathResolutionConsistency.expected new file mode 100644 index 00000000000..535b3f339b4 --- /dev/null +++ b/rust/ql/test/library-tests/dataflow/sources/stdin/CONSISTENCY/PathResolutionConsistency.expected @@ -0,0 +1,2 @@ +multipleCallTargets +| test.rs:31:22:31:72 | ... .read_to_string(...) | diff --git a/rust/ql/test/library-tests/dataflow/sources/web_frameworks/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/dataflow/sources/web_frameworks/CONSISTENCY/PathResolutionConsistency.expected new file mode 100644 index 00000000000..b0e1a6e6344 --- /dev/null +++ b/rust/ql/test/library-tests/dataflow/sources/web_frameworks/CONSISTENCY/PathResolutionConsistency.expected @@ -0,0 +1,9 @@ +multipleCallTargets +| test.rs:13:14:13:23 | a.as_str() | +| test.rs:13:14:13:23 | a.as_str() | +| test.rs:14:14:14:25 | a.as_bytes() | +| test.rs:14:14:14:25 | a.as_bytes() | +| test.rs:101:14:101:23 | a.as_str() | +| test.rs:102:14:102:25 | a.as_bytes() | +| test.rs:158:14:158:23 | a.as_str() | +| test.rs:159:14:159:25 | a.as_bytes() | diff --git a/rust/ql/test/library-tests/dataflow/sources/web_frameworks/CONSISTENCY/TypeInferenceConsistency.expected b/rust/ql/test/library-tests/dataflow/sources/web_frameworks/CONSISTENCY/TypeInferenceConsistency.expected new file mode 100644 index 00000000000..08edbe8c612 --- /dev/null +++ b/rust/ql/test/library-tests/dataflow/sources/web_frameworks/CONSISTENCY/TypeInferenceConsistency.expected @@ -0,0 +1,4 @@ +nonUniqueCertainType +| test.rs:139:30:139:39 | ...::get(...) | | +| test.rs:140:34:140:43 | ...::get(...) | | +| test.rs:141:30:141:39 | ...::get(...) | |