Lubomir Rintel
4a4f703c94
libnm,dbus-helpers: include glib-compat for g_test_initialized()
2015-05-26 14:17:31 +02:00
Lubomir Rintel
defe992a10
merge: branch 'lr/tap-tests' (bgo #749375 )
...
https://bugzilla.gnome.org/show_bug.cgi?id=749375
2015-05-26 13:52:54 +02:00
Lubomir Rintel
02e3d6c286
tests: don't try to connect to the private socket
...
Even if we're running the tests as root we still want to use the mock
service instead of whatever version of daemon runs on the test host.
2015-05-26 13:51:45 +02:00
Lubomir Rintel
dd959087a2
tests: be a bit more helpful when valgrind tests fail
2015-05-26 13:51:45 +02:00
Lubomir Rintel
6463ce5dd9
tests: use the TAP formatter
...
The test results in standard format are easily integrated into CI systems.
2015-05-26 13:51:45 +02:00
Lubomir Rintel
380ed63318
build: switch to parallel test harness
...
This will make it possible to use the TAP formatter.
2015-05-26 13:51:45 +02:00
Lubomir Rintel
14f4674f64
tests: call g_test_run() even when skipping the test
...
It will return the 77 exit code itself. For TAP output it will also generate
the proper test skip marker.
2015-05-26 13:51:44 +02:00
Lubomir Rintel
d0e25ac8be
tests: always spawn private d-bus
...
Parallel test runs would not be possible without this.
2015-05-26 13:51:44 +02:00
Lubomir Rintel
f627d6db8e
tests: move all asserts into tests
...
Otherwise the TAP formatter would produce a plan-less output.
2015-05-26 13:51:44 +02:00
Beniamino Galvani
a6f5aeeb28
dns: fall back to writing resolv.conf when other methods are not available
...
After commits:
de0d623680
dns: don't fall back to other methods when resolvconf or netconfig fail
e573977b80
dns: allow runtime selection of resolv.conf manager
the method used to write /etc/resolv.conf is specified by a
configuration parameter and NM doesn't try other methods if the chosen
one has not success.
Restore the fallback to the 'none' method if resolvconf or netconfig
executables are not available, so that when the value of 'rc-manager'
is misconfigured the system continues to work properly.
https://bugzilla.gnome.org/show_bug.cgi?id=749286
2015-05-26 13:33:47 +02:00
Cédric Valmary
58ed063c71
po: update Occitan (oc) translation (bgo #749754 )
...
https://bugzilla.gnome.org/show_bug.cgi?id=749754
2015-05-25 11:58:22 +02:00
Thomas Haller
e0d103b1a2
test: include "nm-keyfile-internal.h" for tests under src/
...
Including "nm-keyfile-internal.h" before "nm-test-utils.h" enables
a few useful utilities. If we know that our test uses NetworkManagerUtils.h,
we can always include it -- as we have libnm-core available.
2015-05-20 19:03:47 +02:00
Thomas Haller
89c6abc7ab
libnm/test: include "nm-keyfile-internal.h" in test-general.c
...
This enables special code in "nm-test-utils.h" that is useful
for tests.
2015-05-20 18:39:04 +02:00
Thomas Haller
a915b57876
libnm: fix libnm.ver by putting new symbols into appropriate section
...
Fixes: 019943bb5d
2015-05-20 15:01:11 +02:00
Thomas Haller
d43be83aaa
libnm: enforce that "nm-utils-private.h" header is not used inside src/
...
Let "nm-utils-private.h" and "nm-types.h" conflict.
2015-05-20 12:42:19 +02:00
Thomas Haller
670ca44721
libnm: rename DNSOptionDesc and @dns_option_descs to have an "nm"-prefix
...
Declarations in header files should always have an "nm" related
prefix.
Fixes: 019943bb5d
2015-05-20 12:42:19 +02:00
Thomas Haller
533f9fa2d2
libnm: move internal dns-option helpers to "nm-core-internal.h"
...
"nm-utils-private.h" should not be used outside of libnm-core/.
core/ should only use public API or "nm-core-internal.h".
Also, "nm-setting-ip-config.h" is a public header and should
not contain internal defines. Move them to "nm-core-internal.h"
too.
Fixes: 019943bb5d
2015-05-20 12:42:14 +02:00
Dan Williams
e47eca8761
systemd: fix build with toolchains not exporting CLOCK_BOOTTIME
...
See 123322c6d6
for the NM-side fix. We
need this too for the systemd code.
2015-05-19 16:02:28 -05:00
Dan Williams
c428935d9f
merge: more isolated pieces of dcbw/devices-for-all (bgo #749401 )
2015-05-19 09:28:25 -05:00
Dan Williams
2a7a19e767
core: rearrange some VLAN code and clean up dispose()
...
Move parent-related stuff before its callers and clean up dispose
so that we no longer need priv->disposed.
2015-05-19 09:25:16 -05:00
Dan Williams
5cf226463a
platform: move InfiniBand property reading into the platform and prefer netlink
...
Add a netlink implementation for reading InfiniBand properties, but fall back to
sysfs when that isn't supported by the kernel.
2015-05-19 09:25:16 -05:00
Dan Williams
d4e0a1e8cc
core: earlier software capability detection
...
We need to know whether we can create interfaces of any given
NMDevice subclass or not. So don't rely on just the NMPlatformLink
for that information, because we won't have a platform link for
software devices before we create them.
2015-05-19 09:25:16 -05:00
Dan Williams
81db512997
core: check duplicate devices by interface name not UDI
...
We can't have devices with duplicate interface names so we might
as well use that for dupe checking instead of the (mostly useless)
UDI.
2015-05-19 09:25:16 -05:00
Thomas Haller
652853e0d0
connectivity: use default on missing connectivity.interval config
...
Manual page claims that a missing configuration option for connectivity
interval means "300". That was not the case for a long time (never?).
https://bugzilla.gnome.org/show_bug.cgi?id=723350
Based-on-patch-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com >
2015-05-19 15:34:41 +02:00
Thomas Haller
5b04fde302
config: return internal field directly in nm_config_data_get_connectivity_interval()
...
We already initialize connectivity.interval apprepriately in constructor().
No need to MAX() it again.
2015-05-19 15:29:20 +02:00
Jiří Klimeš
08fbe75edd
libnm: fix nm_vpn_plugin_old_set_connection() for connection == NULL
2015-05-19 14:48:37 +02:00
Jiří Klimeš
dbf1794070
libnm: NMVpnPluginOld: return service name as const string in need_secrets()
2015-05-19 14:48:25 +02:00
Jiří Klimeš
4bab4294a6
libnm: fix NMVpnPluginOld registering VPN service
...
RequestName DBus call takes two agruments:
http://dbus.freedesktop.org/doc/dbus-specification.html#message-bus-names
timeout in g_dbus_proxy_call_sync() can't be 0 because it means literally zero
milliseconds and the call times out.
2015-05-19 14:46:27 +02:00
Thomas Haller
ae0608eef5
config: minor fix in read_entire_config()
...
Calling read_entire_config() without passing a @cli argument would
always have caused an assert due to unset @o_config_main_file.
That is not a real problem as that situation didn't arise. Still
fix it.
2015-05-19 11:59:09 +02:00
Beniamino Galvani
8e46a737db
dns: don't update error when writing private resolv.conf
...
When update_dns() fails, callers expect 'error' argument to point to a
non-NULL error; but we are reusing the same variable when calling
update_resolv_conf() to update the private resolv.conf and thus the
function may return an empty error on failure.
Don't reuse the same error and pass a NULL argument instead, since we
don't care about errors when updating private resolv.conf.
Fixes: 5f9d348c20
2015-05-19 10:38:55 +02:00
Beniamino Galvani
045938074d
dns: accept NULL error argument in update_resolv_conf()
2015-05-19 10:38:52 +02:00
Thomas Haller
046115b588
core: merge branch 'th/keyfile-owner-check-bgo701112'
...
Renable checking owner of keyfile files but disable that
behavior for tests.
For that, add a nm_utils_get_testing() function to core to detect
whether the code is running as part of a test.
https://bugzilla.gnome.org/show_bug.cgi?id=701112
2015-05-19 10:24:37 +02:00
Thomas Haller
9ac4d88ff7
core: replace g_test_initialized() by nm_utils_get_testing()
2015-05-19 09:57:47 +02:00
Thomas Haller
d4dd9ba3cf
keyfile: readd owner check of files (bgo #701112 )
...
Commit 5dc4be54e6
dropped the
owner check for keyfiles to allow running `make check` as root.
Re-add it, but disable the check for tests.
https://bugzilla.gnome.org/show_bug.cgi?id=701112
2015-05-19 09:57:46 +02:00
Thomas Haller
b9d8dc050a
core/tests: add nm_utils_get_testing() function
...
Code that is testable often needs special hooks to work
both for unit-tests and production.
Add a function nm_utils_get_testing() that returns whether
the code is run as part of a unit-test.
For non-testing mode, nm_utils_get_testing() will return
zero (NM_UTILS_TEST_NONE). For unit tests, the test should call
_nm_utils_set_testing() to configure tested functions.
By specifing the @flags attribute, the test can enable/disable
specific behaviors.
https://bugzilla.gnome.org/show_bug.cgi?id=701112
2015-05-19 09:57:46 +02:00
Jiří Klimeš
9b11276d75
merge: add scripts for importing VPN configurations for NM (bgo #744260 )
...
contrib/scripts/nm-import-openvpn
contrib/scripts/nm-import-vpnc
contrib/scripts/nm-import-openconnect
https://bugzilla.gnome.org/show_bug.cgi?id=744260
2015-05-19 09:25:58 +02:00
Jiří Klimeš
466515e953
contrib/scripts: fix importing 'remote' and 'remote-random' options for openvpn
...
see https://bugzilla.redhat.com/show_bug.cgi?id=1194643
2015-05-19 09:21:50 +02:00
Jiří Klimeš
29473f1bc4
contrib/scripts: nm-import-openconnect - script for importing OpenConnect VPN configs to NM
2015-05-19 09:21:50 +02:00
Jiří Klimeš
db0cf1e7f6
contrib/scripts: nm-import-vpnc - script for importing Cisco VPN configs to NM
2015-05-19 09:21:50 +02:00
Jiří Klimeš
1a2798d1a4
contrib/scripts: nm-import-openvpn - script for importing OpenVPN configs to NM
...
Synopsis:
$ nm-import-openvpn -i <infile1> <infile2> ...
$ nm-import-openvpn <infile> <outfile>
Put the file to NetworkManager:
# cp <outfile> /etc/NetworkManager/system-connections/
# chmod 600 /etc/NetworkManager/system-connections/<outfile>
# nmcli con load /etc/NetworkManager/system-connections/<outfile>
2015-05-19 09:21:50 +02:00
Dan Williams
1af8e2f132
examples: add DBus + Python example for starting/stopping a WiFi hotspot
2015-05-18 15:11:12 -05:00
Thomas Haller
eb2efaa228
device: fix wrong assert in NMDeviceFactory
...
nm_device_factory_manager_find_factory_for_link_type()
easily can see a link-type NM_LINK_TYPE_UNKNOWN because
there are many link types that NetworkManager cannot detect.
Just return NULL early.
Fixes: 71bde20c30
2015-05-18 15:20:22 +02:00
Muhammet Kara
9a49fa7fb1
po: update Turkish (tr) translation (bgo #749503 )
...
https://bugzilla.gnome.org/show_bug.cgi?id=749503
2015-05-18 11:58:00 +02:00
Beniamino Galvani
09e216b8ab
ifcfg-rh/tests: add missing file to EXTRA_DIST
...
'ifcfg-test-dns-options' was not included in the archive for
distribution and 'make distcheck' failed. Add it.
2015-05-14 16:55:15 +02:00
Beniamino Galvani
a3b7bc9cc6
dns: merge branch 'bg/dns-options-rh1200131'
...
https://bugzilla.redhat.com/show_bug.cgi?id=1200131
2015-05-13 17:17:06 +02:00
Beniamino Galvani
58236b0ab2
ifcfg-rh: use GLib test functions in new testcases for DNS options
2015-05-13 17:15:35 +02:00
Beniamino Galvani
66e63c1632
ifcfg-rh/tests: add tests for RES_OPTIONS parsing
2015-05-13 17:15:35 +02:00
Beniamino Galvani
a1d76a019e
core: capture DNS options from resolv.conf
2015-05-13 17:15:35 +02:00
Beniamino Galvani
8d9776997b
libnm-core/trivial: rename 'i' function argument to 'idx'
2015-05-13 17:15:34 +02:00
Beniamino Galvani
7467e25593
cli: add support for DNS options
2015-05-13 17:15:34 +02:00