aboutsummaryrefslogtreecommitdiffstats
path: root/tests/sms
AgeCommit message (Collapse)AuthorFilesLines
2014-03-20sms_test: Do not crash on logging.Alexander Chemeris1-0/+8
2014-01-09sms: Fix gsm_7bit legacy functions return valueJacob Erlbeck2-0/+30
The legacy 7bit conversion functions (those without the '_n_' in the name) gave wrong return values on 64 bit platforms due to unproper signed/unsigned conversions and the usage of SIZE_MAX. This patch fixes this by using a smaller max size (see GSM_7BIT_LEGACY_MAX_BUFFER_SIZE, currently set to 64k) for the legacy wrappers and by using unsigned int for max_septets. In addition, there are tests now that check the return values of legacy encoding and decoding. Sponsored-by: On-Waves ehf
2013-10-08tests: Fix warningsJacob Erlbeck1-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.
2013-10-08tests: Fix the sms_test and use the right arrayHolger Hans Peter Freyther1-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.
2013-09-04sms: Implement encoding the address as alphanumeric typeHolger Hans Peter Freyther2-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.
2013-08-12sms: Added result buffer size parameter to 7bit conv funsJacob Erlbeck2-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.
2013-08-08encoding: Provide an overload for the gsm_7bit_encode and a simple testHolger Hans Peter Freyther2-0/+18
This is required for encoding the SMS header using the alpha numeric rules. 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: Use GNU autotest to execute our tests and compare textual outputHolger Hans Peter Freyther1-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)
2011-07-24sms: SMS where cropped (from VTY), concatenation of SMS where not possibleDennis Wehrle1-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.
2011-04-18misc: Remove the sys/types.h include from various filesHolger Hans Peter Freyther1-1/+0
We used this include for the u_int{8,16,32}_t types but we do not need this anymore.
2011-03-23include: reorganize headers file to include/osmocom/[gsm|core]0.2.0Pablo Neira Ayuso1-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>
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-07-21tests: don't hardcode length values of expected encoding gsm_7bit_encode:Nico Golde1-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.
2010-07-20tests: Separate encoding/decoding test to verify them independlyHolger Hans Peter Freyther1-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.
2010-07-20* rewrite GSM 7bit default encoding/decoding based on a lookup table as the ↵Nico Golde1-1/+16
previous code produced wrong encodings for certain characters.
2010-02-20add missing automake / autoconf filesHarald Welte1-0/+5
2010-02-20intial checkin of the libosmocore projectHarald Welte1-0/+47