Skip to content

Rust: Split up the dataflow/sources test - #20673

Merged
geoffw0 merged 18 commits into
github:mainfrom
geoffw0:sourcestest
Oct 23, 2025
Merged

Rust: Split up the dataflow/sources test#20673
geoffw0 merged 18 commits into
github:mainfrom
geoffw0:sourcestest

Conversation

@geoffw0

Copy link
Copy Markdown
Contributor

Split up the dataflow/sources test. It had become quite large, with lots of dependencies, which was making it slow to work with locally.

@geoffw0geoffw0 added the no-change-note-required This PR does not need a change note label Oct 22, 2025
@geoffw0
geoffw0 requested a review from a team as a code ownerOctober 22, 2025 12:59
CopilotAI review requested due to automatic review settings October 22, 2025 12:59
@geoffw0geoffw0 added the Rust Pull requests that update Rust code label Oct 22, 2025

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR reorganizes the dataflow/sources test suite by splitting a large monolithic test into smaller, more focused test suites organized by source type. This improves local development workflow by reducing dependencies and compilation times.

Key changes:

  • Split the original dataflow/sources test into multiple focused test directories
  • Created separate test suites for: web frameworks, stdin, networking, file I/O, environment variables, and database sources
  • Maintained test coverage while improving modularity

Reviewed Changes

Copilot reviewed 44 out of 54 changed files in this pull request and generated no comments.

Show a summary per file
FileDescription
web_frameworks/test.rs(Implied) Test cases for web framework data sources
web_frameworks/*.qlrefQuery references for web framework taint source tests
web_frameworks/*.expectedExpected test results for web framework sources
stdin/test.rsTest cases for standard input data sources
stdin/*.qlrefQuery references for stdin taint source tests
stdin/*.expectedExpected test results for stdin sources
net/test.rsTest cases for network-related data sources (HTTP, TCP)
net/options.ymlReduced dependency list, removed web framework dependencies
net/*.qlrefQuery references for network taint source tests
net/*.expectedExpected test results for network sources
file/test.rsTest cases for file system data sources
file/options.ymlDependencies for file I/O tests
file/*.qlrefQuery references for file taint source tests
env/test.rsTest cases for environment variable and command-line argument sources
env/options.ymlMinimal dependencies for environment tests
env/*.qlrefQuery references for environment taint source tests
database/test.rsTest cases for database query result sources
database/options.ymlDependencies for MySQL database tests
database/*.qlrefQuery references for database taint source tests
test.rs(Deleted) Original monolithic test file
test_futures_io.rs(Deleted) Moved to net directory
reqwest.rs(Deleted) Stub file removed

Comment threadrust/ql/test/library-tests/dataflow/sources/database/InlineFlow.qlref Dismissed
Comment threadrust/ql/test/library-tests/dataflow/sources/file/InlineFlow.qlref Dismissed
Comment threadrust/ql/test/library-tests/dataflow/sources/net/InlineFlow.qlref Dismissed
Comment threadrust/ql/test/library-tests/dataflow/sources/stdin/InlineFlow.qlref Dismissed
Comment threadrust/ql/test/library-tests/dataflow/sources/web_frameworks/InlineFlow.qlref Dismissed
@hvitved

Copy link
Copy Markdown
Contributor

Can we please wait until #20282 is merged? I have already had to rebase that PR multiple times because of exactly this test.

@geoffw0

Copy link
Copy Markdown
ContributorAuthor

Can we please wait until #20282 is merged?

Yes, if we get that merged soon. Fixing merge conflicts here is going to be a bit of a pain, I tried to pick a quiet time for it.

@hvitved

Copy link
Copy Markdown
Contributor

Yes, if we get that merged soon.

Has now been merged.

@geoffw0

Copy link
Copy Markdown
ContributorAuthor

I've merged in main (with #20282). Had to do a bit of manual fixup. There had been two results lost in this PR (I hypothesised because of something about their context changing), we get them back now! :)

I would appreciate review and approval of this work as soon as possible, assuming there are no big objections. Otherwise difficult merge conflicts are going to keep happening due to the nature of this change.

@paldepindpaldepind left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this 👍

@geoffw0
geoffw0 merged commit 7acd214 into github:mainOct 23, 2025
16 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-change-note-requiredThis PR does not need a change noteRustPull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@geoffw0@hvitved@paldepind@github-advanced-security