ROX-31266: Implement tests with valid and invalid utf 8 strings#251
Open
JoukoVirtanen wants to merge 9 commits intomainfrom
Open
ROX-31266: Implement tests with valid and invalid utf 8 strings#251JoukoVirtanen wants to merge 9 commits intomainfrom
JoukoVirtanen wants to merge 9 commits intomainfrom
Conversation
Molter73
reviewed
Feb 6, 2026
Contributor
Molter73
left a comment
There was a problem hiding this comment.
I still need to go through the rust unit tests, my first impression is that they are quite convoluted for testing some functions that are relatively simple and straightforward. The integration tests provide a lot more value because they are testing not just those functions but also the BPF programs and the rest of the userspace logic, I would focus on those.
tests/test_file_open.py
Outdated
| ['0.txt', '1.txt', '2.txt'], | ||
| ['café.txt', 'файл.txt', '测试.txt'], | ||
| ]) | ||
| def test_multiple(fact, monitored_dir, server, filenames): |
Contributor
There was a problem hiding this comment.
I don't know if there is much value in this change. This test is checking that multiple events are captured, so the actual paths used are not that important. Maybe we want to rollback this part?
…s replaced when comparing to the result
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Parameterized the filename in the existing
test_openandtest_multipletests. The input file names include regular ASCII, accents, Cyrillic, Chinese, and emoji.Unit tests were also added for
slice_to_string,sanitize_d_path, and creation of processes with valid ASCII, Cyrillic, Chinese, Japanese, Arabic, emoji, and invalid UTF-8.Checklist
Automated testing
If any of these don't apply, please comment below.
Testing Performed
CI is sufficient