aboutsummaryrefslogtreecommitdiff
path: root/plugins/tests
AgeCommit message (Collapse)Author
2021-08-09foxconn: add T99W175 carrier mapping tableFreedom Liu
2021-08-09foxconn: Rename carrier-mapping to t77w968-carrier-mappingFreedom Liu
2021-04-29foxconn: change modem-foxconn-t77w968 to modem-mbim-foxconnFreedom Liu
Named the object in a more generic way.
2020-11-20qcom-soc: new plugin for Qualcomm SoCsAleksander Morgado
This plugin implements support for old Qualcomm SoCs like the MSM8916 or the MSM8974, where: * control ports are available via RPMSG channels exported as devices e.g. with rpmsgexport: https://github.com/andersson/rpmsgexport * network ports are exposed by the bam-dmux kernel driver: https://github.com/msm8916-mainline/linux/commits/bam-dmux Adding support for newer Qualcomm SoCs (e.g. QRTR+IPA) could be done in a similar way on this very same plugin. This plugin is the first and only one that implements support for a modem device that is "built in" the system, as opposed to external modems that may be available via USB or PCI. The ID_MM_PHYSDEV_UID based udev tags provided by the plugin provide the logic to bind all the SoC ports together in the same modem object, and therefore ID_MM_PHYSDEV_UID should not be used by users to override the ones set by the plugin. All "rpmsg[0-9]*" ports that are considered part of the modem are flagged as candidate, ignoring the parent "rpmsg_ctrl[0-9]*" ports on purpose. This setup therefore assumes that the channels have been exported already as devices (e.g. using rpmsgexport). libqmi 1.27.2 is required to support the "WDS Bind Data Port" message.
2020-09-28gosuncn: new pluginAleksander Morgado
For now, just with port type hints for the GM800 in MBIM mode.
2020-08-16quectel: add udev rules unit testerAleksander Morgado
2020-05-19plugins,tests: avoid cast-align errorsAleksander Morgado
We can safely cast the data in a GArray to gpointer first, and then to the pointer type we require. tests/test-helpers.c: In function 'mm_test_helpers_compare_bands': tests/test-helpers.c:41:47: error: cast increases required alignment of target type [-Werror=cast-align] bands_str = mm_common_build_bands_string ((MMModemBand *)(bands->data), bands->len); ^ tests/test-helpers.c:46:56: error: cast increases required alignment of target type [-Werror=cast-align] expected_bands_str = mm_common_build_bands_string ((MMModemBand *)(expected_bands_array->data), expected_bands_array->len); ^
2020-04-08log: common logging method definition for all testers and helpersAleksander 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-02-03tests,keyfiles: add dummy test to avoid -Wunused-function warningsAleksander Morgado
If none of the plugins enabled in the build has custom keyfiles, the common_test() method would be unused. Avoid this just by adding a new dummy test which is always available in the keyfiles tester.
2020-02-02tests,udev-rules: add dummy test to avoid -Wunused-function warningsAleksander Morgado
If none of the plugins enabled in the build has custom udev rules, the common_test() method would be unused. Avoid this just by adding a new dummy test which is always available in the udev rules tester.
2020-01-31tests,fixture: fix warnings with -Wsign-compareAleksander Morgado
tests/test-fixture.c:130:28: error: comparison of integer expressions of different signedness: ‘gboolean’ {aka ‘int’} and ‘guint’ {aka ‘unsigned int’} [-Werror=sign-compare] 130 | if (modem_expected == n_modems) { | ^~
2019-11-27build: setup plugin selection logicAleksander Morgado
2019-11-13foxconn: new plugin to support the T77W968Aleksander Morgado
The Dell DW5821e is really a re-branded Foxconn T77W968.
2019-10-14tests,helpers: minor alignment fixAleksander Morgado
2019-10-14tests: print MM logs only on verbose test modeAleksander Morgado
Therefore, avoid needing ENABLE_TEST_MESSAGE_TRACES build symbol.
2019-09-10tests,helpers: minor indentation fixAleksander Morgado
2019-09-09plugins,tests: setup new helper utilities for testsAleksander Morgado
For now, including a handy method from the ublox tests that allows comparing arrays of bands that may not be sorted.
2019-04-02plugins,test: setup new simple keyfile testerAleksander Morgado
2018-08-21fibocom: include udev rules testsAleksander Morgado
2017-03-29plugins: remove explicit GDestroyNotify cast on g_free / g_object_unrefBen Chan
g_free and g_object_unref are in form of `void (*)(gpointer)`, which matches the GDestroyNotify signature. An explicit GDestroyNotify cast on g_free and g_object_unref is thus not needed.
2017-02-03glib: remove invocations of g_type_init()Ben Chan
g_type_init() has been deprecated (and also marked with the attribute 'deprecated') since glib 2.36 as the type system is automatically initialized. Since the minimum version of glib required by ModemManager is 2.36, calling g_type_init() isn't necessarily in the ModemManager code.
2016-11-23tests,dbus: check if we're asked to use an abstract socketAleksander Morgado
2016-09-29core: allow building and running without udevAleksander Morgado
Instead of relying on the udev daemon and GUDev to manage the devices reported by the kernel, we can now run ModemManager relying solely on the kernel events reported via the new ReportKernelEvent() API. Therefore, the '--no-auto-scan' option is implicit for the ModemManager daemon when udev is disabled in the build. Additionally, a new custom implementation of the kernel device object is provided, which uses sysfs to load the properties and attributes required in each kernel device, instead of using a GUdevDevice. The udev rule files are kept in place, and a simple custom parser is provided which preloads all rules in memory once and then applies them to the different kernel objects reported via ReportKernelEvent(), e.g. to set port type hints. A simple unit test setup is prepared to validate the udev rules during the `check' Makefile target.
2016-01-16tests,port-context: explicitly close the socket that is added to the listenerAleksander Morgado
Since GLib 2.42, the sockets that are added to socket listeners may no longer be closed automatically when the listener is finalized. In order to avoid that, we will keep our own socket reference and close/unref it ourselves. This issue was preventing adding new test cases with the same port names. $ ./test-service-generic --verbose GTest: random seed: R02S889153ee0f2e59c570f4edff9caa4176 GTest: run: /MM/Service/Generic/enable-disable Activating service name='org.freedesktop.ModemManager1' Successfully activated service 'org.freedesktop.ModemManager1' (MSG: DEBUG: client connection closed) (MSG: MESSAGE: Found modem at '/org/freedesktop/ModemManager1/Modem/0') ** Message: Found modem at '/org/freedesktop/ModemManager1/Modem/0' (MSG: DEBUG: client connection closed) GTest: result: OK GTest: run: /MM/Service/Generic/cme-error-detected Activating service name='org.freedesktop.ModemManager1' Successfully activated service 'org.freedesktop.ModemManager1' (MSG: FATAL-ERROR: Cannot bind socket: Error binding to address: Address already in use) ** (/home/aleksander/Development/foss/ModemManager/plugins/.libs/lt-test-service-generic:32043): ERROR **: Cannot bind socket: Error binding to address: Address already in use
2016-01-16tests,test-fixture: don't rely on other threads to update dbus propertiesAleksander Morgado
We were wrongly using a main loop in the port context thread to manage the global main context. That was silently making the DBus property notifications kind of work, as they were being updated via another thread, so here we could just sleep() and recheck the property values. Given that having that unrelated thread updating the dbus properties of our MMManager object is not a good thing, we'll instead totally ignore that and fully re-create the MMManager in each iteration with the sync() method, which has its own internal thread.
2016-01-16tests,port-context: properly setup per-thread main contextAleksander Morgado
Instead of creating a new main context to be used in the thread, we were using the global context. So, fix that, and create a totally new pair of main context and main loop to be used within the thread.
2014-11-14tests,port-context: joining thread takes the reference alreadyAleksander Morgado
2014-10-17tests,fixture: fix commentAleksander Morgado
2014-10-05tests: increase timeout for starting ModemManager on test busBen Chan
The timeout for starting ModemManager on the test bus was 3s, which is sufficient under normal conditions. However, when running ModemManager tests on a build infrastructure under a heavy load, we've observed that the timeout isn't always sufficient and that becomes the source of false test failures. This patch increases the timeout to 30s, which shouldn't introduce any unexpected behavior under normnal conditions while addressing the timeout issue on heavily loaded systems.
2014-05-21tests: consistently use spaces for indentationBen Chan
2014-02-14tests: fix array bound checks in process_next_commandBen Chan
This patch fixes the out-of-bounds array accesses in test-port-context.c, which is detected by AddressSanitizer, by checking the index against the array length before accessing the array.
2014-02-13tests: added support for DBus service testsAleksander Morgado
We can now run 'simulated' modems against a ModemManager running in its own session bus.