Skip to content
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

msgpack: add utilities for msgpack #8428

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nokute78
Copy link
Collaborator

This patch is to add utilities for msgapck.

  • flb_msgpack_cmp_str/sds/msgpack_str
    • To check if input str/sds/msgpack_str and msgpack object are the same string.
  • flb_msgpack_get_value_from_(nested)map
    • To get a value object from (nested) map. It is similar to record accessor but this API is simple.

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

$ valgrind --leak-check=full bin/flb-it-msgpack
==85010== Memcheck, a memory error detector
==85010== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==85010== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==85010== Command: bin/flb-it-msgpack
==85010== 
Test flb_msgpack_cmp_str_len...                 [ OK ]
==85010== Warning: invalid file descriptor -1 in syscall close()
Test flb_msgpack_cmp_str...                     [ OK ]
==85010== Warning: invalid file descriptor -1 in syscall close()
Test flb_msgpack_cmp_sds...                     [ OK ]
==85010== Warning: invalid file descriptor -1 in syscall close()
Test flb_msgpack_cmp_msgpack_str...             [ OK ]
==85010== Warning: invalid file descriptor -1 in syscall close()
Test flb_msgpack_get_value_from_map...          [ OK ]
==85010== Warning: invalid file descriptor -1 in syscall close()
Test flb_msgpack_get_value_from_nested_map...   [ OK ]
==85010== Warning: invalid file descriptor -1 in syscall close()
SUCCESS: All unit tests have passed.
==85010== 
==85010== HEAP SUMMARY:
==85010==     in use at exit: 0 bytes in 0 blocks
==85010==   total heap usage: 5,174 allocs, 5,174 frees, 1,068,198 bytes allocated
==85010== 
==85010== All heap blocks were freed -- no leaks are possible
==85010== 
==85010== For lists of detected and suppressed errors, rerun with: -s
==85010== 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.

Copy link
Contributor

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label May 13, 2024
@github-actions github-actions bot removed the Stale label Aug 16, 2024
Copy link
Contributor

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Dec 14, 2024
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.

1 participant