aboutsummaryrefslogtreecommitdiffstats
path: root/tests/Makefile.am
AgeCommit message (Collapse)AuthorFilesLines
2016-05-05tlv: Import osmo_shift_* and osmo_match_shift_* from openbscHarald Welte1-2/+5
These routines have nothing to do with specifically the BSC, so import them to the TLV parser we keep in libosmogsm.
2016-04-29Add code generator for convolutional codesMax Suraev msuraev@sysmocom.de1-1/+1
Add python utility to generate .c code with convolutional encoder/decoder based on polynomial description of the code. If argument given it'll be interpreted as intended output directory, otherwise current working directory is used. Codes for *CCH, CS2/3 and TCH/AFS are generated. Corresponding manual implementations are removed from tests. This introduce build-time dependency on python. The main work for this patch was generously contributed by Sylvain Munaut. Fixes: OS#1629
2016-03-17sim: Add simplistic unit test for APDU class tablesHarald Welte1-2/+6
2016-02-18Add T4 bit map compression routinesMax1-2/+5
Add bit map encoder and decoder functions: decoder is fully functional while encoder is good enough for testing - no backtracking to find the best possible compression is implemented. If somebody is willing to implement MS side of EDGE than this has to be expanded. Add corresponding tests. N. B: the encoding is implemented according to ETSI TS 44.060 which is slightly different from T4 used for fax according to CCITT G31D (RFC 804). Ticket: OW#2407 Sponsored-by: On-Waves ehf Signed-off-by: Max <msuraev@sysmocom.de>
2016-01-15msgb/test: Add test for msgb message buffersJacob Erlbeck1-2/+5
This tests several API functions of the msgb by checking the invariant and by dumping resulting message buffers as hex. Sponsored-by: On-Waves ehf Conflicts: tests/Makefile.am
2016-01-15bitvec: Add get/set byte sequencesJacob Erlbeck1-2/+7
The new functions bitvec_get_bytes and bitvec_set_bytes copy byte sequences from bitvecs to uint8_t arrays and vice versa. While the bytes in the bitvecs do not need to be aligned, the uint8_t arrays always are. In case the bytes in the bitvec are aligned, the implementation uses memcpy. Note that the implementation like the other existing functions assume MSB first encoding. [hfreyther: Squash the comment fix into this commit as well] Sponsored-by: On-Waves ehf
2016-01-15gsm: Add APN conversion functionsJacob Erlbeck1-3/+7
These functions are currently part of openbsc but also needed by other projects. The function have been renamed as follows: gprs_apn_to_str -> osmo_apn_to_str gprs_str_to_apn -> osmo_apn_from_str Sponsored-by: On-Waves ehf
2015-12-05remove our internal copy of talloc, use system libtallocHarald Welte1-1/+2
Shipping our own private copy of talloc was a good idea in 2008, when it was not readily available on most target platforms. Today, the situation is quite different, as it is a standard library on major Linux distributions.
2015-08-22test: Remove unneeded linking to libosmovty.laJacob Erlbeck1-4/+4
The addition of libosmovty.la to several test cases as done in commit 738d9e22108a8e47245 (stats: Add vty_out_stat_item_group) is not needed. This commit removes them. Sponsored-by: On-Waves ehf
2015-10-28stats: Add vty_out_stat_item_groupJacob Erlbeck1-4/+4
This functions dumps a whole stat item group to the VTY. Sponsored-by: On-Waves ehf
2015-10-28stats: Add stat_item for value monitoringJacob Erlbeck1-2/+5
This commit adds instrumentation function to gather measurement and statistical values similar to counter groups. Multiple values can be stored per item, which can be retrieved in FIFO order. Getting values from the item does not modify its state to allow for multiple independant backends (e.g. VTY and statd). When a new value is set, the oldest value gets silently overwritten. Lost values are skipped when getting values from the item. Sponsored-by: On-Waves ehf
2015-09-16build: have a disable-static build succeedJan Engelhardt1-4/+2
When using configure --disable-static, no libosmogsm.a will be created, and the tests fail to link because symbols like _a5_3 and _a5_4 are not exported through the only remaining libosmogsm.so. A method to overcome this is an intermediate private non-distributed library, examples of which are present in e.g. libabc, kmod and systemd. With this, disable-static can now be the default and practical compile time be halved.
2015-08-19tests: Don't reference file in src/ to test hidden func. Use static link.Sylvain Munaut1-2/+3
Taken from: https://qiaomuf.wordpress.com/2011/03/27/handling-unit-test-with-c-visibilityhidden/ Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2015-06-02ipa: Properly parse LV stream of a ID_GET requestHolger Hans Peter Freyther1-1/+1
For some reason the structure is closer to be a LV (length and value). The value is actually a tag but it is counted inside the length. Introduce an overload of the parse function to provide an offset for the length. This will be taken from the returned length.
2015-05-17build: Fix the building of tests as wellHolger Hans Peter Freyther1-1/+1
In file included from ../../include/osmocom/core/msgb.h:25:0, from ../../tests/sms/sms_test.c:31: ../../include/osmocom/core/bits.h:6:35: fatal error: osmocom/core/bit16gen.h: No such file or directory #include <osmocom/core/bit16gen.h>
2015-04-01Tests: Fix broken loggingrb testcase.Michael McTernan1-1/+1
The loggingrb (ringbuffer) test case was not actually being built or ran, instead still using the normal logging test. This patch fixes the makefile, then the loggingrb testcase is changed to use the current loggingrb API so that it builds and passes. Signed-off-by: Michael McTernan <mike.mcternan@wavemobile.com>
2015-03-28gsm: Add A5/3-4 cipher supportMax1-1/+2
Signed-off-by: Max <max.suraev@fairwaves.co> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2014-12-29add gsm0341_test to generate SMSCB hex stringsHarald Welte1-1/+5
Those hex strings can then be copy+pasted into the OSmoNITB VTY
2014-10-23gprs/test: Add BSSGP testsJacob Erlbeck1-2/+6
This patch adds a test suite for the BSSGP protocol. The first (and only) test checks the handling of BSSGP SUSPEND/RESUME. Sponsored-by: On-Waves ehf
2014-10-03build: fix linker error with kasumi_testJan Engelhardt1-2/+1
When the osmocore package is configured with --disable-static, building of kasumi_test fails. This seems quite legit, given the function _kasumi_kgcore is not exported. Don't try to workaround the build system. Include the code. CCLD kasumi/kasumi_test kasumi_test.o: In function `test_expansion': ~tests/kasumi/kasumi_test.c:25: undefined reference to `_kasumi_key_expand' kasumi_test.o: In function `main': ~tests/kasumi/kasumi_test.c:56: undefined reference to `_kasumi' ~tests/kasumi/kasumi_test.c:100: undefined reference to `_kasumi_key_expand' ~tests/kasumi/kasumi_test.c:112: undefined reference to `_kasumi_kgcore' [...]
2014-10-03build: remove unused all_includes and use AM_CPPFLAGSJan Engelhardt1-1/+2
Preprocessor flags are best placed in AM_CPPFLAGS. Remove use of the unused all_includes variable, which is never set.
2014-06-16gsm: Add Kasumi cipher implementationSylvain Munaut1-2/+6
Submitted-by: Max <max.suraev@fairwaves.co> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2014-01-02utils: Add a simple testcase for osmo_hexdumpHolger Hans Peter Freyther1-2/+6
This code makes a simple dump and tests for the corner case
2013-12-07Refactor COMP128v23 implementation and add test suitMax1-2/+5
2013-10-08tests/gb: Add test for GPRS NS protocolJacob Erlbeck1-1/+6
This tests the connection establishment by directly calling gprs_ns_rcvmsg() and printing the resulting messages and the NS-VC list.
2013-08-06vty: Fix misusage of snprintf in vty/utils.cJacob Erlbeck1-2/+7
Compiled with ubuntu 1204 (precise), where -Wformat-security is enabled by -Wall. Test yields ok, but the current implementation doesn't properly support multi-character separators and end strings. So the test output is truncated. Addresses: utils.c: In function 'vty_cmd_string_from_valstr': utils.c:84:2: warning: format not a string literal and no format arguments [-Wformat-security] utils.c:84:2: warning: format not a string literal and no format arguments [-Wformat-security] utils.c:108:2: warning: format not a string literal and no format arguments [-Wformat-security] utils.c:108:2: warning: format not a string literal and no format arguments [-Wformat-security]
2013-06-26fr: Fix the linking of the test and use $(LIBRARY_DL) for linkingHolger Hans Peter Freyther1-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
2013-02-27Added a ring buffer log target to store the last N log messages.Katerina Barone-Adesi1-2/+11
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.
2013-02-27Revert "Added a ring buffer log target to store the last N log messages."Holger Hans Peter Freyther1-11/+2
I noticed some more issues and it is the easiest to revert and include the fixed version. This reverts commit 73377229bb33ab79682ce4b126a63602d13304ad.
2013-02-27Added a ring buffer log target to store the last N log messages.Katerina Barone-Adesi1-2/+11
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.
2013-01-15fr: Begin with a GRE/FrameRelay test due the recent regressionHolger Hans Peter Freyther1-2/+7
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.
2012-12-26tests: Don't delete atconfig in cleanDaniel Willmann1-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.
2012-12-11build: Don't use the deprecated INCLUDES in the various Makefile.amSylvain Munaut1-1/+1
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-09-27logging: Move the logging test from OpenBSC into libosmocoreHolger Hans Peter Freyther1-2/+7
Add a testcase for the logging facility. The test is coming from the OpenBSC code.
2012-09-11tests: Make the gb test work with srcdir != builddirHolger Hans Peter Freyther1-1/+2
* 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
2012-09-07BSSGP flow-control: Add unit test for algorithm testsHarald Welte1-1/+5
2012-08-25misc: Fix make distcheck of libosmocore by adding the result to the distHolger Hans Peter Freyther1-1/+2
Add the new result file to the EXTRA_DIST.
2012-08-24GSM 04.08: Add support for parsing CSD related bearer capabilitiesHarald Welte1-1/+4
Also adds a test case for both encoder and decoder of this IE
2012-06-30build: simplify test handling and speed up build.Diego Elio Pettenò1-11/+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>
2012-01-22tests: Introduce a very basic gsm0808 testHolger Hans Peter Freyther1-1/+1
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.
2011-12-11lapdm: Create a simple test case to transmit data between both ends0.4.1Holger Hans Peter Freyther1-1/+1
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.
2011-12-07add autotest script for milenage/auth testingHarald Welte1-1/+1
2011-11-29tests: Use the missing from the source directoryHolger Hans Peter Freyther1-2/+2
No need to keep a manual copy of the missing binary, use the one that will be in the top_srcdir.
2011-11-24core/conv: Add regression testing codeSylvain Munaut1-1/+1
It tests both a given test vector encoding/decoding, and some random coding/decoding cycles. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-17tests/a5: Add a5 regression testingSylvain Munaut1-1/+1
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-14tests: Fix the make distcheck of libosmocore with the testsHolger Hans Peter Freyther1-0/+1
2011-11-14tests: Use GNU autotest to execute our tests and compare textual outputHolger Hans Peter Freyther1-0/+40
The output of make check is looking like this now: Regression tests. 1: bits ok 2: msgfile ok 3: sms ok 4: smscb ok 5: timer FAILED (testsuite.at:38) 6: ussd FAILED (testsuite.at:44)
2011-09-01add functions for bit-reversalHarald Welte1-1/+1
Sometimes we need stuff like reversing every bit in each byte (but not the byte-order).
2010-12-29smscb: Add some simple decoding routines for SMSCB.Holger Hans Peter Freyther1-1/+1
2010-10-11ussd: Add a test case, switch parsing to use a gsm48_hdr and lenHolger Hans Peter Freyther1-1/+1
The current USSD code is not doing any size checks, add a test case to find out how easily we access the data out of bounds. Begin to use the length in some places.