From c15e12c9ff2e1f0d47b1c3488b4f81182bf34c63 Mon Sep 17 00:00:00 2001 From: Simon Friis Vindum Date: Tue, 2 Dec 2025 14:36:29 +0100 Subject: [PATCH] Rust: Accept test changes --- .../elements/builtintypes/BuiltinTypes.expected | 2 +- .../CONSISTENCY/PathResolutionConsistency.expected | 3 +++ .../query-tests/diagnostics/SummaryStatsReduced.expected | 2 +- .../CONSISTENCY/PathResolutionConsistency.expected | 2 -- .../CONSISTENCY/PathResolutionConsistency.expected | 7 ------- .../CONSISTENCY/PathResolutionConsistency.expected | 8 -------- 6 files changed, 5 insertions(+), 19 deletions(-) delete mode 100644 rust/ql/test/query-tests/security/CWE-696/CONSISTENCY/PathResolutionConsistency.expected delete mode 100644 rust/ql/test/query-tests/security/CWE-770/CONSISTENCY/PathResolutionConsistency.expected diff --git a/rust/ql/test/library-tests/elements/builtintypes/BuiltinTypes.expected b/rust/ql/test/library-tests/elements/builtintypes/BuiltinTypes.expected index e08eb561b58..4a67027027b 100644 --- a/rust/ql/test/library-tests/elements/builtintypes/BuiltinTypes.expected +++ b/rust/ql/test/library-tests/elements/builtintypes/BuiltinTypes.expected @@ -1,5 +1,5 @@ | struct Array | | -| struct Ptr | | +| struct PtrConst | | | struct PtrMut | | | struct Ref | | | struct RefMut | | diff --git a/rust/ql/test/library-tests/type-inference/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/type-inference/CONSISTENCY/PathResolutionConsistency.expected index 16db4f5c090..74a86d6a01d 100644 --- a/rust/ql/test/library-tests/type-inference/CONSISTENCY/PathResolutionConsistency.expected +++ b/rust/ql/test/library-tests/type-inference/CONSISTENCY/PathResolutionConsistency.expected @@ -11,3 +11,6 @@ multipleCallTargets | main.rs:2642:13:2642:31 | ...::from(...) | | main.rs:2643:13:2643:31 | ...::from(...) | | main.rs:2644:13:2644:31 | ...::from(...) | +multiplePathResolutions +| main.rs:1818:26:1818:33 | <...> | +| main.rs:1819:17:1819:26 | <...> | diff --git a/rust/ql/test/query-tests/diagnostics/SummaryStatsReduced.expected b/rust/ql/test/query-tests/diagnostics/SummaryStatsReduced.expected index 563e370b4ed..88c16ee7946 100644 --- a/rust/ql/test/query-tests/diagnostics/SummaryStatsReduced.expected +++ b/rust/ql/test/query-tests/diagnostics/SummaryStatsReduced.expected @@ -6,7 +6,7 @@ | Files extracted - without errors % | 57 | | Inconsistencies - AST | 0 | | Inconsistencies - CFG | 0 | -| Inconsistencies - Path resolution | 1 | +| Inconsistencies - Path resolution | 197 | | Inconsistencies - SSA | 0 | | Inconsistencies - data flow | 0 | | Lines of code extracted | 60 | diff --git a/rust/ql/test/query-tests/security/CWE-696/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/query-tests/security/CWE-696/CONSISTENCY/PathResolutionConsistency.expected deleted file mode 100644 index 538ecf9c2e3..00000000000 --- a/rust/ql/test/query-tests/security/CWE-696/CONSISTENCY/PathResolutionConsistency.expected +++ /dev/null @@ -1,2 +0,0 @@ -multipleCallTargets -| test.rs:117:9:117:21 | ptr.is_null() | diff --git a/rust/ql/test/query-tests/security/CWE-770/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/query-tests/security/CWE-770/CONSISTENCY/PathResolutionConsistency.expected deleted file mode 100644 index 1abeb1aeb87..00000000000 --- a/rust/ql/test/query-tests/security/CWE-770/CONSISTENCY/PathResolutionConsistency.expected +++ /dev/null @@ -1,7 +0,0 @@ -multipleCallTargets -| main.rs:242:44:242:78 | ... .cast() | -| main.rs:245:44:245:78 | ... .cast() | -| main.rs:248:44:248:78 | ... .cast() | -| main.rs:251:14:251:48 | ... .cast() | -| main.rs:254:14:254:48 | ... .cast() | -| main.rs:257:14:257:48 | ... .cast() | diff --git a/rust/ql/test/query-tests/security/CWE-825/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/query-tests/security/CWE-825/CONSISTENCY/PathResolutionConsistency.expected index 40e59cf662a..ae227c22e5a 100644 --- a/rust/ql/test/query-tests/security/CWE-825/CONSISTENCY/PathResolutionConsistency.expected +++ b/rust/ql/test/query-tests/security/CWE-825/CONSISTENCY/PathResolutionConsistency.expected @@ -1,12 +1,4 @@ multipleCallTargets -| deallocation.rs:162:5:162:17 | ptr.is_null() | -| deallocation.rs:174:7:174:19 | ptr.is_null() | -| deallocation.rs:186:5:186:17 | ptr.is_null() | -| deallocation.rs:190:5:190:17 | ptr.is_null() | -| deallocation.rs:194:6:194:18 | ptr.is_null() | -| deallocation.rs:202:5:202:17 | ptr.is_null() | -| deallocation.rs:210:25:210:37 | ptr.is_null() | -| deallocation.rs:225:5:225:23 | const_ptr.is_null() | | deallocation.rs:354:11:354:29 | ...::from(...) | | deallocation.rs:355:11:355:29 | ...::from(...) | | lifetime.rs:610:13:610:31 | ...::from(...) |