Skip to content

Conversation

@nokute78
Copy link
Contributor

This patch is to

  • Add test code for flb_uri
  • Prevent passing negative pos

Enter [N/A] in the box, if an item is not applicable to your change.

Testing
Before we can approve your change; please submit the following in a comment:

  • [N/A] Example configuration file for the change
  • Debug log output from testing the change
  • Attached Valgrind output that shows no leaks or memory corruption was found

If this is a change to packaging of containers or native binaries then please confirm it works for all targets.

  • [N/A] Run local packaging test showing all targets (including any new ones) build.
  • [N/A] Set ok-package-test label to test for all targets (requires maintainer to do).

Documentation

  • [N/A] Documentation required for this feature

Backporting

  • [N/A] Backport to latest stable release.

Debug/Valgrind output

d$ valgrind --leak-check=full bin/flb-it-uri 
==28059== Memcheck, a memory error detector
==28059== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==28059== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==28059== Command: bin/flb-it-uri
==28059== 
Test uri_create_destroy...                      [ OK ]
==28060== Warning: invalid file descriptor -1 in syscall close()
==28060== 
==28060== HEAP SUMMARY:
==28060==     in use at exit: 0 bytes in 0 blocks
==28060==   total heap usage: 850 allocs, 850 frees, 87,507 bytes allocated
==28060== 
==28060== All heap blocks were freed -- no leaks are possible
==28060== 
==28060== For lists of detected and suppressed errors, rerun with: -s
==28060== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Test uri_get...                                 [ OK ]
==28061== Warning: invalid file descriptor -1 in syscall close()
==28061== 
==28061== HEAP SUMMARY:
==28061==     in use at exit: 0 bytes in 0 blocks
==28061==   total heap usage: 850 allocs, 850 frees, 87,507 bytes allocated
==28061== 
==28061== All heap blocks were freed -- no leaks are possible
==28061== 
==28061== For lists of detected and suppressed errors, rerun with: -s
==28061== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Test uri_encode...                              [ OK ]
==28062== Warning: invalid file descriptor -1 in syscall close()
==28062== 
==28062== HEAP SUMMARY:
==28062==     in use at exit: 0 bytes in 0 blocks
==28062==   total heap usage: 847 allocs, 847 frees, 87,340 bytes allocated
==28062== 
==28062== All heap blocks were freed -- no leaks are possible
==28062== 
==28062== For lists of detected and suppressed errors, rerun with: -s
==28062== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
SUCCESS: All unit tests have passed.
==28059== 
==28059== HEAP SUMMARY:
==28059==     in use at exit: 0 bytes in 0 blocks
==28059==   total heap usage: 3 allocs, 3 frees, 1,109 bytes allocated
==28059== 
==28059== All heap blocks were freed -- no leaks are possible
==28059== 
==28059== For lists of detected and suppressed errors, rerun with: -s
==28059== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)


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.

Signed-off-by: Takahiro Yamashita <[email protected]>
Signed-off-by: Takahiro Yamashita <[email protected]>
@nokute78 nokute78 temporarily deployed to pr September 17, 2023 00:40 — with GitHub Actions Inactive
@nokute78 nokute78 temporarily deployed to pr September 17, 2023 00:40 — with GitHub Actions Inactive
@nokute78 nokute78 temporarily deployed to pr September 17, 2023 00:40 — with GitHub Actions Inactive
@nokute78 nokute78 temporarily deployed to pr September 17, 2023 01:06 — with GitHub Actions Inactive
@edsiper edsiper merged commit 4b01f07 into fluent:master Sep 21, 2023
@nokute78 nokute78 deleted the test_uri branch September 22, 2023 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants