summaryrefslogtreecommitdiff
path: root/src/libmbim-glib/test
AgeCommit message (Collapse)AuthorFilesLines
2021-10-25libmbim-glib,test: minor refactoring in method namesAleksander Morgado2-108/+116
2021-10-25libmbim-glib,test: add Device Caps v3 parser testAleksander Morgado1-0/+123
2021-10-25libmbim-glib,test: always enable message tracesAleksander Morgado2-12/+0
When running the tests normally under ninja, the output is not verbose at all; so we can enable the traces by default so that we get them if we run the tester manually.
2021-10-25libmbim-glib,tlv: parsers for wake command and wake packet typesAleksander Morgado1-0/+244
2021-10-13libmbim-glib,mbimcli: 'Registration Parameters' command is part of MBIMEx v3.0Aleksander Morgado2-6/+6
2021-10-12ms-basic-connect-v3: switch 'Basic Connect' to use MbimTlvsAleksander Morgado2-0/+400
The logic is updated to avoid requiring intermediate structs in the API; for the string TLVs that are included as named fields we'll use the 'tlv-string' types. We also add support for the unnamed IEs as 'tlv-list' fields at the end of the messages.
2021-10-12libmbim-glib,test,message-parser: include printable output in tracesAleksander Morgado1-1/+46
2021-10-12libmbim-glib,test,message-builder: include printable output in tracesAleksander Morgado1-0/+61
2021-10-12libmbim-glib: new MbimTlv generic typeAleksander Morgado2-0/+491
The Microsoft Extensions define a new generic TLV type that allows including any kind of data in it: from strings, to arrays of uints, to more complex types. We define support for the generic 'tlv' type and the generic 'tlv-list' type, which allow implementing the "unnamed IEs" that are appended to some new messages in the MS extensions. And we also define support for a more specific 'tlv-string', used exclusively when the TLVs are part of the named fields, so that we can provide strings in our libmbim-glib APIs, instead of requiring the user to build MbimTlv instances.
2021-10-12libmbim-glib: implement 'Base Stations Info'Aleksander Morgado1-0/+129
2021-10-06libmbim-glib,enums: rename MBIM_NW_ERROR_UNKNOWN to MBIM_NW_ERROR_NONEAleksander Morgado1-1/+1
Value 0 in the MbimNwError field reports no error, not an unknown error. We provide a compat symbol to avoid breaking API.
2021-09-13build: Remove unnecessary MALLOC_PERTURB_ variable setIñigo Martínez1-3/+0
meson's test function already sets the `MALLOC_PERTURB_` environment variable[0], so there is no need to set it. [0] https://mesonbuild.com/Reference-manual.html#test
2021-09-13build: Make use of dictionariesIñigo Martínez1-6/+7
meson gained the dictionaries as builtin objects[0] that can be modified with the addition operator[1] and can be useful when setting configuration or even environment values[2]. The individual object creation has been replaced by dictionaries when possible. [0] http://mesonbuild.com/Release-notes-for-0-47-0.html#new-builtin-object-type-dictionary [1] https://mesonbuild.com/Release-notes-for-0-48-0.html#dictionary-addition [2] https://mesonbuild.com/Release-notes-for-0-52-0.html#support-taking-environment-values-from-a-dictionary
2021-08-01meson: Fix tests namesIñigo Martínez1-1/+1
In tests execution, the test name is using only the first character instead of the full test name.
2021-07-29libmbim-glib: replace license boilerplate by SPDX identifiersYegor Yefremov7-70/+7
2021-07-27build: Remove autotoolsIñigo Martínez1-56/+0
To avoid the burden of maintaining multiple build systems, autotools support has been removed. Fixes #18.
2021-07-25meson: fix SPDX license identifierYegor Yefremov1-1/+1
There is no such license as GPL-2 in the SPDX nomenclature. As the project is licensed under GNU General Public License v2.0 or later, use the related identifier GPL-2.0-or-later.
2021-05-15libmbim-glib,test: add test to trigger overflow in the message parserAleksander Morgado1-0/+74
The test includes a "Basic Connect" "Visible Providers" response message that has both a string offset and size malformed (reported as 0x80000020 and 0x8000000A instead of 0x00000020 and 0x0000000A). See https://gitlab.freedesktop.org/mobile-broadband/libmbim/-/issues/16
2021-05-03build: port to meson build systemIñigo Martínez1-0/+39
meson is a build system focused on speed an ease of use, which helps speeding up the software development. This patch adds meson support along autotools.
2020-11-26sar: new serviceAleksander Morgado2-0/+17
For now just with the "Config" message, and mbimcli query support.
2020-01-15libmbim-glib,test: port message parser tests to use autoptrAleksander Morgado1-134/+90
2019-12-23test,basic-connect: fail provisioned contexts response without information ↵Aleksander Morgado1-0/+37
buffer
2019-11-26libmbim-glib,test: add test for failed message parsingAleksander Morgado1-0/+48
2019-11-26libmbim-glib,test: fix byte array reading testAleksander Morgado1-3/+53
The STK buffer is 256 bytes, fixed-size, so use that array size for the actual test, or it'll fail with the new strict reading checks.
2019-11-26libmbim-glib,proxy: helper service_subscribe_request_parse() may failAleksander Morgado1-3/+6
2019-11-20build: use AX_IS_RELEASE() and AX_COMPILER_FLAGS()Aleksander Morgado1-0/+2
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 when building from git (not required when building from a source tarball).
2019-11-19build: rework cflags/cppflags/ldflagsAleksander Morgado1-93/+36
2018-11-04ms-basic-connect-extensions: rename serviceAleksander Morgado1-13/+13
This service is not a generic service, it is defined by Microsoft, so rename it to follow the same naming scheme as for other services also defined by Microsoft. We do not provide compatibility symbols, as this is a NEW service to be first released in libmbim 1.18.0. We do bump the micro versionto 1.17.4, so that applications relying on the git version of libmbim can bump their minimum required version accordingly.
2018-10-17libmbim-glib: explicitly configure only non-standard servicesAleksander Morgado1-209/+94
The MBIM documentation states that the DEVICE_SERVICE_SUBSCRIBE_LIST message may be used by clients to specify which indications it is interested in receiving, and then the modem "must only indicate notifications for CIDs which have been enabled via this command". A bit later it says that "Upon OPEN_DONE completion, notifications for CIDs defined in this specification are enabled (aka subscribed to) by default, and vendor extension notifications are off by default." These two previous statements seem to contradict each other, as this would mean that devices emit by default indications for all standard services, regardless of whether clients have subscribed to them explicitly via DEVICE_SERVICE_SUBSCRIBE_LIST. Looking at actual real devices, giving a DEVICE_SERVICE_SUBSCRIBE_LIST that includes NO basic service CID enabled does NOT disable all indications of the standard services, which means we have no way to do so. This commit simplifies the "merged" service subscribe list handling by making the assumption that basic services are by default already subscribed to and also that there is no way to un-subscribe from them. We will use DEVICE_SERVICE_SUBSCRIBE_LIST only to track the subscriptions to CIDs of non-standard services in the device. If the client subscribes to standard services explicitly, the proxy will ignore those and will not send those explicit subscriptions to the device. In the same way, if the client un-subscribes from standard services it was previously subscribed to, we will also ignore those attempts. Clients should be simplified and ignore these subscriptions, but meanwhile the proxy should really behave as the real device. And while trying to behave as the real device, the indications emitted for standard services should always be sent to the clients, even if the clients tried to do custom management of which CIDs of the standard services it's subscribed to. We shouldn't add additional filtering in our end if the device isn't doing that.
2018-09-16libmbim-glib: fix UUID for 'Basic Connectivity Extensions' serviceBen Chan1-1/+1
The 'Basic Connectivity Extensions' service UUID was inconsistently stated in some Microsoft documentations, which has been fixed in [1]. This patch updates libmbim to use the correct UUID for the 'Basic Connectivity Extensions' service UUID, which is 3d01dcc5-fef5-4d05-0d3a-bef7058e9aaf. [1] https://github.com/MicrosoftDocs/windows-driver-docs/issues/831
2018-07-28libmbim-glib: add partial support for Basic IP Connectivity Extensions serviceBen Chan1-0/+8
This patch adds partial support for the Basic IP Connectivity Extensions service defined in Microsoft Mobile Broadband Design Guide. Only the Protocol Configuration Operations (PCO) command is defined.
2018-01-10build: don't rebuild mbim-proxy-helpersAleksander Morgado1-3/+1
They're already included in the non-inst core library.
2018-01-10intel-firmware-update: add support for Intel Firmware Update serviceBen Chan1-0/+8
2017-07-28mbim-common: turn __mbim_utils_str_hex into mbim_common_str_hexBen Chan3-6/+10
__mbim_utils_str_hex is a useful utility method for returning a hexadecimal string representation of a sequence of bytes in memory. This patch turns it into 'mbim_common_str_hex', which can be shared between libmbim-glib and mbimcli.
2015-02-25libmbim-glib,message: allow building messages of custom servicesAleksander Morgado1-7/+38
Once a service has been registered, we should allow users of the library to actually build Command messages with the new service. https://bugs.freedesktop.org/show_bug.cgi?id=77225
2014-08-12test: fix memory leak in test_merge_standard_list_none_fullBen Chan1-3/+4
2014-08-02libmbim-glib,proxy-helpers: list comparison in helpers APIAleksander Morgado1-77/+12
2014-08-02libmbim-glib,proxy-helpers: fix list size reportingAleksander Morgado1-57/+104
2014-08-02libmbim-glib,proxy-helpers: allow merging with empty listsAleksander Morgado1-0/+36
2014-07-31libmbim-glib,test: setup proxy helper testsAleksander Morgado2-1/+534
2014-07-22libmbim-glib,test: fix a memory leak in test-message-parserYunlian Jiang1-0/+1
This fixes a memory leak in test-message-parser.
2014-07-11build: update copyright years and authors listAleksander Morgado6-6/+6
2014-07-10libmbim-glib,test: new parser tester for Register State responsesAleksander Morgado1-0/+82
2014-04-10libmbim: add support for custom servicesArnaud Desmier1-0/+31
* use mbim_register_custom_service API to register a new service. * use mbim_unregister_custom_service API to unregister it.
2014-03-06libmbim-glib: fix typo in MBIM_CID_DEVICE_SERVICE_SUBSCRIBE_LISTBen Chan1-4/+4
This patch renames 'MBIM_CID_DEVICE_SERVICE_SUBSCRIBER_LIST' to 'MBIM_CID_DEVICE_SERVICE_SUBSCRIBE_LIST' to be consistent with the MBIM specification. This CID is for subscribing notifications for CIDs that the host is interested in, and is not related to mobile 'subscriber'.
2014-03-06libmbim-glib,mbimcli: consistently use spaces for indentationBen Chan1-1/+1
2014-03-05ms-host-shutdown: add support for the Microsoft Host Shutdown serviceBen Chan3-16/+84
2014-03-04libmbim-glib,uuid: new 'mbim_uuid_from_printable()'Aleksander Morgado1-0/+77
2014-02-27ms-firmware-id: add support for the Microsoft Firmware ID serviceBen Chan3-14/+82
2013-12-10build: move source code under src/Aleksander Morgado7-0/+3752