summaryrefslogtreecommitdiffstats
path: root/tests/sms
Commit message (Collapse)AuthorAgeFilesLines
* tests: Fix warningsJacob Erlbeck2013-10-081-3/+1
| | | | | | This fixes warnings that are raised by missing includes, missing casts, missing return statements, using printf %lu with uint64_t, and unused symbols.
* tests: Fix the sms_test and use the right arrayHolger Hans Peter Freyther2013-10-081-1/+1
| | | | | | It started to behave weird on Debian Testing (GCC 4.8), I compiled it with address sanitizer support and set a breakpoint in __asan_report_error to get a backtrace.
* sms: Implement encoding the address as alphanumeric typeHolger Hans Peter Freyther2013-09-042-1/+49
| | | | | | The number of digits is the number of used octets times two (two digits per octet). The result has been successfully dissected by wireshark. It has not been tested with real phones.
* sms: Added result buffer size parameter to 7bit conv funsJacob Erlbeck2013-08-122-54/+80
| | | | | | | | | | | | | 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.
* encoding: Provide an overload for the gsm_7bit_encode and a simple testHolger Hans Peter Freyther2013-08-082-0/+18
| | | | | | | This is required for encoding the SMS header using the alpha numeric rules. Reviewed-by: Jacob Erlbeck <jerlbeck@sysmocom.de>
* build: simplify test handling and speed up build.Diego Elio Pettenò2012-06-301-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>
* tests: Fix the make distcheck of libosmocore with the testsHolger Hans Peter Freyther2011-11-141-0/+1
|
* tests: Use GNU autotest to execute our tests and compare textual outputHolger Hans Peter Freyther2011-11-141-0/+2
| | | | | | | | | | | | | 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)
* 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.
* 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-231-3/+3
| | | | | | | | | | | | 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-231-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>
* 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 missing automake / autoconf filesHarald Welte2010-02-201-0/+5
|
* intial checkin of the libosmocore projectHarald Welte2010-02-201-0/+47