summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* make lapd_test compile again.Harald Welte2013-07-061-69/+0
| | | | | For whatever reason two functions were present twice in the code, probably some git merge/rebase artefact?
* Add LAPDm collision test (contention resolution on network side)Andreas Eversberg2013-07-061-0/+69
|
* gsm0408: Avoid unaligned memory access in gsm48_generate_mid_from_tmsiHolger Hans Peter Freyther2013-07-032-0/+24
| | | | | | | | The &buf[3] is unlikely to be aligned properly. Use memcpy instead of an assignment. Add a small testcase that verifies that I didn't mess up the conversion. Alignment trap: osmo-nitb (3293) PC=0x492b7094 Instr=0xe5803003 Address=0xbeb259db FSR 0x801
* fr: Fix the linking of the test and use $(LIBRARY_DL) for linkingHolger Hans Peter Freyther2013-06-261-1/+1
| | | | | | | | On Ubuntu 13.04 the build was failing on the OBS with: /usr/bin/ld: fr_test.o: undefined reference to symbol 'dlsym@@GLIBC_2.2.5' /usr/bin/ld: note: 'dlsym@@GLIBC_2.2.5' is defined in DSO /lib/x86_64-linux-gnu/libdl.so.2 so try adding it to the linker command line /lib/x86_64-linux-gnu/libdl.so.2: could not read symbols: Invalid operation collect2: error: ld returned 1 exit status
* lapd: Upate the assert to OSMO_ASSERT and describe what we would like to haveHolger Hans Peter Freyther2013-06-191-2/+2
| | | | | Update the OSMO_ASSERT to what it should be like but can't due a known issue in the LAPDm code.
* lapd: The two known LAPDm issues have been addressed, update the testHolger Hans Peter Freyther2013-06-192-13/+7
| | | | | | | | | The issue about the wrong padding has been found when creating the testcase in commit 15f740caa3a1ef681b3a5564daf6dfccb7b1e489 but the patch to fix that was never proposed by inclusion by its author. The issue about about the establish confirm carrying data with a wrong size is still present.
* Fix: LAPDm contention resoltion must acknowledge subsequent SABMAndreas Eversberg2013-04-062-0/+79
| | | | | | | | | After reception of SABM, the network responds with UA and enters the establised multiframe state. If UA is not received by mobile, the SABM is transmitted again, and the network must respond with UA again, unless it is from a different mobile. Add LAPDm collision test (contention resolution on network side).
* tests: Verify that all tests exit with status=0.Holger Hans Peter Freyther2013-03-251-17/+17
|
* utils: Introduce OSMO_ASSERT in the utils and use it in the unit testsKaterina Barone-Adesi2013-03-093-98/+93
| | | | | The tests should unconditionally assert, regardless of debug settings. This uses the OSMO_ prefix as it's in the global namespace.
* Added a ring buffer log target to store the last N log messages.Katerina Barone-Adesi2013-02-277-2/+336
| | | | | | | The log target can be used via log alarms and show alarms. Why? This feature was proposed/requested at http://openbsc.osmocom.org/trac/wiki/Tasks/ErrorLogTarget All messages use the same amount of space, prioritizing simplicity.
* Revert "Added a ring buffer log target to store the last N log messages."Holger Hans Peter Freyther2013-02-277-336/+2
| | | | | | | I noticed some more issues and it is the easiest to revert and include the fixed version. This reverts commit 73377229bb33ab79682ce4b126a63602d13304ad.
* Added a ring buffer log target to store the last N log messages.Katerina Barone-Adesi2013-02-277-2/+336
| | | | | | | The log target can be used via log alarms and show alarms. Why? This feature was proposed/requested at http://openbsc.osmocom.org/trac/wiki/Tasks/ErrorLogTarget All messages use the same amount of space, prioritizing simplicity.
* fr_test: Speculative build fix for FreeBSDHolger Hans Peter Freyther2013-01-151-0/+3
|
* fr: Begin with a GRE/FrameRelay test due the recent regressionHolger Hans Peter Freyther2013-01-155-2/+92
| | | | | | | | | | | The framerelay code is seldomly used and the socket clean ups introduced a regression. Create a testcase that will work as a user not having the right capabilities to create raw sockets. We have to make sure that this test is working even when not ran as root. The easiest way to do this is to provide our own socket implementation. This is done with dlopen/dlsym to convert the raw socket request to an UDP one.
* tests/timer: tweak path to config.hAlex Badea2013-01-061-1/+1
| | | | | | | | | When building out-of-srcdir, "../../config.h" fails to reach config.h because the compiler is invoked in $builddir/tests/, not $builddir/tests/timer/. Use "../config.h" instead; this also works for in-srcdir builds. Signed-off-by: Alex Badea <vamposdecampos@gmail.com>
* tests: Don't delete atconfig in cleanDaniel Willmann2012-12-261-1/+2
| | | | | | | | This file is created in ./configure so we shouldn't remove it with make. Otherwise ./configure && make clean && make check fails with: make[3]: *** No rule to make target `atconfig', needed by `check-local'. Stop.
* lapd: Fix compiler warnings in the lapd codeHolger Hans Peter Freyther2012-12-261-0/+2
| | | | | | | | lapd_test.c: In function ‘ms_to_bts_l1_cb’: lapd_test.c:192:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable] lapd_test.c:199:1: warning: no return statement in function returning non-void [-Wreturn-type] lapd_test.c: In function ‘main’: lapd_test.c:355:2: warning: implicit declaration of function ‘osmo_init_logging’ [-Wimplicit-function-declaration]
* lapd: Check in rslms_rx_rll() if lapdm context was initialized earlierDaniel Willmann2012-12-262-0/+44
| | | | | | | | | | | | | | | | | | 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.
* build: Don't use the deprecated INCLUDES in the various Makefile.amSylvain Munaut2012-12-111-1/+1
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* logging: Modify the testcase to excercise Nico's fixHolger Hans Peter Freyther2012-09-271-1/+1
|
* logging: Move the logging test from OpenBSC into libosmocoreHolger Hans Peter Freyther2012-09-275-2/+93
| | | | | Add a testcase for the logging facility. The test is coming from the OpenBSC code.
* tests: Make the gb test work with srcdir != builddirHolger Hans Peter Freyther2012-09-114-53/+56
| | | | | | | * Disable color and printing the filename of the stderr log target, update the results * Add the .ok, .err and .sh files to the extra_dist * Execute the shell script from the source directory
* BSSGP: make bvc_ctx->fc a dynamic talloc allocationHarald Welte2012-09-071-50/+50
| | | | | this ensures that we can talloc the flow-control queue entries as siblings off the bvc_ctx.
* GPRS BSSGP test: integrate into autotestHarald Welte2012-09-074-0/+223
| | | | we use a smalle shell script to iterate over multiple tests
* BSSGP flow-control: Add unit test for algorithm testsHarald Welte2012-09-072-1/+172
|
* misc: Fix make distcheck of libosmocore by adding the result to the distHolger Hans Peter Freyther2012-08-251-1/+2
| | | | Add the new result file to the EXTRA_DIST.
* GSM 04.08: Add support for parsing CSD related bearer capabilitiesHarald Welte2012-08-244-1/+145
| | | | Also adds a test case for both encoder and decoder of this IE
* Add missing includes to timer_test.c and osmo-auc-gen.cHarald Welte2012-08-021-0/+1
| | | | | | This fixes the build with -Werror-implicit-function-declaration. taken from malformatted patch of Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org>
* build: simplify test handling and speed up build.Diego Elio Pettenò2012-06-3012-84/+50
| | | | | | | | | | | | Instead of using a ./configure parameter to decide whehter to build tests or not, use the check_PROGRAMS variable so that the tests are only built when running `make check`. To avoid slowing down the test phase itself, collapse the declaration of the test targets in the tests/Makefile.am file, this way they can be built and linked in parallel before the testsuite is executed. Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
* timer: Increase the imprecision we accept in this testHolger Hans Peter Freyther2012-04-052-2/+2
| | | | | | On a loaded server we might not be able to reach 10ms precision in the test configuration and this is not a high precision timer anyway.
* auth: Update test result with the new OP/OPC outputHolger Hans Peter Freyther2012-03-211-0/+2
|
* milenage: Add function to compute OPC from OP and KHarald Welte2012-03-211-0/+20
|
* GSM 08.08: change gsm0808_create_classmark_update() prototypeHarald Welte2012-01-261-3/+11
| | | | | The caller explicitly specifies CM2 and CM3, rather than one blob containing both.
* tests: Introduce a very basic gsm0808 testHolger Hans Peter Freyther2012-01-225-1/+289
| | | | | | This tests verifies the content of the GSM 08.08 messages, it does not verify the remaining headroom (which the SCCP/IPA code relies on being plenty to prepend the header). More to come in the future.
* lapdm: Make sure that the msgb_l3len(msg) == length...Holger Hans Peter Freyther2012-01-122-9/+13
| | | | | | | | | | 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-122-16/+61
| | | | 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-115-1/+290
| | | | | | | 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.
* auth_core: don't use anonymous unions to make certain gcc versions happyHarald Welte2011-12-071-2/+2
|
* milenage_test: make sure test output is what .ok file expectsHarald Welte2011-12-071-1/+1
|
* milenage_test: make sure test result matches expectationsHarald Welte2011-12-071-1/+1
|
* whitespace fixes in milenage_test.okHarald Welte2011-12-071-7/+7
|
* add autotest script for milenage/auth testingHarald Welte2011-12-075-1/+101
|
* tests: Use the missing from the source directoryHolger Hans Peter Freyther2011-11-292-378/+2
| | | | | No need to keep a manual copy of the missing binary, use the one that will be in the top_srcdir.
* core/conv: Add regression testing codeSylvain Munaut2011-11-245-1/+554
| | | | | | | It tests both a given test vector encoding/decoding, and some random coding/decoding cycles. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* tests/a5: Add a5_test.ok as EXTRA_DISTSylvain Munaut2011-11-171-0/+1
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* tests: fix cut & paste errorSylvain Munaut2011-11-171-1/+1
| | | | | | | Damn ... I fixed it locally and didn't properly commit the fix before push. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* tests/a5: Add a5 regression testingSylvain Munaut2011-11-175-1/+116
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* tests: Fix the make distcheck of libosmocore with the testsHolger Hans Peter Freyther2011-11-149-4/+7
|