summaryrefslogtreecommitdiff
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* python: make dbus, gi examples, and debug-helper.py python3 readyYifan J2017-12-041-5/+5
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=791121
* tools: fix the PowerPC buildLubomir Rintel2017-06-281-1/+1
| | | | | | | | On ppc archtecture the "nm_bt_vtable_network_server" symbol in the small objects section instead of .bss, represencted by a "S" letter. Also include "G" which is an equivalent thing for initialized data. We don't seem to have such objects at the moment, but when we do it could result in a nasty surprise.
* build: fix nm binutils tool when building with LTOThomas Haller2017-06-011-1/+1
| | | | | | | | | | | | | | | | | | | | | When building with -flto, we need to use linker plugins. In case of binutils' nm, it means to prefer gcc-nm if available. Like for ranlib and ar, prefer gcc-nm. - replace AC_PATH_TOOL() by AC_CHECK_TOOLS(). That is consistent with what we do for ar,ranlib and suggested on bgo#783311. - instead of using the variable $BINUTILS_NM, replace it by $NM, which is more common according to bgo#783311. - Keep recognizing $BINUTILS_NM environment, which was introduced by commit 8bc88bcc7c. This is purely to keep previous build scripts working. Originally I named it "$BINUTILS_NM" because using $NM in NetworkManager seemed confusing. But well... https://bugs.gentoo.org/show_bug.cgi?id=620052 https://bugzilla.gnome.org/show_bug.cgi?id=782525 https://bugzilla.gnome.org/show_bug.cgi?id=783311
* tests: accept trailing arguments to "tools/run-nm-test.sh"Thomas Haller2017-03-021-3/+11
| | | | | | | | | | | | | | | | | | | | | | | Previously, the test runner would only accept leading options, an optional "--" separator, followed by "$TEST" and optional arguments for the test. Like ./tools/run-nm-test.sh -m src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh That is annoying, because to toggle an option you have to seek the curser in the before the test name. Now, accept a "--test" option, so that the above can be done with trialing arguments: ./tools/run-nm-test.sh -t src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh -m However, the arguments for the tests still must come last: ./tools/run-nm-test.sh -m [--] src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh -p /settings/plugins/ifcfg-rh/bridge/write-master ./tools/run-nm-test.sh -t src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh -m [--] -p /settings/plugins/ifcfg-rh/bridge/write-master
* tests: fix "tools/run-nm-test.sh" to build test firstThomas Haller2017-03-021-8/+8
| | | | | | | | ./tools/run-nm-test.sh -m src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh makes the test before running it. However, that failed if the test didn't exist already. Reorder the code so that we always try to make the test before trying to run it.
* tools: only consider SOs that exist when finding symbols to exportLubomir Rintel2017-02-161-3/+4
| | | | | Also, set pipefail to catch the failures of all components of a pipeline.
* build: allow configuring path to binutils's nm tool during buildThomas Haller2017-02-081-1/+1
| | | | | | | `nm` is used by "tools/create-exports-NetworkManager.sh" script. Alloc configuring an explicit path during configure. BINUTILS_NM=/usr/bin/nm ./configure
* docs: fix handling enums without explicit numeric value in ↵Thomas Haller2017-01-041-2/+5
| | | | | | | | | | | | | | | | | "tools/enums-to-docbook.pl" Previously, an enum that didn't explicitly specify a numeric value would wrongly start counting at 1. E.g. typedef enum { MY_VAL, } Name; would result in documentation with MY_VAL=1. https://bugzilla.gnome.org/show_bug.cgi?id=776848
* build: remove "src/NetworkManager.ver-orig"Thomas Haller2016-12-181-2/+0
| | | | | | Generating "src/NetworkManager.ver" each time seems to work well. Thus, src/NetworkManager.ver-orig is unused an gets easily out of date. Just remove it. It's not useful anymore.
* tests: improve run-nm-test.sh to weak valgrind usageThomas Haller2016-12-141-29/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | - also when called from makefile, allow enabling valgrind even if it was not enabled via configure option. That is, even if you configured --without-valgrind, you can run tests via `NMTST_USE_VALGRIND=1 make check`. Previously, there was no way to run on valgrind during `make check` unless you also had configured --with-valgrind. - Use $NMTST_VALGRIND variable to override the valgrind path. This now always takes precedence. For `make check`, the path can be determined by the configure script. If all unspecified, as last fallback "valgrind" is searched in the current $PATH. - Allow to specify the suppressions file via $NMTST_SUPPRESSIONS. If unset, fall back to the default. The default during `make check` is determined by the configure options. The default for manual invocation is our one valgrind.suppressions file. To use no suppressions file, set NMTST_SUPPRESSIONS to empty. Now, regardless of what you enabled during ./configure, you can overwrite it via: $ NMTST_USE_VALGRIND=1 \ NMTST_VALGRIND=~/bin/valgrind \ NMTST_SUPPRESSIONS=my-suppressions \ make check
* libnm: implement support for DNS manager propertiesBeniamino Galvani2016-12-121-1/+36
|
* ppp: split ppp manager into a pluginBeniamino Galvani2016-12-061-1/+3
| | | | | | | | Moving the PPP manager to a separate plugin that is loaded when needed has the advantage of slightly reducing memory footprint and makes it possible to install the PPP support only where needed. https://bugzilla.gnome.org/show_bug.cgi?id=773482
* tools: add test script to build various configurationsThomas Haller2016-11-241-0/+59
| | | | Script to schedule out-of-tree builds
* build: generate src/NetworkManager.ver during buildThomas Haller2016-11-102-1/+12
| | | | | | | | | | This adds 0.4 seconds to the build time. You can disable it by setting $NM_BUILD_NO_CREATE_EXPORTS environment variable. This is useful in the unexpected case that the script is broken. Or, if you just want to use a different, non-generated version-script. Or, if you want to save 0.4 seconds build-time.
* build: don't change directory in tools/create-exports-NetworkManager.shThomas Haller2016-11-101-1/+6
| | | | | We shall call it from the makefile, thus the current directory is $(top_builddir), which is just what we need.
* build: improve tools/create-exports-NetworkManager.sh scriptThomas Haller2016-11-101-6/+3
| | | | | | | - include symbols from the "B" section. - improve the script, to use libNetworkManager.a instead of the NetworkManager binary. The former is before stripping symbols.
* libnm/tests: add restart method to the manager mock test support interfaceLubomir Rintel2016-11-101-2/+7
|
* libnm/tests: add object manager mockLubomir Rintel2016-11-101-1/+52
|
* libnm/tests: turn all mock objects into ExportedObjsLubomir Rintel2016-11-101-32/+23
| | | | This way they will all be able to register with the ObjectManager mock.
* libnm/tests: only init the exported obj when the interfaces are in placeLubomir Rintel2016-11-101-22/+27
| | | | | When we have the ObjectManager mock, this allows it to emit correct InterfacesAdded signal when the ExportedObj is initialized.
* libnm/tests: correct vlan id type in vlan device mockLubomir Rintel2016-11-101-1/+1
|
* libnm/tests: notify of changing active-connections in manager mockLubomir Rintel2016-11-101-0/+1
|
* libnm/tests: emit standard properties changed signals from mock objectsLubomir Rintel2016-11-101-0/+5
|
* tests: fix run-nm-test.sh to use valgrind when --called-from-makeThomas Haller2016-11-101-8/+24
| | | | Fixes: dbafd2ce5094a9754df2c604a1bedc838fe334f2
* tools: fix the create-exports script on 32-bitLubomir Rintel2016-11-061-1/+1
|
* tools: improve handling arguments to run-nm-test.shThomas Haller2016-11-011-13/+31
| | | | | | | - add _is_true function so that user can set argument environment variables to yes|y|1 etc. - fix NMTST_CHANGE_DIRECTORY
* tools: improve --make-first option of test runner to handle relative test pathsThomas Haller2016-11-011-8/+12
| | | | | | | | | | | | With --make-first|-m we first call `make` on the test. However, the make path must be a relative path rooted in the top directory. Make sure we `cd` into the parent directory first and pass the proper make path. cd src ../tools/run-nm-test.sh -m settings/plugins/ifcfg-rh/tests/test-ifcfg-rh
* tools: add option to test runner to build test before running itThomas Haller2016-11-011-2/+11
| | | | ./tools/run-nm-test.sh -m src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh
* tools: improve controlling whether to run run-nm-test.sh with valgrindThomas Haller2016-11-011-8/+21
| | | | | | Use new environment variable NMTST_USE_VALGRIND. It works both from `make check` and during explicit invocation of the test runner.
* build: merge "tools/Makefile.am" into toplevel MakefileThomas Haller2016-10-191-8/+0
|
* build: merge "libnm/tests/Makefile.am" into toplevel MakefileThomas Haller2016-10-191-18/+22
|
* tests: combine "run-test-valgrind.sh" and "run-test-dbus-session.sh" in ↵Thomas Haller2016-10-193-14/+23
| | | | | | | | | | | | | | "run-nm-test.sh" 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.
* tools/trivial: replace tabs from "tools/run-test-valgrind.sh" scriptThomas Haller2016-10-191-41/+41
|
* tools: fix starting tests with D-Bus session with NMTST_NO_VALGRIND=1Thomas Haller2016-10-191-0/+1
| | | | | | | | | When running NMTST_NO_VALGRIND=1 make check -j we would not start separate D-Bus sessions, thus running tests with valgrind enabled failed.
* tools: dist "tools/create-exports-NetworkManager.sh"Thomas Haller2016-10-171-0/+1
| | | | It's also used by contrib/rpm's SPEC file.
* build: explicitly whitelist symbols in NetworkManager binaryThomas Haller2016-10-131-0/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - this allows the linker to drop unused symbols via link-time optimization or with --gc-sections: git clean -fdx ./autogen.sh --enable-ld-gc --enable-ifcfg-rh --enable-ifupdown \ --enable-ifnet --enable-ibft --enable-teamdctl --enable-wifi \ --with-modem-manager-1 --with-ofono --with-more-asserts \ --with-more-logging make -j20 strip ./src/NetworkManager gives 2822840 vs. 2625960 bytes (-7%). - this also gives more control over the symbols that are used by the plugins. Yes, it means if you modify a plugin to use a new symbols, you have to extend NetworkManager.ver file. You can run the script to create the version file: $ ./tools/create-exports-NetworkManager.sh update but be sure that your current configuration enables all plugins and debugging options to actually use all symbols that are in use. - If you compile with certain plugins enabled, you could theoretically re-compile NetworkManager to expose less symbols. Try: $ ./tools/create-exports-NetworkManager.sh build - note that we have `make check` tests to ensure that all used symbols of the plugins can be found. So, it should not be possible to accidentally forget to expose a symbol.
* manager: add Reload() D-Bus commandThomas Haller2016-06-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new Reload D-Bus command to reload NetworkManager configuration. For now, this is like sending SIGHUP to the process. There are several advantages here: - it is guarded via PolicyKit authentication while signals can only be sent by root. - the user can wait for the reload to be complete instead of sending an asynchronous signal. For now, we operation completes after nm_config_reload() returns, but later we could delay the response further until specific parts are fully reloaded. - SIGHUP reloads everything including re-reading configuration from disk while SIGUSR1 reloads just certain parts such as writing out DNS configuration anew. Now, the Reload command has a flags argument which is more granular in selecting parts which are to be reloaded. For example, via signals the user can: 1) send SIGUSR1: this writes out the DNS configuration to resolv.conf and possibly reloads other parts without re-reading configuration and without restarting the DNS plugin. 2) send SIGHUP: this reloads configuration from disk, writes out resolv.conf and restarts the DNS plugin. There is no way, to only restart the DNS plugin without also reloading everything else.
* libnm: implement missing NM_AUTH_PERMISSION_SETTINGS_MODIFY_GLOBAL_DNSThomas Haller2016-06-011-1/+3
|
* tools: add forgotten file to distLubomir Rintel2016-04-231-1/+2
| | | | Fixes: f15c412015647b378a187bdf98ccf8cd75eb0475
* docs: include the D-Bus enums reference with the API documentationLubomir Rintel2016-04-221-0/+198
| | | | | | Otherwise the types links would be dangling or resolved to slightly irrelevant documentation in libnm or completely irrelevant documentation in libnm-util.
* docs: replace spec.html with docbook D-Bus API referenceLubomir Rintel2016-03-262-692/+0
| | | | | | May use a lot of improvement (actually documenting the names and objects that use the interfaces in question), but at least this looks a lot better on developer.gnome.org.
* tests: fix test-networkmanager-service.py for Python 3 incompatibilityJan Tojnar2016-03-131-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=763544
* platform: add network namespace support to platformThomas Haller2016-03-071-0/+8
| | | | | | | | | | | | | | | | | | | Add a new NMPNetns class. This allows creation, deletion and switching of network namespaces. The API only offers push/pop operations to switch the namespace. This way the API enforces the user to always restore the previous namespace. A NMPlatform instance not only uses the netlink socket, but also sysfs, udev, ethtool, mii. Still, a NMPlatform instance lives entirely inside one namespace and is not spanning multiple namespaces. To properly support network namespaces, the platform instance must switch the namespace as necessary, transparent to the caller. Udev is only supported in the main namespace. For now, network namespaces are not actually used and are disabled via the NM_PLATFORM_NETNS_SUPPORT argument. https://bugzilla.gnome.org/show_bug.cgi?id=762408
* tests: fix bashism in run-test-dbus-session.shMichael Biebl2016-03-031-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=762940
* tests: use dbus-run-session for tools/run-test-valgrind.shThomas Haller2016-01-221-3/+8
|
* tests: allow fallback to dbus-launch in case dbus-run-session is not availableThomas Haller2016-01-221-0/+7
| | | | Like on Ubuntu 12.04 which is currently used by our Travic CI setup.
* tests: move common dbus test-runners to tools/ directoryThomas Haller2016-01-222-0/+4
|
* libnm/tests: extend handling connections in python test serviceThomas Haller2015-12-261-11/+79
|
* tests/valgrind: rename name of logfile for valgrind runThomas Haller2015-12-051-1/+1
| | | | | | | | | Change the name of the file where to store the results of the valgrind run. Previously the file had a prefix "valgrind-", which is inconvinient. Instead, have the file using the same name as the test executable, with a ".valgrind-log" suffix.
* libnm/libnm-glib: add NMClient.get_all_devices() method and AllDevices propertyDan Williams2015-12-041-0/+8
| | | | | Mirror new NetworkManager API to return both real devices and device placeholders.