aboutsummaryrefslogtreecommitdiffstats
path: root/tests/ussd
AgeCommit message (Collapse)AuthorFilesLines
2015-01-01Supplementary Services (de)activation, interrogation addedTobias Engel1-7/+7
These patches enhance the Supplementary Service (SS) processing from only being able to handle USSD to other SS, specifically activation, deactivation and interrogation of those SS. Registration is not yet implemented. include/osmocom/gsm/protocol/gsm_09_02.h has been added with needed values for SS. Modified by Harald Welte to keep the old ussd-only functiosn for API/ABI stability.
2013-08-12sms: Added result buffer size parameter to 7bit conv funsJacob Erlbeck2-7/+54
The 7bit<->8bit encoding/decoding functions didn't check whether there is still enough space in the destination buffer. Therefore a buffer size parameter has been added to each of the functions which is used to truncate the output if the buffer is too small. In addition, the return value of the decoding functions has been changed to number of characters written (excluding \0), so this value is always equal to strlen(decoded). The old functions are still available as wrapper functions.
2013-08-08ussd: Changed 7bit test to check spec conformance directlyJacob Erlbeck1-6/+13
Renamed gsm_7bit_ussd() to test_7bit_ussd() and extended the function to take the expected binary encoding and eventually added trailing bytes in the re-decoded text as arguments. These are used to check assertions of the right behaviour instead of solely relying on regression data, because the value are determined by the spec and fixed and it is more obvious this way. Especially concerning the case with the duplicated \r which can easily be overlooked when it's only present in the ok file.
2013-08-08Add special 7-bit encoding and decoding functions for USSD codingAndreas Eversberg2-0/+43
Handling 7-bit coding is a little different for USSD, as TS 03.38 states: To avoid the situation where the receiving entity confuses 7 binary zero pad bits as the @ character, the carriage return or <CR> character shall be used for padding in this situation [...]. If <CR> is intended to be the last character and the message (including the wanted <CR>) ends on an octet boundary, then another <CR> must be added together with a padding bit 0. The receiving entity will perform the carriage return function twice, but this will not result in misoperation as the definition of <CR> [...] is identical to the definition of <CR><CR>. The receiving entity shall remove the final <CR> character where the message ends on an octet boundary with <CR> as the last character. Jacob has verified the fix with fakeBTS and the wireshark dissector. Fixes: OW#947 Reviewed-by: Jacob Erlbeck <jerlbeck@sysmocom.de>
2012-06-30build: simplify test handling and speed up build.Diego Elio Pettenò1-6/+0
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>
2011-11-14tests: Fix the make distcheck of libosmocore with the testsHolger Hans Peter Freyther1-0/+1
2011-11-14tests: Initialize log system to fix crash, update test resultHolger Hans Peter Freyther2-1/+59
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.
2011-11-14tests: Use GNU autotest to execute our tests and compare textual outputHolger Hans Peter Freyther1-0/+1
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-03-23include: reorganize headers file to include/osmocom/[gsm|core]0.2.0Pablo Neira Ayuso1-1/+1
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>
2011-03-23This patch moves the GSM-specific functions to the new libraryPablo Neira Ayuso1-1/+1
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>
2010-10-11ussd: Verify that parsing is stil working and print the decoded text.Holger Hans Peter Freyther1-0/+5
2010-10-11ussd: Add next test that show that we access the data out of boundsHolger Hans Peter Freyther1-0/+23
This test is showing that the internal ASN1 code is not checking the size properly.
2010-10-11ussd: Add a test case, switch parsing to use a gsm48_hdr and lenHolger Hans Peter Freyther2-0/+68
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.