This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.
Jacob Erlbeck jerlbeck at sysmocom.deHi
On 20.01.2014 08:18, Holger Hans Peter Freyther wrote:
> On Thu, Jan 16, 2014 at 04:50:40PM +0100, Jacob Erlbeck wrote:
>>> + /* Check that LOOPBACK enables all output */
>> + OSMO_ASSERT((MGCP_CONN_LOOPBACK & MGCP_CONN_RECV_SEND) ==
>> + MGCP_CONN_RECV_SEND)
>
> I think osmo_static_assert would work here too?
Yes, it would.
>
>> - if (endp->conn_mode != -1)
>> + if ((endp->conn_mode & CONN_UNMODIFIED) == 0)
>> printf("Connection mode: %d, "
>> "BTS output %sabled, NET output %sabled\n",
>> endp->conn_mode,
>
> In the next step we could change the test output to illustrate the
> tri-state from on/off and not modified to previous test?
Ok, I'd print the output_enabled values to stderr then.
>
>> + endp->conn_mode = MGCP_CONN_NONE | CONN_UNMODIFIED;
>> + endp->net_end.output_enabled = 0;
>> + endp->bts_end.output_enabled = 0;
>
> do we still need these flags? Or only because of the above printf?
Yes, we do. Since conn_mode (the SEND_RECV bits) is modified, the
output_enabled must be adjusted, so that the invariant holds (this is
the central topic of this patch). I didn't want to have a modified
behaviour of the test, since this ought to be a semantic-neutral
modification (ideally with a unmodified ok file). See the next patch
"mgcp/test: Don't reset conn_mode between messages", that addresses this
issue.
Jacob
>
>