aboutsummaryrefslogtreecommitdiff
path: root/src/tests
AgeCommit message (Collapse)Author
2015-03-23broadband-modem: default implementation of the network time interfaceJason Simmons
Add a default implementation that queries the real-time clock using the AT+CCLK? command. Also set AT+CTZU=1 in case a modem requires it.
2015-01-11build: add code coverage supportJakub Sitnicki
Build all targets, except for CLI tools (mmcli, uml290), with special flags needed for collecting code coverage information when the build has been configured with --enable-code-coverage. Three new targets are available in the top build directory: - `check-code-coverage' runs the test suite and generates a code coverage report, - `code-coverage-capture' generates a code coverage report from already collected data, which can come in handy when one wants to see code paths touched by a particular test, - `code-coverage-clean' removes the collected coverage data and the generated reports.
2014-10-15qcdm: don't retry probing if QCDM unescaping failsAleksander Morgado
But keep the retries when the frame marker isn't found. https://bugzilla.gnome.org/show_bug.cgi?id=708861
2014-06-27modem-helpers: don't return any result if an error happens when parsing CPMS=?Aleksander Morgado
We shouldn't rely on the caller to cleanup intermediate results when returning an error.
2014-06-03tests: fix more memory leaksBen Chan
2014-05-30tests: fix memory leaksBen Chan
This patch fixes memory leaks in unit tests detected by LeakSanitizer.
2014-05-20core: minor coding style fixesBen Chan
2014-02-13port-serial-qcdm: commands are never cachedAleksander Morgado
The QCDM port commands are never cached, so remove the option from the command() method. Will also simplify command caching afterwards as it will be an AT-only thing.
2014-02-13port-serial-qcdm: use GIO Async API like methodsAleksander Morgado
2014-02-13ports: rename 'libserial' to 'libport'Aleksander Morgado
2014-02-13ports: rename 'MMAtSerialPort' to 'MMPortSerialAt'Aleksander Morgado
2014-02-13ports: rename 'MMQcdmSerialPort' to 'MMPortSerialQcdm'Aleksander Morgado
2014-02-13ports: rename 'MMSerialPort' to 'MMPortSerial'Aleksander Morgado
2013-11-01modem-helpers: handle +CGDCONT=? replies with single contextAleksander Morgado
https://bugzilla.gnome.org/show_bug.cgi?id=708983
2013-11-01tests: enable logging if 'ENABLE_TEST_MESSAGE_TRACES' is definedAleksander Morgado
2013-10-25sms-part-cdma,test: new tests for Latin and Unicode encodingsAleksander Morgado
2013-10-25sms-part-cdma: support receiving SMS with Latin encodingAleksander Morgado
2013-10-25sms-part-cdma: new CDMA SMS creatorAleksander Morgado
Currently very limited: * Only WMT teleservice. * Only DMTF-encoded numbers. * Only either raw binary data or ASCII-7 text.
2013-10-25sms-part-cdma: read 7-bit ASCII text or raw dataAleksander Morgado
2013-10-25tests: new CDMA SMS part testerAleksander Morgado
2013-10-25tests: rename 3GPP SMS part testerAleksander Morgado
2013-10-25sms: split SMS part handling into common and 3GPP-specificAleksander Morgado
2013-09-26modem-helpers,sim: auto-detect if ICCID response is character swappedBen Chan
This patch modifies mm_3gpp_parse_iccid() to auto-detect if an ICCID response is character swapped or not by comparsing the major industry identifier part of the ICCID response to the known value (89) for telecommunication purposes. This addresses the issue where the same AT command (e.g. AT^ICCID used by the huawei plugin) does not report ICCID in a consistent format.
2013-09-10core: add helper for parsing and validating the ICCIDDan Williams
2013-08-06modem-helpers: fix parsing of CREG/CGREG/CEREG responsesBen Chan
The format of CREG/CGREG/CEREG responses is not very precisely defined in or strictly enforced by the 3GPP specifications. That leads to the fact that some modems put leading zeros in integer type fields (e.g. <n>, <stat>, <AcT>), and not all modems put double quotes around string type fields (e.g. <lac>, <ci>) in those C*REG responses. For example, 0001 can be a valid value for both <stat> and <lac>. The original C*REG parsing code in ModemManager could potentially interpret '+CREG: <stat>,<lac>,<ci>,<AcT>' as '+CREG: <n>,<stat>,<lac>,<ci>'. This patch addresses this issue by refining the regular expressions returned by mm_3gpp_creg_regex_get() with the following assumptions: 1. If a modem puts leading zeros in integer type fields, it puts double quotes around string type fields. 2. If a modem omits double quotes around string type fields, it does not put leading zeros in integer type fields.
2013-06-18tests: avoid printing in stdout by defaultAleksander Morgado
Tests had either their own g_print()s or they would enable a _mm_log() method to get all g_debug()s from the libraries printed. In order to cleanup the result of the tests run, avoid this stdout dumps by default, and only enable them if explicitly enabled in CFLAGS, e.g.: $> ./configure CFLAGS="-DENABLE_TEST_MESSAGE_TRACES"
2013-06-18build: remove unneeded GLIB_CHECK_VERSION checks, 2.32 already requiredAleksander Morgado
2013-06-18build: setup gtester based testsAleksander Morgado
2013-06-05broadband-modem-qmi: update current capabilities loading logicAleksander Morgado
Changes being: * Don't rely on the band preference TLVs presence. The band preference TLVs are always given, even if the modem doesn't support the specific capability right away. E.g. a GSM/UMTS/LTE modem configured with 'gsm-umts' capability (no 'lte') still shows the LTE band preference TLV in the SSP responses. * Don't automatically add LTE as current capability. We needed this when we were not able to change capabilities, so that we didn't lose the ability to set 4G mode as allowed.
2013-06-05api,introspection: rename 'ModemCapabilities' to 'SupportedCapabilities'Aleksander Morgado
And also make it a list of masks, specifying which are the specific combinations supported, not just one mask with all. E.g.: ------------------------- Hardware | manufacturer: 'Sierra Wireless, Incorporated' | model: 'MC7710' | revision: 'SWI9200X_03.05.19.04ap r5475 carmd-en-10527 2012/09/17 17:57:14' | supported: 'gsm-umts | gsm-umts, lte' | current: 'gsm-umts, lte' | equipment id: '358178040668164'
2013-06-05api,introspection: 'SupportedModes' is now a list of possible combinationsAleksander Morgado
Instead of just a mask of MMModemMode values, we now provide a list of the allowed and preferred mode combinations supported by the modem. E.g.: $> sudo mmcli -m 0 ------------------------- Modes | supported: 'allowed: 2g; preferred: none | allowed: 3g; preferred: none | allowed: 2g, 3g; preferred: none | allowed: 2g, 3g; preferred: 2g | allowed: 2g, 3g; preferred: 3g | allowed: 4g; preferred: none | allowed: 2g, 3g, 4g; preferred: none'
2013-06-05modem-helpers: new CGDCONT=? test response parserAleksander Morgado
2013-06-05modem-helpers: rename CGDCONT? testsAleksander Morgado
Adding the 'read' suffix, as they are for CGDCONT? read responses.
2013-05-31modem-helpers: handle commas within +COPS response items (bgo #701329)Dan Williams
Modems can probably put whatever they want between the quotes for the operator name, including commas. Handle that. https://bugzilla.gnome.org/show_bug.cgi?id=701329
2013-05-06sms: add support for message classDan Williams
We need to redefine the message class property to int since class 0 is a valid message class. Thus -1 now means "unspecified class".
2013-04-11modem-helpers-qmi: explicitly add LTE as current cap if modem caps report itAleksander Morgado
For loading current capabilities we use a mix of "Technology Preference" (TP), "System Selection Preference" (SSP) and DMS-reported capabilities. But, as we also use TP and SSP for allowed modes, it may be the case that we end up leaving 4G out of the allowed modes, which afterwards will make the modem not report LTE as current capabilitiy, as TP/SSP don't include LTE. So, just assume LTE is a current capability if DMS-reported capabilities include it. We can really do this because LTE is the only 4G technology, the same logic wouldn't apply correctly for 2G or 3G (due to having different techs for 3GPP and 3GPP2).
2013-04-11test-modem-helpers-qmi: new unit tests to check the 'current-capabilities' logicAleksander Morgado
Based on Dan's tests with QMI modems.
2013-04-05api,introspection: update 'Validity' property in the SMS interfaceAleksander Morgado
We don't want to support only 'relative' validity, so don't assume that the Validity property will always be a uint32 value. Instead, we define the Validity propery as '(uv)' tuple, where the first value (a MMSmsValidityType) specifies the type of validity, and the second value is a variant formatted accordingly to what the validity type specifies (e.g. a uint32 value if the type is MM_SMS_VALIDITY_TYPE_RELATIVE).
2013-04-02broadband-modem: update CMGL parsing logicAleksander Morgado
Pantech UMW190 modem uses a custom +CMGL response which includes only three fields before the actual PDU, e.g: +CMGL: <index>,<status>,<something>\r\n<PDU> instead of what we had before: +CMGL: <index>,<status>,<alpha>,<length>\r\n<PDU> The CMGL parsing logic is now updated to use a regex to match the reply, and also considering the UMW190 specific case. Actually, we end up reading only the two first fields (index and status) which are the ones we really need, so we skip the <length> and the <alpha> if given. Added also unit tests to cover all these known cases. Partially fixes https://bugzilla.gnome.org/show_bug.cgi?id=696723 (missing the actual PDU parsing fixes).
2013-03-27broadband-modem: parse +GSN response for IMEI, MEID, and ESN (bgo #696596)Dan Williams
+GSN response differs widely between modems. Some prefix the MEID and/or ESN with 0x, some have leading zeros, some return the MEID and the ESN, and some append the serial number to the end of the IMEI. Handle that and make the ESN, MEID, IMEI, and EquipmentIdentifier parsing consistent.
2013-02-15modem: use +CEREG to determine EPS network registration statusBen Chan
This patch adds the support for solicited/unsolicited EPS network registration status via AT+CEREG, which is configurable via the 'iface-modem-3gpp-eps-network-supported' property of the MMIfaceModem3gpp interface and is disabled by default.
2012-10-25tests: add PDP context reply parser test for Samsung/Icera repliesAleksander Morgado
2012-10-04tests: fix sms part testsAleksander Morgado
2012-10-04libmm-glib: remove the `libmm-common.h' headerAleksander Morgado
Both the ModemManager daemon and the mmcli will now include `libmm-glib.h' only. We also handle two new special `_LIBMM_INSIDE_MM' and `LIBMM_INSIDE_MMCLI' symbols, which if included before the `libmm-glib.h' library allow us to: * Don't include the libmm-glib high level API in the ModemManager daemon, as the object names would clash with those in the core. * Define some of the methods of helper objects to be included only if compiling ModemManager daemon or the mmcli.
2012-10-04build: merge libmm-common into libmm-glibAleksander Morgado
It's pointless to have libmm-common around, just merge it into libmm-glib and make ModemManager depend on libmm-glib directly. At the end, the non-common stuff in libmm-glib is really minimal.
2012-09-14libmm-common: added common utils from coreAleksander Morgado
Moved the utils to play with binary to hex strings into libmm-common.
2012-09-14sms-part: don't keep track of the whole TP-DCS valueAleksander Morgado
We already retrieve the bits we use from it, class and encoding.
2012-09-14api: new `PduType' property in the SMS interfaceAleksander Morgado
It will help deciding the type of message.
2012-09-14test: set text encoding when testing PDU creatorAleksander Morgado
2012-09-14test: print all logs in SMS part testsAleksander Morgado
They are extremely helpful for debugging issues.