Age | Commit message (Collapse) | Author |
|
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.
|
|
|
|
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
|
|
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.
|
|
|
|
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.
|
|
We can now run 'simulated' modems against a ModemManager running in its own
session bus.
|