openbsc[master]: add struct gprs_subscr, separating gprs from gsm_subscriber
gerrit-no-reply at lists.osmocom.org
Wed Feb 22 15:59:09 UTC 2017
Patch Set 8:
Line 290: #define VERBOSE_ASSERT(val, expect_op, fmt) \
> might make sense to have this in libosmocore. like "OSMO_ASSERT_EXPR" or th
If you're talking about an assert that prints the value only in case of failure, it can print to stderr because the program is aborting anyway. We can add that and start using it, I like the idea.
For tests though I particularly like that it prints all expected values unconditionally as the test proceeds -- tremendously clarifies the test log.
Publishing an unconditionally printing assert is difficult because of the printf decision. In some tests, I want to printf to stdout, in others to stderr, sometimes with a bit of indenting ... adding ways to redirect this will just bloat. So far I create a tailored VERBOSE_ASSERT for each test.c, and a general OSMO_ASSERT_EXPR will not replace this.
To view, visit https://gerrit.osmocom.org/1684
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
More information about the gerrit-log