Let's always build with tests, regardless of --enable-tests.
If the user builds with --enable-tests=no, we automake the tests
as check_PROGRAMS, which only compiles the tests during `make check`.
Otherwise, we automake them as noinst_PROGRAMS, which builds the
tests regularly as a normal build.
This way, a user who doesn't want to build the tests regularly,
still can build and run them via `make check`.
Had to rename "nm-enum-types.h" because it works badly with
"libnm/nm-enum-types.h". Maybe I could fix that differently,
but duplicate names is anyway error prone.
Note that "nm-core-enum-types.h" is already taken too, so
"nm-src-enum-types.h" it is.
No need to have two test-runners. Combine them, and call tests always
via "tools/run-nm-test.sh".
Yes, this brings an overhead, that we now always invoke the test with
a test wrapper script, also --without-vagrind. Previously, that was only
necessary for libnm tests that require their own D-Bus session.
Later we will do non-recursive Makefiles, thus all tests should have the
same LOG_COMPILER.
The tests were checking that the keyfiles had permission
0600 and there was a check-local target to prepare the permissons
of the tests.
That is inconvenient, and it is unexpected to have a check-local
target for such a case.
Also, the tests were not testing that keyfile reader would
bail out on invalid permissions. So just skip the check for
testing.
Avoid failure
NMPlatformSignalAssert: test-link.c:146, software_add(): failure to accept signal one time: link-changed-changed ifindex 15 (2 times received)
While technically it's already possible to implement a fail-over
mechanism using multiple connections (for example, defining a higher
priority DHCP connection with short DHCP timeout and a lower priority
one with static address), in practice this doesn't work well as we try
to autoactivate each connection 4 times before switching to the next
one.
Introduce a connection.autoconnect-retries property that can be used
to change the number of retries. The special value 0 means infinite
and can be used to try the connection forever. A -1 value means the
global configured default, which is equal to 4 unless overridden.
https://bugzilla.gnome.org/show_bug.cgi?id=763524
We connect signal handlers to devices when they appear, but don't
disconnect the handlers when the manager instance is destroyed. This
can cause crashes as device_ac_changed() is called on an invalid
manager instance.
Disconnect the handlers from dispose().
https://bugzilla.redhat.com/show_bug.cgi?id=1383758
The @assoc_cancellable was never initialized and thus ineffective; fix
this.
Furthermore, we only cancel it in nm_supplicant_interface_disconnect()
as we expect that clients call the function before destroying the
interface. Don't assume this and also cancel it in dispose().
https://bugzilla.redhat.com/show_bug.cgi?id=1383628
Make link domain settings more conventional. If an IP Config only has no
search entries, use domains for search instead otherwise ignore domains.
Also on connections which are never the default, setup the
search/domains as routing-only meaning that only dns queries for those
domains will be done on this link. Prevents quering DNS information for
on-vpn host with other namservers and using the VPN DNS server for host
not on the VPN.
This is also fixes issues with a recent change in systemd-resolved where
links with a routing domain will only be used for those domains, which
meant that the previous strategry with a typical ip configuration (no
search only domains) resulted in no usable name resolution.
Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
https://bugzilla.gnome.org/show_bug.cgi?id=772343