Commit Graph

33 Commits

Author SHA1 Message Date
Jan Engelhardt 9ffeb9756a build: remove unused all_includes and use AM_CPPFLAGS
Preprocessor flags are best placed in AM_CPPFLAGS. Remove use of the
unused all_includes variable, which is never set.
2014-10-03 08:48:31 +02:00
Sylvain Munaut 579a7103a1 gsm: Add Kasumi cipher implementation
Submitted-by: Max <max.suraev@fairwaves.co>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2014-06-16 14:59:30 +02:00
Holger Hans Peter Freyther b79a148eca utils: Add a simple testcase for osmo_hexdump
This code makes a simple dump and tests for the corner case
2014-01-02 13:59:10 +01:00
Max 4f0abc0e3e Refactor COMP128v23 implementation and add test suit 2013-12-07 18:10:38 +01:00
Jacob Erlbeck dcce196be9 tests/gb: Add test for GPRS NS protocol
This tests the connection establishment by directly calling
gprs_ns_rcvmsg() and printing the resulting messages and the
NS-VC list.
2013-10-08 14:00:24 +02:00
Jacob Erlbeck ae15a2cac1 vty: Fix misusage of snprintf in vty/utils.c
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-08-06 14:56:30 +02:00
Holger Hans Peter Freyther 14df1c07ec fr: Fix the linking of the test and use $(LIBRARY_DL) for linking
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-06-26 07:56:45 +02:00
Katerina Barone-Adesi 3309a43ef5 Added a ring buffer log target to store the last N log messages.
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-27 15:13:45 +01:00
Holger Hans Peter Freyther efd2bd691f Revert "Added a ring buffer log target to store the last N log messages."
I noticed some more issues and it is the easiest to revert and include
the fixed version.

This reverts commit 73377229bb.
2013-02-27 14:51:33 +01:00
Katerina Barone-Adesi 73377229bb Added a ring buffer log target to store the last N log messages.
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-27 14:45:48 +01:00
Holger Hans Peter Freyther 97602d9734 fr: Begin with a GRE/FrameRelay test due the recent regression
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.
2013-01-15 20:06:40 +01:00
Daniel Willmann 13bb169d71 tests: Don't delete atconfig in clean
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-26 10:56:14 +01:00
Sylvain Munaut 5689a3b744 build: Don't use the deprecated INCLUDES in the various Makefile.am
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-12-11 23:59:31 +01:00
Holger Hans Peter Freyther 4b54cab476 logging: Move the logging test from OpenBSC into libosmocore
Add a testcase for the logging facility. The test is coming from
the OpenBSC code.
2012-09-27 16:29:54 +02:00
Holger Hans Peter Freyther c302eca2c6 tests: Make the gb test work with srcdir != builddir
* 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-11 11:49:35 +02:00
Harald Welte 57e5b94e90 BSSGP flow-control: Add unit test for algorithm tests 2012-09-07 12:07:54 +02:00
Holger Hans Peter Freyther 8c589d2f51 misc: Fix make distcheck of libosmocore by adding the result to the dist
Add the new result file to the EXTRA_DIST.
2012-08-25 22:03:42 +02:00
Harald Welte c8a0b93939 GSM 04.08: Add support for parsing CSD related bearer capabilities
Also adds a test case for both encoder and decoder of this IE
2012-08-24 21:37:59 +02:00
Diego Elio Pettenò ea0e1eca2b build: simplify test handling and speed up build.
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-06-30 22:01:42 +02:00
Holger Hans Peter Freyther 97510814d8 tests: Introduce a very basic gsm0808 test
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.
2012-01-22 13:46:58 +01:00
Holger Hans Peter Freyther 72bd4eb3b9 lapdm: Create a simple test case to transmit data between both ends
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-11 21:35:06 +01:00
Harald Welte e076ac087c add autotest script for milenage/auth testing 2011-12-07 00:10:18 +01:00
Holger Hans Peter Freyther 62cb457632 tests: Use the missing from the source directory
No need to keep a manual copy of the missing binary, use the one
that will be in the top_srcdir.
2011-11-29 22:20:34 +01:00
Sylvain Munaut 29eb92db02 core/conv: Add regression testing code
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-24 17:48:42 +01:00
Sylvain Munaut 810c33483e tests/a5: Add a5 regression testing
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-17 20:33:19 +01:00
Holger Hans Peter Freyther f6c1d4cd81 tests: Fix the make distcheck of libosmocore with the tests 2011-11-14 14:37:46 +01:00
Holger Hans Peter Freyther f9eda7489b tests: Use GNU autotest to execute our tests and compare textual output
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-11-14 13:35:41 +01:00
Harald Welte 712691d8d8 add functions for bit-reversal
Sometimes we need stuff like reversing every bit in each byte (but not
the byte-order).
2011-09-01 14:47:31 +02:00
Holger Hans Peter Freyther e05c7dfa8e smscb: Add some simple decoding routines for SMSCB. 2010-12-29 22:51:45 +01:00
Holger Hans Peter Freyther daa653fc22 ussd: Add a test case, switch parsing to use a gsm48_hdr and len
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.
2010-10-11 09:25:14 +02:00
Holger Hans Peter Freyther c87f266522 msgfile: Add a file parser for a simple file format
This file format will be used to store per country code,
per network code messages. This will be used for various
things ranging from access control, to messages...
2010-10-08 19:23:18 +08:00
Harald Welte f8b2ba7dc8 add option --disable-tests to disable building of test binaries 2010-03-07 20:33:59 +01:00
Harald Welte 3cae0398ea add missing automake / autoconf files 2010-02-20 21:09:24 +01:00