-
Notifications
You must be signed in to change notification settings - Fork 477
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
Kaa 773 log delivery callbacks #441
Kaa 773 log delivery callbacks #441
Conversation
Now it is possible to setup per-test fixture based on group in which it included.
In order to support per-test setup()/teardown() procedures
Test structure improved as well
typedef struct | ||
{ | ||
uint16_t log_bucket_id; /**< ID of bucket present in storage. */ | ||
kaa_time_t timeout; /**< bucket timeout */ |
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.
move timeout to start to avoid padding
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.
Done
Patch contains fixes for warnings from tests and API usage in various places as well.
Tests are included
|
||
|
||
#define KAA_MAX_LOGS_IN_BUCKET 64 | ||
#define KAA_MAX_BUCKET_SIZE 1024 |
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.
Please, check whether KAA_MAX_BUCKET_SIZE doesn't exceed the size of a OUT transport buffer.
See defaults.h
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.
Done.
|
||
/* Logging constraints */ | ||
#define MAX_LOG_COUNT SIZE_MAX | ||
#define MAX_LOG_BUCKET_SIZE (2 * 1024) |
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.
Please, check whether KAA_MAX_BUCKET_SIZE doesn't exceed the size of a OUT transport buffer.
See defaults.h
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.
Done.
|
||
if (((timeout_info_t *)data)->log_bucket_id == find_context->bucket_id) { | ||
find_context->bucket_count++; |
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.
You need to return log_count from timeout_info_t instead.
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.
Done
LGTM |
|
||
if (timeout_info->log_bucket_id == timeout_to_find->log_bucket_id) { |
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.
To avoid context state changes, please use kaa_list_find_next() to get the necessary info and kaa_list_remove_at() to remove the element
LGTM |
KAA-773: Log delivery callbacks
Includes: