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

tests/runtime/in_podman_metrics: refactor iteration of counters to use cfl_list from #8844. #8888

Merged
merged 1 commit into from
May 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions tests/runtime/in_podman_metrics.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
#define DPATH_PODMAN_CGROUP_V2 FLB_TESTS_DATA_PATH "/data/podman/cgroupv2"


int check_metric(flb_ctx_t *ctx, flb_sds_t *name) {
int check_metric(flb_ctx_t *ctx, char *name) {
struct mk_list *tmp;
struct mk_list *head;
struct mk_list *inner_tmp;
struct mk_list *inner_head;
struct cfl_list *inner_tmp;
struct cfl_list *inner_head;

struct flb_input_instance *i_ins;
struct cmt_counter *counter;
Expand All @@ -43,8 +43,8 @@ int check_metric(flb_ctx_t *ctx, flb_sds_t *name) {

mk_list_foreach_safe(head, tmp, &ctx->config->inputs) {
i_ins = mk_list_entry(head, struct flb_input_instance, _head);
mk_list_foreach_safe(inner_head, inner_tmp, &i_ins->cmt->counters) {
counter = mk_list_entry(inner_head, struct cmt_counter, _head);
cfl_list_foreach_safe(inner_head, inner_tmp, &i_ins->cmt->counters) {
counter = cfl_list_entry(inner_head, struct cmt_counter, _head);

if (strlen(name) != 0 && strcmp(name, counter->opts.name) == 0)
{
Expand Down
Loading