mirror of https://gerrit.osmocom.org/libosmocore
tests/stats: enable logging in test output
Move test output from stdout to stderr and enable logging to stderr. This is in preparation for the next patch, which will add a new log message when osmo_stat_item_get_next() skips a value. Related: SYS#4877 Change-Id: Ie0eaec2f93ac6859397a6bfca45039fdcc27cb9e
This commit is contained in:
parent
9e37bf4bbc
commit
d89d35e933
|
@ -368,7 +368,8 @@ EXTRA_DIST = testsuite.at $(srcdir)/package.m4 $(TESTSUITE) \
|
|||
vty/ok_tabs.cfg \
|
||||
vty/ok_deprecated_logging.cfg \
|
||||
comp128/comp128_test.ok bits/bitfield_test.ok \
|
||||
utils/utils_test.ok utils/utils_test.err stats/stats_test.ok \
|
||||
utils/utils_test.ok utils/utils_test.err \
|
||||
stats/stats_test.ok stats/stats_test.err \
|
||||
bitvec/bitvec_test.ok msgb/msgb_test.ok bits/bitcomp_test.ok \
|
||||
sim/sim_test.ok tlv/tlv_test.ok abis/abis_test.ok \
|
||||
gsup/gsup_test.ok gsup/gsup_test.err \
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include <osmocom/core/application.h>
|
||||
#include <osmocom/core/logging.h>
|
||||
#include <osmocom/core/utils.h>
|
||||
#include <osmocom/core/stat_item.h>
|
||||
|
@ -271,7 +272,7 @@ static int stats_reporter_test_send_counter(struct osmo_stats_reporter *srep,
|
|||
{
|
||||
const char *group_name = ctrg ? ctrg->desc->group_name_prefix : "";
|
||||
|
||||
printf(" %s: counter p=%s g=%s i=%u n=%s v=%lld d=%lld\n",
|
||||
fprintf(stderr, " %s: counter p=%s g=%s i=%u n=%s v=%lld d=%lld\n",
|
||||
srep->name,
|
||||
srep->name_prefix ? srep->name_prefix : "",
|
||||
group_name, ctrg ? ctrg->idx : 0,
|
||||
|
@ -285,7 +286,7 @@ static int stats_reporter_test_send_item(struct osmo_stats_reporter *srep,
|
|||
const struct osmo_stat_item_group *statg,
|
||||
const struct osmo_stat_item_desc *desc, int64_t value)
|
||||
{
|
||||
printf(" %s: item p=%s g=%s i=%u n=%s v=%"PRId64" u=%s\n",
|
||||
fprintf(stderr, " %s: item p=%s g=%s i=%u n=%s v=%"PRId64" u=%s\n",
|
||||
srep->name,
|
||||
srep->name_prefix ? srep->name_prefix : "",
|
||||
statg->desc->group_name_prefix, statg->idx,
|
||||
|
@ -297,13 +298,13 @@ static int stats_reporter_test_send_item(struct osmo_stats_reporter *srep,
|
|||
|
||||
static int stats_reporter_test_open(struct osmo_stats_reporter *srep)
|
||||
{
|
||||
printf(" %s: open\n", srep->name);
|
||||
fprintf(stderr, " %s: open\n", srep->name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int stats_reporter_test_close(struct osmo_stats_reporter *srep)
|
||||
{
|
||||
printf(" %s: close\n", srep->name);
|
||||
fprintf(stderr, " %s: close\n", srep->name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -332,7 +333,7 @@ static void test_reporting()
|
|||
|
||||
int rc;
|
||||
|
||||
printf("Start test: %s\n", __func__);
|
||||
fprintf(stderr, "Start test: %s\n", __func__);
|
||||
|
||||
/* Allocate counters and items */
|
||||
statg1 = osmo_stat_item_group_alloc(stats_ctx, &statg_desc, 1);
|
||||
|
@ -374,12 +375,12 @@ static void test_reporting()
|
|||
rc = osmo_stats_reporter_set_max_class(srep2, OSMO_STATS_CLASS_SUBSCRIBER);
|
||||
OSMO_ASSERT(rc >= 0);
|
||||
|
||||
printf("report (initial):\n");
|
||||
fprintf(stderr, "report (initial):\n");
|
||||
send_count = 0;
|
||||
osmo_stats_report();
|
||||
OSMO_ASSERT(send_count == 20);
|
||||
|
||||
printf("report (srep1 global):\n");
|
||||
fprintf(stderr, "report (srep1 global):\n");
|
||||
/* force single flush */
|
||||
osmo_stats_reporter_set_max_class(srep1, OSMO_STATS_CLASS_GLOBAL);
|
||||
srep1->force_single_flush = 1;
|
||||
|
@ -388,7 +389,7 @@ static void test_reporting()
|
|||
osmo_stats_report();
|
||||
OSMO_ASSERT(send_count == 10);
|
||||
|
||||
printf("report (srep1 peer):\n");
|
||||
fprintf(stderr, "report (srep1 peer):\n");
|
||||
/* force single flush */
|
||||
osmo_stats_reporter_set_max_class(srep1, OSMO_STATS_CLASS_PEER);
|
||||
srep1->force_single_flush = 1;
|
||||
|
@ -397,7 +398,7 @@ static void test_reporting()
|
|||
osmo_stats_report();
|
||||
OSMO_ASSERT(send_count == 14);
|
||||
|
||||
printf("report (srep1 subscriber):\n");
|
||||
fprintf(stderr, "report (srep1 subscriber):\n");
|
||||
/* force single flush */
|
||||
osmo_stats_reporter_set_max_class(srep1, OSMO_STATS_CLASS_SUBSCRIBER);
|
||||
srep1->force_single_flush = 1;
|
||||
|
@ -406,7 +407,7 @@ static void test_reporting()
|
|||
osmo_stats_report();
|
||||
OSMO_ASSERT(send_count == 20);
|
||||
|
||||
printf("report (srep2 disabled):\n");
|
||||
fprintf(stderr, "report (srep2 disabled):\n");
|
||||
/* force single flush */
|
||||
srep1->force_single_flush = 1;
|
||||
srep2->force_single_flush = 1;
|
||||
|
@ -416,45 +417,45 @@ static void test_reporting()
|
|||
osmo_stats_report();
|
||||
OSMO_ASSERT(send_count == 10);
|
||||
|
||||
printf("report (srep2 enabled, no flush forced):\n");
|
||||
fprintf(stderr, "report (srep2 enabled, no flush forced):\n");
|
||||
rc = osmo_stats_reporter_enable(srep2);
|
||||
OSMO_ASSERT(rc >= 0);
|
||||
send_count = 0;
|
||||
osmo_stats_report();
|
||||
OSMO_ASSERT(send_count == 10);
|
||||
|
||||
printf("report (should be empty):\n");
|
||||
fprintf(stderr, "report (should be empty):\n");
|
||||
send_count = 0;
|
||||
osmo_stats_report();
|
||||
OSMO_ASSERT(send_count == 0);
|
||||
|
||||
printf("report (group 1, counter 1 update):\n");
|
||||
fprintf(stderr, "report (group 1, counter 1 update):\n");
|
||||
rate_ctr_inc(&ctrg1->ctr[TEST_A_CTR]);
|
||||
send_count = 0;
|
||||
osmo_stats_report();
|
||||
OSMO_ASSERT(send_count == 2);
|
||||
|
||||
printf("report (group 1, item 1 update):\n");
|
||||
fprintf(stderr, "report (group 1, item 1 update):\n");
|
||||
osmo_stat_item_set(statg1->items[TEST_A_ITEM], 10);
|
||||
send_count = 0;
|
||||
osmo_stats_report();
|
||||
OSMO_ASSERT(send_count == 2);
|
||||
|
||||
printf("report (group 1, item 1 update twice):\n");
|
||||
fprintf(stderr, "report (group 1, item 1 update twice):\n");
|
||||
osmo_stat_item_set(statg1->items[TEST_A_ITEM], 10);
|
||||
osmo_stat_item_set(statg1->items[TEST_A_ITEM], 10);
|
||||
send_count = 0;
|
||||
osmo_stats_report();
|
||||
OSMO_ASSERT(send_count == 2);
|
||||
|
||||
printf("report (group 1, item 1 update twice, check max):\n");
|
||||
fprintf(stderr, "report (group 1, item 1 update twice, check max):\n");
|
||||
osmo_stat_item_set(statg1->items[TEST_A_ITEM], 20);
|
||||
osmo_stat_item_set(statg1->items[TEST_A_ITEM], 10);
|
||||
send_count = 0;
|
||||
osmo_stats_report();
|
||||
OSMO_ASSERT(send_count == 2);
|
||||
|
||||
printf("report (remove statg1, ctrg1):\n");
|
||||
fprintf(stderr, "report (remove statg1, ctrg1):\n");
|
||||
/* force single flush */
|
||||
srep1->force_single_flush = 1;
|
||||
srep2->force_single_flush = 1;
|
||||
|
@ -464,7 +465,7 @@ static void test_reporting()
|
|||
osmo_stats_report();
|
||||
OSMO_ASSERT(send_count == 12);
|
||||
|
||||
printf("report (remove srep1):\n");
|
||||
fprintf(stderr, "report (remove srep1):\n");
|
||||
/* force single flush */
|
||||
srep1->force_single_flush = 1;
|
||||
srep2->force_single_flush = 1;
|
||||
|
@ -473,7 +474,7 @@ static void test_reporting()
|
|||
osmo_stats_report();
|
||||
OSMO_ASSERT(send_count == 6);
|
||||
|
||||
printf("report (remove statg2):\n");
|
||||
fprintf(stderr, "report (remove statg2):\n");
|
||||
/* force single flush */
|
||||
srep2->force_single_flush = 1;
|
||||
osmo_stat_item_group_free(statg2);
|
||||
|
@ -481,7 +482,7 @@ static void test_reporting()
|
|||
osmo_stats_report();
|
||||
OSMO_ASSERT(send_count == 4);
|
||||
|
||||
printf("report (remove srep2):\n");
|
||||
fprintf(stderr, "report (remove srep2):\n");
|
||||
/* force single flush */
|
||||
srep2->force_single_flush = 1;
|
||||
osmo_stats_reporter_free(srep2);
|
||||
|
@ -489,7 +490,7 @@ static void test_reporting()
|
|||
osmo_stats_report();
|
||||
OSMO_ASSERT(send_count == 0);
|
||||
|
||||
printf("report (remove ctrg2, should be empty):\n");
|
||||
fprintf(stderr, "report (remove ctrg2, should be empty):\n");
|
||||
rate_ctr_group_free(ctrg2);
|
||||
send_count = 0;
|
||||
osmo_stats_report();
|
||||
|
@ -501,17 +502,24 @@ static void test_reporting()
|
|||
OSMO_ASSERT(talloc_total_blocks(stats_ctx) == 1);
|
||||
talloc_free(stats_ctx);
|
||||
|
||||
printf("End test: %s\n", __func__);
|
||||
fprintf(stderr, "End test: %s\n", __func__);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
static const struct log_info log_info = {};
|
||||
log_init(&log_info, NULL);
|
||||
void *ctx = talloc_named_const(NULL, 0, "main");
|
||||
osmo_init_logging2(ctx, NULL);
|
||||
|
||||
log_set_print_filename2(osmo_stderr_target, LOG_FILENAME_NONE);
|
||||
log_set_print_level(osmo_stderr_target, 1);
|
||||
log_set_print_category(osmo_stderr_target, 1);
|
||||
log_set_print_category_hex(osmo_stderr_target, 0);
|
||||
log_set_use_color(osmo_stderr_target, 0);
|
||||
|
||||
osmo_stat_item_init(NULL);
|
||||
|
||||
stat_test();
|
||||
test_reporting();
|
||||
talloc_free(ctx);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,143 @@
|
|||
Start test: test_reporting
|
||||
DLGLOBAL ERROR counter group 'ctr-test:one' already exists for index 2, instead using index 3. This is a software bug that needs fixing.
|
||||
DLGLOBAL ERROR 'ctr-test.one_dot' is not a valid counter group identifier
|
||||
DLGLOBAL NOTICE counter group name mangled: 'ctr-test.one_dot' -> 'ctr-test:one_dot'
|
||||
DLGLOBAL NOTICE counter group name mangled: 'ctr.a' -> 'ctr:a'
|
||||
DLGLOBAL NOTICE counter group name mangled: 'ctr.b' -> 'ctr:b'
|
||||
test1: open
|
||||
test2: open
|
||||
report (initial):
|
||||
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:a v=0 d=0
|
||||
test1: counter p= g=ctr-test:one_dot i=3 n=ctr:a v=0 d=0
|
||||
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:b v=0 d=0
|
||||
test1: counter p= g=ctr-test:one_dot i=3 n=ctr:b v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
|
||||
test1: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
|
||||
test1: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=1 n=ctr:a v=0 d=0
|
||||
test1: counter p= g=ctr-test:one i=1 n=ctr:a v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=1 n=ctr:b v=0 d=0
|
||||
test1: counter p= g=ctr-test:one i=1 n=ctr:b v=0 d=0
|
||||
test2: item p= g=test.one i=2 n=item.a v=-1 u=ma
|
||||
test1: item p= g=test.one i=2 n=item.a v=-1 u=ma
|
||||
test2: item p= g=test.one i=2 n=item.b v=-1 u=kb
|
||||
test1: item p= g=test.one i=2 n=item.b v=-1 u=kb
|
||||
test2: item p= g=test.one i=1 n=item.a v=-1 u=ma
|
||||
test1: item p= g=test.one i=1 n=item.a v=-1 u=ma
|
||||
test2: item p= g=test.one i=1 n=item.b v=-1 u=kb
|
||||
test1: item p= g=test.one i=1 n=item.b v=-1 u=kb
|
||||
report (srep1 global):
|
||||
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:a v=0 d=0
|
||||
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:b v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=1 n=ctr:a v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=1 n=ctr:b v=0 d=0
|
||||
test2: item p= g=test.one i=2 n=item.a v=-1 u=ma
|
||||
test2: item p= g=test.one i=2 n=item.b v=-1 u=kb
|
||||
test2: item p= g=test.one i=1 n=item.a v=-1 u=ma
|
||||
test2: item p= g=test.one i=1 n=item.b v=-1 u=kb
|
||||
report (srep1 peer):
|
||||
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:a v=0 d=0
|
||||
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:b v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=1 n=ctr:a v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=1 n=ctr:b v=0 d=0
|
||||
test2: item p= g=test.one i=2 n=item.a v=-1 u=ma
|
||||
test1: item p= g=test.one i=2 n=item.a v=-1 u=ma
|
||||
test2: item p= g=test.one i=2 n=item.b v=-1 u=kb
|
||||
test1: item p= g=test.one i=2 n=item.b v=-1 u=kb
|
||||
test2: item p= g=test.one i=1 n=item.a v=-1 u=ma
|
||||
test1: item p= g=test.one i=1 n=item.a v=-1 u=ma
|
||||
test2: item p= g=test.one i=1 n=item.b v=-1 u=kb
|
||||
test1: item p= g=test.one i=1 n=item.b v=-1 u=kb
|
||||
report (srep1 subscriber):
|
||||
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:a v=0 d=0
|
||||
test1: counter p= g=ctr-test:one_dot i=3 n=ctr:a v=0 d=0
|
||||
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:b v=0 d=0
|
||||
test1: counter p= g=ctr-test:one_dot i=3 n=ctr:b v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
|
||||
test1: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
|
||||
test1: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=1 n=ctr:a v=0 d=0
|
||||
test1: counter p= g=ctr-test:one i=1 n=ctr:a v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=1 n=ctr:b v=0 d=0
|
||||
test1: counter p= g=ctr-test:one i=1 n=ctr:b v=0 d=0
|
||||
test2: item p= g=test.one i=2 n=item.a v=-1 u=ma
|
||||
test1: item p= g=test.one i=2 n=item.a v=-1 u=ma
|
||||
test2: item p= g=test.one i=2 n=item.b v=-1 u=kb
|
||||
test1: item p= g=test.one i=2 n=item.b v=-1 u=kb
|
||||
test2: item p= g=test.one i=1 n=item.a v=-1 u=ma
|
||||
test1: item p= g=test.one i=1 n=item.a v=-1 u=ma
|
||||
test2: item p= g=test.one i=1 n=item.b v=-1 u=kb
|
||||
test1: item p= g=test.one i=1 n=item.b v=-1 u=kb
|
||||
report (srep2 disabled):
|
||||
test2: close
|
||||
test1: counter p= g=ctr-test:one_dot i=3 n=ctr:a v=0 d=0
|
||||
test1: counter p= g=ctr-test:one_dot i=3 n=ctr:b v=0 d=0
|
||||
test1: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
|
||||
test1: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
|
||||
test1: counter p= g=ctr-test:one i=1 n=ctr:a v=0 d=0
|
||||
test1: counter p= g=ctr-test:one i=1 n=ctr:b v=0 d=0
|
||||
test1: item p= g=test.one i=2 n=item.a v=-1 u=ma
|
||||
test1: item p= g=test.one i=2 n=item.b v=-1 u=kb
|
||||
test1: item p= g=test.one i=1 n=item.a v=-1 u=ma
|
||||
test1: item p= g=test.one i=1 n=item.b v=-1 u=kb
|
||||
report (srep2 enabled, no flush forced):
|
||||
test2: open
|
||||
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:a v=0 d=0
|
||||
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:b v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=1 n=ctr:a v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=1 n=ctr:b v=0 d=0
|
||||
test2: item p= g=test.one i=2 n=item.a v=-1 u=ma
|
||||
test2: item p= g=test.one i=2 n=item.b v=-1 u=kb
|
||||
test2: item p= g=test.one i=1 n=item.a v=-1 u=ma
|
||||
test2: item p= g=test.one i=1 n=item.b v=-1 u=kb
|
||||
report (should be empty):
|
||||
report (group 1, counter 1 update):
|
||||
test2: counter p= g=ctr-test:one i=1 n=ctr:a v=1 d=1
|
||||
test1: counter p= g=ctr-test:one i=1 n=ctr:a v=1 d=1
|
||||
report (group 1, item 1 update):
|
||||
test2: item p= g=test.one i=1 n=item.a v=10 u=ma
|
||||
test1: item p= g=test.one i=1 n=item.a v=10 u=ma
|
||||
report (group 1, item 1 update twice):
|
||||
test2: item p= g=test.one i=1 n=item.a v=10 u=ma
|
||||
test1: item p= g=test.one i=1 n=item.a v=10 u=ma
|
||||
report (group 1, item 1 update twice, check max):
|
||||
test2: item p= g=test.one i=1 n=item.a v=20 u=ma
|
||||
test1: item p= g=test.one i=1 n=item.a v=20 u=ma
|
||||
report (remove statg1, ctrg1):
|
||||
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:a v=0 d=0
|
||||
test1: counter p= g=ctr-test:one_dot i=3 n=ctr:a v=0 d=0
|
||||
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:b v=0 d=0
|
||||
test1: counter p= g=ctr-test:one_dot i=3 n=ctr:b v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
|
||||
test1: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
|
||||
test1: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
|
||||
test2: item p= g=test.one i=2 n=item.a v=-1 u=ma
|
||||
test1: item p= g=test.one i=2 n=item.a v=-1 u=ma
|
||||
test2: item p= g=test.one i=2 n=item.b v=-1 u=kb
|
||||
test1: item p= g=test.one i=2 n=item.b v=-1 u=kb
|
||||
report (remove srep1):
|
||||
test1: close
|
||||
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:a v=0 d=0
|
||||
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:b v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
|
||||
test2: item p= g=test.one i=2 n=item.a v=-1 u=ma
|
||||
test2: item p= g=test.one i=2 n=item.b v=-1 u=kb
|
||||
report (remove statg2):
|
||||
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:a v=0 d=0
|
||||
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:b v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
|
||||
report (remove srep2):
|
||||
test2: close
|
||||
report (remove ctrg2, should be empty):
|
||||
End test: test_reporting
|
|
@ -1,138 +0,0 @@
|
|||
Start test: test_reporting
|
||||
test1: open
|
||||
test2: open
|
||||
report (initial):
|
||||
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:a v=0 d=0
|
||||
test1: counter p= g=ctr-test:one_dot i=3 n=ctr:a v=0 d=0
|
||||
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:b v=0 d=0
|
||||
test1: counter p= g=ctr-test:one_dot i=3 n=ctr:b v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
|
||||
test1: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
|
||||
test1: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=1 n=ctr:a v=0 d=0
|
||||
test1: counter p= g=ctr-test:one i=1 n=ctr:a v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=1 n=ctr:b v=0 d=0
|
||||
test1: counter p= g=ctr-test:one i=1 n=ctr:b v=0 d=0
|
||||
test2: item p= g=test.one i=2 n=item.a v=-1 u=ma
|
||||
test1: item p= g=test.one i=2 n=item.a v=-1 u=ma
|
||||
test2: item p= g=test.one i=2 n=item.b v=-1 u=kb
|
||||
test1: item p= g=test.one i=2 n=item.b v=-1 u=kb
|
||||
test2: item p= g=test.one i=1 n=item.a v=-1 u=ma
|
||||
test1: item p= g=test.one i=1 n=item.a v=-1 u=ma
|
||||
test2: item p= g=test.one i=1 n=item.b v=-1 u=kb
|
||||
test1: item p= g=test.one i=1 n=item.b v=-1 u=kb
|
||||
report (srep1 global):
|
||||
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:a v=0 d=0
|
||||
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:b v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=1 n=ctr:a v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=1 n=ctr:b v=0 d=0
|
||||
test2: item p= g=test.one i=2 n=item.a v=-1 u=ma
|
||||
test2: item p= g=test.one i=2 n=item.b v=-1 u=kb
|
||||
test2: item p= g=test.one i=1 n=item.a v=-1 u=ma
|
||||
test2: item p= g=test.one i=1 n=item.b v=-1 u=kb
|
||||
report (srep1 peer):
|
||||
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:a v=0 d=0
|
||||
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:b v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=1 n=ctr:a v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=1 n=ctr:b v=0 d=0
|
||||
test2: item p= g=test.one i=2 n=item.a v=-1 u=ma
|
||||
test1: item p= g=test.one i=2 n=item.a v=-1 u=ma
|
||||
test2: item p= g=test.one i=2 n=item.b v=-1 u=kb
|
||||
test1: item p= g=test.one i=2 n=item.b v=-1 u=kb
|
||||
test2: item p= g=test.one i=1 n=item.a v=-1 u=ma
|
||||
test1: item p= g=test.one i=1 n=item.a v=-1 u=ma
|
||||
test2: item p= g=test.one i=1 n=item.b v=-1 u=kb
|
||||
test1: item p= g=test.one i=1 n=item.b v=-1 u=kb
|
||||
report (srep1 subscriber):
|
||||
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:a v=0 d=0
|
||||
test1: counter p= g=ctr-test:one_dot i=3 n=ctr:a v=0 d=0
|
||||
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:b v=0 d=0
|
||||
test1: counter p= g=ctr-test:one_dot i=3 n=ctr:b v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
|
||||
test1: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
|
||||
test1: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=1 n=ctr:a v=0 d=0
|
||||
test1: counter p= g=ctr-test:one i=1 n=ctr:a v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=1 n=ctr:b v=0 d=0
|
||||
test1: counter p= g=ctr-test:one i=1 n=ctr:b v=0 d=0
|
||||
test2: item p= g=test.one i=2 n=item.a v=-1 u=ma
|
||||
test1: item p= g=test.one i=2 n=item.a v=-1 u=ma
|
||||
test2: item p= g=test.one i=2 n=item.b v=-1 u=kb
|
||||
test1: item p= g=test.one i=2 n=item.b v=-1 u=kb
|
||||
test2: item p= g=test.one i=1 n=item.a v=-1 u=ma
|
||||
test1: item p= g=test.one i=1 n=item.a v=-1 u=ma
|
||||
test2: item p= g=test.one i=1 n=item.b v=-1 u=kb
|
||||
test1: item p= g=test.one i=1 n=item.b v=-1 u=kb
|
||||
report (srep2 disabled):
|
||||
test2: close
|
||||
test1: counter p= g=ctr-test:one_dot i=3 n=ctr:a v=0 d=0
|
||||
test1: counter p= g=ctr-test:one_dot i=3 n=ctr:b v=0 d=0
|
||||
test1: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
|
||||
test1: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
|
||||
test1: counter p= g=ctr-test:one i=1 n=ctr:a v=0 d=0
|
||||
test1: counter p= g=ctr-test:one i=1 n=ctr:b v=0 d=0
|
||||
test1: item p= g=test.one i=2 n=item.a v=-1 u=ma
|
||||
test1: item p= g=test.one i=2 n=item.b v=-1 u=kb
|
||||
test1: item p= g=test.one i=1 n=item.a v=-1 u=ma
|
||||
test1: item p= g=test.one i=1 n=item.b v=-1 u=kb
|
||||
report (srep2 enabled, no flush forced):
|
||||
test2: open
|
||||
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:a v=0 d=0
|
||||
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:b v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=1 n=ctr:a v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=1 n=ctr:b v=0 d=0
|
||||
test2: item p= g=test.one i=2 n=item.a v=-1 u=ma
|
||||
test2: item p= g=test.one i=2 n=item.b v=-1 u=kb
|
||||
test2: item p= g=test.one i=1 n=item.a v=-1 u=ma
|
||||
test2: item p= g=test.one i=1 n=item.b v=-1 u=kb
|
||||
report (should be empty):
|
||||
report (group 1, counter 1 update):
|
||||
test2: counter p= g=ctr-test:one i=1 n=ctr:a v=1 d=1
|
||||
test1: counter p= g=ctr-test:one i=1 n=ctr:a v=1 d=1
|
||||
report (group 1, item 1 update):
|
||||
test2: item p= g=test.one i=1 n=item.a v=10 u=ma
|
||||
test1: item p= g=test.one i=1 n=item.a v=10 u=ma
|
||||
report (group 1, item 1 update twice):
|
||||
test2: item p= g=test.one i=1 n=item.a v=10 u=ma
|
||||
test1: item p= g=test.one i=1 n=item.a v=10 u=ma
|
||||
report (group 1, item 1 update twice, check max):
|
||||
test2: item p= g=test.one i=1 n=item.a v=20 u=ma
|
||||
test1: item p= g=test.one i=1 n=item.a v=20 u=ma
|
||||
report (remove statg1, ctrg1):
|
||||
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:a v=0 d=0
|
||||
test1: counter p= g=ctr-test:one_dot i=3 n=ctr:a v=0 d=0
|
||||
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:b v=0 d=0
|
||||
test1: counter p= g=ctr-test:one_dot i=3 n=ctr:b v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
|
||||
test1: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
|
||||
test1: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
|
||||
test2: item p= g=test.one i=2 n=item.a v=-1 u=ma
|
||||
test1: item p= g=test.one i=2 n=item.a v=-1 u=ma
|
||||
test2: item p= g=test.one i=2 n=item.b v=-1 u=kb
|
||||
test1: item p= g=test.one i=2 n=item.b v=-1 u=kb
|
||||
report (remove srep1):
|
||||
test1: close
|
||||
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:a v=0 d=0
|
||||
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:b v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
|
||||
test2: item p= g=test.one i=2 n=item.a v=-1 u=ma
|
||||
test2: item p= g=test.one i=2 n=item.b v=-1 u=kb
|
||||
report (remove statg2):
|
||||
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:a v=0 d=0
|
||||
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:b v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
|
||||
test2: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
|
||||
report (remove srep2):
|
||||
test2: close
|
||||
report (remove ctrg2, should be empty):
|
||||
End test: test_reporting
|
|
@ -249,7 +249,8 @@ AT_CLEANUP
|
|||
AT_SETUP([stats])
|
||||
AT_KEYWORDS([stats])
|
||||
cat $abs_srcdir/stats/stats_test.ok > expout
|
||||
AT_CHECK([$abs_top_builddir/tests/stats/stats_test], [0], [expout], [ignore])
|
||||
cat $abs_srcdir/stats/stats_test.err > experr
|
||||
AT_CHECK([$abs_top_builddir/tests/stats/stats_test], [0], [expout], [experr])
|
||||
AT_CLEANUP
|
||||
|
||||
AT_SETUP([write_queue])
|
||||
|
|
Loading…
Reference in New Issue