-
Notifications
You must be signed in to change notification settings - Fork 1.9k
tests: internal: input_chunk_routes: Windows support #11384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
📝 WalkthroughWalkthroughSwitch tests from hard-coded /tmp paths to environment-aware temporary directories by adding tempdir helper functions, including the helper in internal test headers, and propagating dynamic path allocation, NULL checks, and frees through multiple input-chunk tests and their setup/teardown. (30 words) Changes
Sequence Diagram(s)(omitted) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cfa533bbda
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@tests/internal/input_chunk_routes.c`:
- Around line 338-356: The env_tmpdir function currently checks TMPDIR then TMP
and falls back to "/tmp", which fails on Windows when TEMP is set but TMP is
not; update env_tmpdir to also check getenv("TEMP") before the fallback and on
Windows use a Windows-appropriate fallback (either call
GetTempPathA()/GetTempPathW when available or use "C:\\Temp") instead of "/tmp",
returning the result via flb_strdup to match existing allocation behavior.
🧹 Nitpick comments (1)
tests/internal/input_chunk_routes.c (1)
20-21: Remove duplicateflb_mem.hinclude.
<fluent-bit/flb_mem.h>is already included at Line 10, so the Line 20 include is redundant.♻️ Suggested cleanup
-#include <fluent-bit/flb_mem.h> `#include` <fluent-bit/flb_str.h>
cfa533b to
4a292d3
Compare
4a292d3 to
4cfe096
Compare
4cfe096 to
1cf5c24
Compare
1cf5c24 to
49ede29
Compare
Signed-off-by: Marat Abrarov <[email protected]>
…ry dir Signed-off-by: Marat Abrarov <[email protected]>
49ede29 to
d258f38
Compare
Support of Windows in flb-it-input_chunk_routes tests (introduced in #11097).
Testing
TEST_PRESET=valgrind SKIP_TESTS='flb-rt-out_td flb-it-network' ./run_code_analysis.shok-package-testlabel to test for all targets (requires maintainer to do).Documentation
Backporting
Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.