Change in libosmocore[master]: tests/stats: enable logging in test output

osmith gerrit-no-reply at lists.osmocom.org
Wed Mar 17 15:32:27 UTC 2021


osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/23389 )


Change subject: tests/stats: enable logging in test output
......................................................................

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
---
M tests/stats/stats_test.c
A tests/stats/stats_test.err
M tests/stats/stats_test.ok
M tests/testsuite.at
4 files changed, 177 insertions(+), 163 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/89/23389/1

diff --git a/tests/stats/stats_test.c b/tests/stats/stats_test.c
index 05caf98..707f606 100644
--- a/tests/stats/stats_test.c
+++ b/tests/stats/stats_test.c
@@ -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 @@
 {
 	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 @@
 	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_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 @@
 
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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;
 }
diff --git a/tests/stats/stats_test.err b/tests/stats/stats_test.err
new file mode 100644
index 0000000..3accf54
--- /dev/null
+++ b/tests/stats/stats_test.err
@@ -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
diff --git a/tests/stats/stats_test.ok b/tests/stats/stats_test.ok
index 26d9e38..e69de29 100644
--- a/tests/stats/stats_test.ok
+++ b/tests/stats/stats_test.ok
@@ -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
diff --git a/tests/testsuite.at b/tests/testsuite.at
index d2a10dd..cb84229 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -249,7 +249,8 @@
 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])

-- 
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/23389
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ie0eaec2f93ac6859397a6bfca45039fdcc27cb9e
Gerrit-Change-Number: 23389
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210317/115d28a4/attachment.htm>


More information about the gerrit-log mailing list