summaryrefslogtreecommitdiffstats
path: root/tests/lapd/lapd_test.c
Commit message (Collapse)AuthorAgeFilesLines
* lapd: Check in rslms_rx_rll() if lapdm context was initialized earlierDaniel Willmann2012-12-261-0/+43
| | | | | | | | | | | | | | | | | | This was found while implementing handover on a sysmobts. When we receive a channel release request for a channel that was never really activated (set_lapdm_context() was not called) we segfault in lapd_recv_dlsap(). We now return early with -EINVAL in rslms_rx_rll() if we receive a message that assumes set_lapdm_context() was already called. These are: * RSL_MT_UNIT_DATA_REQ * RSL_MT_DATA_REQ * RSL_MT_SUSP_REQ * RSL_MT_REL_REQ A test case was added to trigger the issue.
* lapdm: Make sure that the msgb_l3len(msg) == length...Holger Hans Peter Freyther2012-01-121-7/+11
| | | | | | | | | | This code should not play with the internals of the msgb like this, this code got introduced in af48bed55607931307 and is breaking the osmo-bts usecase of forwarding an RSL message. Add a test case that fails without the new code. I would prefer if we could get rid of the manipulating the msgb like this, it is prone to errors like this one.
* lapd: Warn if someone attempts to send an empty messageHolger Hans Peter Freyther2012-01-121-0/+15
| | | | | | DATA REQ with a msgb_l3len(msg) == 0 message does not make any sense, log an error and return immediately before attempting to send an empty I frame in lapd_send_i.
* lapd: Disable one part of the test as it fails on FreeBSDHolger Hans Peter Freyther2011-12-121-1/+2
| | | | | I thought this number would be wrong in the same way but it depends on OS/ARCH. Disable this part of the test for now.
* lapd_test: Look at the content of LAPD messages and compare themHolger Hans Peter Freyther2011-12-121-16/+57
| | | | Verify the output, accept two known errors in the generation of it.
* lapdm: Create a simple test case to transmit data between both endsHolger Hans Peter Freyther2011-12-111-0/+258
This is testing the establishment of two ends (BTS, MS) one is in the polling mode as used by osmo-bts. Transfer data between the two ends. The sent data is not verified though. This should be followed up soon.