summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* tests: Initialize log system to fix crash, update test resultHolger Hans Peter Freyther2011-11-143-2/+60
| | | | | | | | Use osmo_init_logging to initialize the log system to fix crashes when we attempt to parse broken ASN1 messages. Ignore stderr with parse errors, update the test result. make check is now passing.
* tests: timer: set maximum wait time to obtain test resultsPablo Neira Ayuso2011-11-141-0/+19
| | | | | | | | If the timer test takes more than 2 * (number of steps + 10), we abort the test. This calculation is based on the maximum timeout randomly set (10 seconds) plus the number of steps (some existing timers may be reset in each step). We double this to have some extra grace time to finish.
* tests: timer: use stderr for non-repeatable outputPablo Neira Ayuso2011-11-142-27/+11
| | | | | | | | This makes happy gnu-autotest for the timer test. We may still may fail if we run the test on a very heavy loaded system, but given the amount of timers that we using for the automatic test (only 32), this seems very unlikely to me.
* tests: Reduce the iterations for the timertest, ignore stderrHolger Hans Peter Freyther2011-11-141-1/+1
| | | | | | | Use one of the magic commands for the stderr, in this case we want to log the output but ignore it for processing. http://www.gnu.org/s/hello/manual/autoconf/Writing-Testsuites.html#Writing-Testsuites
* tests: timer: add parameter to select the number of stepsPablo Neira Ayuso2011-11-141-3/+22
| | | | | | | Holger likes having a parameter to set the number of steps in this test. Now you can set it via `-s' option. Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
* tests: Use GNU autotest to execute our tests and compare textual outputHolger Hans Peter Freyther2011-11-1410-0/+514
| | | | | | | | | | | | | 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)
* tests: add new torture test for timer infrastructurePablo Neira Ayuso2011-10-171-33/+108
| | | | | | | | | | | | | | | | This is a new test for the timer infrastructure. It basically consists of adding 2^N timers per step (where N is the number of step) that expire in (random() % 10) + 1 seconds. Moreover, we randomly delete timers that fulfill (random() % 100) < 10 everytime one timer expires. The default number of steps is 16, the test also allows to check for timer imprecisions (currently, defaulting to 10ms as aceptable). The list-based implementation crashes or it seems loop forever with this test (I guess due to some memory corruption). BTW, this patch contains one cosmetic clean up since we go back to 8-chars per indentations, which seems to be the policy in osmocom.
* add functions for bit-reversalHarald Welte2011-09-013-1/+43
| | | | | Sometimes we need stuff like reversing every bit in each byte (but not the byte-order).
* sms: SMS where cropped (from VTY), concatenation of SMS where not possibleDennis Wehrle2011-07-241-14/+212
| | | | | | | | | | | | Additionally it wasn't possible to send concatenated sms from the vty. To send multiple sms, it is necessary to use padding bits and add a user_data_header. Therefore the gsm_7bit_encode function was splitted to gsm_7bit_encode and gsm_septets2octets. gsm_septets2octets: this is the old gsm_7bit_encode function + additional padding parameter Additionally the gsm_7bit_decode function was modified to take account for the user_data_header. With the new gsm_get_octet_len function you can get the octet length for a given septet length. I also added several sms tests.
* msgfile: use namespace prefix osmo_* and use more descriptive namesPablo Neira Ayuso2011-05-071-4/+4
| | | | | | | | | | | | | Summary of changes: s/msg_entry/osmo_config_entry/g s/msg_entries/osmo_config_list/g s/msg_entry_parse/osmo_config_list_parse/g minor glitch included in this patch while I was at it: -#include "linuxlist.h" +#include <osmocom/core/linuxlist.h>
* select: use namespace prefix osmo_fd* and osmo_select*Pablo Neira Ayuso2011-05-071-1/+1
| | | | | | | | | Summary of changes: s/struct bsc_fd/struct osmo_fd/g s/bsc_register_fd/osmo_fd_register/g s/bsc_unregister_fd/osmo_fd_unregister/g s/bsc_select_main/osmo_select_main/g
* timer: use namespace prefix osmo_timer*Pablo Neira Ayuso2011-05-071-8/+8
| | | | | | | | | | | | | | Summary of changes: s/struct timer_list/struct osmo_timer_list/g s/bsc_add_timer/osmo_timer_add/g s/bsc_schedule_timer/osmo_timer_schedule/g s/bsc_del_timer/osmo_timer_del/g s/bsc_timer_pending/osmo_timer_pending/g s/bsc_nearest_timer/osmo_timers_nearest/g s/bsc_prepare_timers/osmo_timers_prepare/g s/bsc_update_timers/osmo_timers_update/g s/bsc_timer_check/osmo_timers_check/g
* misc: Remove the sys/types.h include from various filesHolger Hans Peter Freyther2011-04-181-1/+0
| | | | | We used this include for the u_int{8,16,32}_t types but we do not need this anymore.
* include: reorganize headers file to include/osmocom/[gsm|core]Pablo Neira Ayuso2011-03-235-8/+8
| | | | | | | | | | | | This patch moves all GSM-specific definitions to include/osmocom/gsm. Moreover, the headers in include/osmocore/ have been moved to include/osmocom/core. This has been proposed by Harald Welte and Sylvain Munaunt. Tested with `make distcheck'. Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
* This patch moves the GSM-specific functions to the new libraryPablo Neira Ayuso2011-03-233-3/+3
| | | | | | | | | | libosmogsm which is provided by libosmocore. I have also moved generate_backtrace() to backtrace.c instead of gsm_utils.c, otherwise the timer and msgfile tests depend on libosmogsm. Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
* smscb: Add some simple decoding routines for SMSCB.Holger Hans Peter Freyther2010-12-293-1/+47
|
* msgfile: Allow to have comments in the simple CSV fileHolger Hans Peter Freyther2010-10-261-0/+1
|
* ussd: Verify that parsing is stil working and print the decoded text.Holger Hans Peter Freyther2010-10-111-0/+5
|
* ussd: Add next test that show that we access the data out of boundsHolger Hans Peter Freyther2010-10-111-0/+23
| | | | | This test is showing that the internal ASN1 code is not checking the size properly.
* ussd: Add a test case, switch parsing to use a gsm48_hdr and lenHolger Hans Peter Freyther2010-10-113-1/+69
| | | | | | 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.
* msgfile: Add a file parser for a simple file formatHolger Hans Peter Freyther2010-10-084-0/+59
| | | | | | 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...
* tests: don't hardcode length values of expected encoding gsm_7bit_encode:Nico Golde2010-07-211-11/+10
| | | | | | | | | make sure to return the number of actually written bytes gsm_7bit_decode: calculate length of resulting septets from input length before decoding The input length to gsm_7bit_decode reflects the number of encoded bytes to be decoded. As the decoding is done on the input in septetes we need to take this into account and recalculate the length.
* tests: Separate encoding/decoding test to verify them independlyHolger Hans Peter Freyther2010-07-201-17/+78
| | | | | | Use the current test result as test data for future regression testing. The encode function appears to add too many zeros to the text.
* * rewrite GSM 7bit default encoding/decoding based on a lookup table as the ↵Nico Golde2010-07-201-1/+16
| | | | previous code produced wrong encodings for certain characters.
* add option --disable-tests to disable building of test binariesHarald Welte2010-03-071-0/+2
|
* [timer] Fix compile warning of the timer testHolger Hans Peter Freyther2010-02-261-2/+3
|
* fix config.h directoryHarald Welte2010-02-201-1/+1
|