aboutsummaryrefslogtreecommitdiff
path: root/plugins/simtech/tests/test-modem-helpers-simtech.c
AgeCommit message (Collapse)Author
2023-01-03build: move plugins directory to src/pluginsAleksander Morgado
We are going to allow including the plugin sources built within the ModemManager daemon binary; moving the sources within the daemon sources directory makes it easier.
2022-09-05core: port GRegex/GMatchInfo to use autoptr()Aleksander Morgado
The behavior of GRegex changed in 2.73.2 once it was ported from pcre1 to pcre2. In some cases it was made more strict, which is fine, in other cases it exposed some change in how it behaves on certain matches that is not extremely clear whether it's ok or not. See https://gitlab.gnome.org/GNOME/glib/-/issues/2729 See https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/601 See https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/621 Either way, one thing that was assumed was that initializing all GRegex/GMatchInfo variables to NULL and making sure they're NULL before they're initialized by glib (especially the GMatchInfo) was a good and safer approach. So, whenever possible, g_autoptr() is used to cleanup the allocated GMatchInfo/GRegex variables, and otherwise, g_clear_pointer() is used to ensure that no free/unref is attempted unless the given variable is not NULL, and also so that the variable is reseted to NULL after being disposed.
2020-04-08log: common logging method definition for all testers and helpersAleksander Morgado
2020-04-08modem-helpers: port clcc list parser 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-31simtech,helpers: fix warnings with -Wdiscarded-qualifiersAleksander Morgado
simtech/tests/test-modem-helpers-simtech.c: In function ‘test_clcc_urc_single’: simtech/tests/test-modem-helpers-simtech.c:98:64: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 98 | { 1, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE, "123456789" } | ^~~~~~~~~~~ simtech/tests/test-modem-helpers-simtech.c: In function ‘test_clcc_urc_multiple’: simtech/tests/test-modem-helpers-simtech.c:113:65: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 113 | { 2, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE, "123456789" }, | ^~~~~~~~~~~ simtech/tests/test-modem-helpers-simtech.c:114:65: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 114 | { 3, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE, "987654321" }, | ^~~~~~~~~~~ simtech/tests/test-modem-helpers-simtech.c: In function ‘test_clcc_urc_complex’: simtech/tests/test-modem-helpers-simtech.c:130:65: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 130 | { 1, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE, "123456789" }, | ^~~~~~~~~~~ simtech/tests/test-modem-helpers-simtech.c:131:65: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 131 | { 2, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_WAITING, "987654321" }, | ^~~~~~~~~~~
2019-10-16simtech: handle 'MISSED_CALL' URCsAleksander Morgado
https://source.puri.sm/Librem5/ModemManager/issues/6
2019-10-15simtech: handle '+RXDTMF' URCs reporting DTMF tonesAleksander Morgado
2019-10-15simtech: handle non-standard '+CRING' URCsAleksander Morgado
The SIM7600E ends up emitting these URCs with too many <CR>s, and the generic +CRING handler doesn't catch them, interfering with other actions, e.g.: $ sudo mmcli --call 1 --accept error: couldn't accept the call: 'GDBus.Error:org.freedesktop.ModemManager1.Error.Core.Failed: Couldn't accept the call: Unhandled response '+CRING: VOICE +CRING: VOICE''
2019-10-15simtech: handle 'VOICE CALL' URCsAleksander Morgado
Just processing and parsing them for now, so that they don't interfere with other commands: $ sudo mmcli --call 1 --accept error: couldn't accept the call: 'GDBus.Error:org.freedesktop.ModemManager1.Error.Core.Failed: Couldn't accept the call: Unhandled response ' VOICE CALL: BEGIN''
2019-10-14simtech: implement +CLCC URC based call list managementAleksander Morgado