aboutsummaryrefslogtreecommitdiff
path: root/src/tests
AgeCommit message (Collapse)Author
2020-12-01tests: added parse ERROR response testDylan Van Assche
2020-12-01tests: added parse OK response testDylan Van Assche
2020-11-20tests,cdma: test CDMA SMS with different text lengthsAleksander Morgado
2020-10-16mm-modem-helpers: add low_nybble_first argument to mm_bcd_to_stringEric Caruso
All BCD-encoded strings used by MM currently have the low nybble of each byte come before the high nybble, but some strings (such as the EID string returned by QMI Get Slot Status) are meant to be read in order with the high nybble before the low one. As such, extend mm_bcd_to_string to decode both.
2020-08-20sms-part-3gpp: allow sending UTF-16 as if it were UCS-2Aleksander Morgado
Despite 3GPP TS 23.038 specifies that Unicode SMS messages are encoded in UCS-2, UTF-16 encoding is commonly used instead on many modern platforms to allow encoding code points that fall outside the Basic Multilingual Plane (BMP), such as Emoji. Update the logic to always use UTF-16 instead of UCS-2 when creating or parsing PDUs (even if we always report as sending or receiving UCS-2). For all purposes, UCS-2 is considered a subset of UTF-16 (assuming that code points out of the [U+0000,U+D7FF] and [U+E000,U+FFFF] ranges are not applicable in UCS-2). Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/250
2020-08-20charsets: add UTF-16BE as a possible modem charsetAleksander Morgado
Just as an implementation detail to be taken as an extension of UCS2BE, never really to be used as a real modem charset.
2020-05-26charsets: take_and_convert() methods should support GSM encodingAleksander Morgado
The iconv() operation would fail because we wouldn't give any proper charset string to convert to/from. Use our custom GSM encoding support instead.
2020-05-26charsets,test: extend UCS2->UTF-8 testing for the reverse operationAleksander Morgado
2020-05-26Revert "charsets: don't warn in unlikely case of needing to convert to HEX ↵Aleksander Morgado
from UTF-8" This reverts commit 6a7dd87f30b2cc1b459abab38a0805aa8ba1bfbc. Reverting because the merge request was set to squash all together....
2020-05-26charsets: don't warn in unlikely case of needing to convert to HEX from UTF-8Giacinto Cifelli
This would really be an implementation detail, not a real use case. Just don't warn in this case, as in the conversion in the opposite direction.
2020-05-19test-qcdm-serial-port: fix warnings with -Wsign-compareAleksander Morgado
test-qcdm-serial-port.c: In function 'wait_for_child': test-qcdm-serial-port.c:57:52: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] if (d->child && (now.tv_sec - start.tv_sec > timeout)) { ^
2020-04-09tests,modem-helpers: regex number is index of an array, so starts at 0Aleksander Morgado
2020-04-09test,modem-helpers: use MMModem3gppRegistrationState values in testsAleksander Morgado
2020-04-09broadband-modem: run +C5GREG state checksAleksander Morgado
The generic CREG parser is improved to also allow parsing +C5GREG responses and URCs.
2020-04-09helpers: use generic number parsing methods in CREG parserAleksander Morgado
This fixes the s8500 wave unit test, which was incorrectly parsing the Act field reported as 'B' as "GSM" (strtol(B)=0) Also, given that the generic parsing methods are able to parse numbers from quoted strings, this change allows us to remove the Thuraya specific CREG matching that just took into consideration quoted strings. The Thuraya unit tests are also fixed up to provide proper testing of the logic.
2020-04-09test,modem-helpers: remove obsolete comments in u-blox CREG testsAleksander Morgado
We already support "SMS only" registration state.
2020-04-08log: common logging method definition for all testers and helpersAleksander Morgado
2020-04-08error-helpers: port to use object loggingAleksander Morgado
2020-04-08modem-helpers-qmi: port qmi capabilities parser to use object loggingAleksander Morgado
2020-04-08modem-helpers: make cpms test parser return error on failureAleksander Morgado
2020-04-08modem-helpers: port ccwa service query parser to use object loggingAleksander Morgado
2020-04-08modem-helpers: port cesq response parser to use object loggingAleksander Morgado
2020-04-08modem-helpers: port creg response parser to use object loggingAleksander Morgado
2020-04-08modem-helpers: port clcc list parser to use object loggingAleksander Morgado
2020-04-08modem-helpers: remove unused supported capabilities filterAleksander Morgado
2020-04-08modem-helpers: port cmer test parser to use object loggingAleksander Morgado
2020-04-08modem-helpers: parse cgdcont test parser to use object loggingAleksander Morgado
2020-04-08modem-helpers: port cid selection helper to use object loggingAleksander Morgado
2020-04-08modem-helpers: port cops test parser to use object loggingAleksander Morgado
2020-04-08modem-helpers: port ifc test parser to use object loggingAleksander Morgado
2020-04-08modem-helpers: port supported modes filtering to use object loggingAleksander Morgado
2020-04-08modem-helpers: port device identifier to use object logging and autoptrAleksander Morgado
2020-04-08tests,test-sms-part-cdma: remove explicit loggingAleksander Morgado
2020-04-08sms-part-cdma: port to use object loggingAleksander Morgado
2020-04-08sms-part-3gpp: port to use object loggingAleksander Morgado
2020-04-08log: new object logging supportAleksander Morgado
So that we can provide the specific object id in every log associated to a given object.
2020-01-31test-error-helpers: fix warnings with -Wsign-compareAleksander Morgado
test-error-helpers.c: In function ‘test_error_helpers_connection_error’: test-error-helpers.c:36:39: error: comparison of integer expressions of different signedness: ‘guint’ {aka ‘unsigned int’} and ‘gint’ {aka ‘int’} [-Werror=sign-compare] 36 | for (i = enum_class->minimum; i <= enum_class->maximum; i++) { \ | ^~
2020-01-31test-qcdm-serial-port: fix warnings with -Wsign-compareAleksander Morgado
test-qcdm-serial-port.c: In function ‘print_buf’: test-qcdm-serial-port.c:79:19: error: comparison of integer expressions of different signedness: ‘int’ and ‘gsize’ {aka ‘long unsigned int’} [-Werror=sign-compare] 79 | for (i = 0; i < len; i++) { | ^ test-qcdm-serial-port.c: In function ‘server_wait_request’: test-qcdm-serial-port.c:163:20: error: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Werror=sign-compare] 163 | } while (total < sizeof (readbuf)); | ^
2020-01-31test-modem-helpers: fix warnings with -Wswitch-enumAleksander Morgado
test-modem-helpers.c: In function ‘test_cgev_indication’: test-modem-helpers.c:2165:9: error: enumeration value ‘MM_3GPP_CGEV_UNKNOWN’ not handled in switch [-Werror=switch-enum] 2165 | switch (type) { | ^~~~~~ cc1: all warnings being treated as errors
2020-01-31test-modem-helpers: fix warnings with -Wsign-compareAleksander Morgado
test-modem-helpers.c: In function ‘test_creg_match’: test-modem-helpers.c:1127:19: error: comparison of integer expressions of different signedness: ‘int’ and ‘guint’ {aka ‘unsigned int’} [-Werror=sign-compare] 1127 | for (i = 0; i < array->len; i++) { | ^
2020-01-31test-modem-helpers: fix warnings with -Wdiscarded-qualifiersAleksander Morgado
test-modem-helpers.c: In function ‘test_cmgl_response_generic’: test-modem-helpers.c:294:20: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 294 | .pdu = "07914306073011F00405812261F700003130916191314095C27" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ...
2020-01-30tests,at-serial-port: fix warnings with -Wdiscarded-qualifiersAleksander Morgado
test-at-serial-port.c:29:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 29 | { "\r\n", "\r\n" }, | ^~~~~~ test-at-serial-port.c:29:15: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 29 | { "\r\n", "\r\n" }, | ^~~~~~
2020-01-30build: use AX_IS_RELEASE() and AX_COMPILER_FLAGS()Aleksander Morgado
The autoconf macros AX_COMPILER_FLAGS_{CFLAGS|GIR|LDFLAGS} test for compiler and linker support of various flags, and add the flags to the generated output. If the command-line option '--enable-compile-warnings' is specified to 'configure', a number of additional warning options is also added to the output. This is the default. This update requires the presence of the GNU autoconf-archive in the system.
2020-01-24tests,charsets: full gsm7/pack/unpack/utf8 sequence in testsAleksander Morgado
2020-01-06broadband-modem: +COPS=? response may give strings in UCS2Aleksander Morgado
If the charset selected via CSCS is UCS2, the modem may decide to return all the strings in the +COPS=? response in UCS2: <debug> (ttyACM0): --> 'AT+COPS=?<CR>' <debug> (ttyACM0): <-- '<CR><LF>+COPS: (2,"004D006F007600690073007400610072","004D006F007600690073007400610072","00320031003400300037",7) <debug> Found network '00320031003400300037' ('004D006F007600690073007400610072','004D006F007600690073007400610072'); availability: current, access tech: lte
2019-12-17core,tests: new test to make sure all error codes are supportedAleksander Morgado
Defining the new error codes in the headers is not enough, we also need to add support in the error helpers in order to create proper GErrors with the expected error codes.
2019-10-17sim: load emergency numbers from EF_ECCAleksander Morgado
2019-10-14tests: print MM logs only on verbose test modeAleksander Morgado
Therefore, avoid needing ENABLE_TEST_MESSAGE_TRACES build symbol.
2019-10-14tests,sms: print PDUs only on verbose test modeAleksander Morgado
Therefore, avoid needing TEST_SMS_PART_ENABLE_TRACE build symbol.
2019-10-14tests: avoid g_print() and use g_debug() insteadAleksander Morgado
The debug-level logs won't be printed e.g. during 'make check', but will be included when running the tester manually.