aboutsummaryrefslogtreecommitdiff
path: root/plugins/tests/test-port-context.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.
2016-11-23tests,dbus: check if we're asked to use an abstract socketAleksander Morgado
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,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-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.