summaryrefslogtreecommitdiff
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* tools: add forgotten file to distLubomir Rintel2016-04-231-1/+2
| | | | | Fixes: f15c412015647b378a187bdf98ccf8cd75eb0475 (cherry picked from commit 8280ab69f10b21c999f242b985db0ef81d49776f)
* 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. (cherry picked from commit db6ebe003dd8f96b18824809c3fcecd1390788e5)
* 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.
* test: some refactoring of test-networkmanager-service.pyThomas Haller2015-12-041-46/+43
|
* nmtst/valgrind: allow calling 'run-test-valgrind.sh' script directlyThomas Haller2015-11-241-9/+84
| | | | | | | | | | | | | | | | | | When you want to run valgrind for a test, you either had to invoke valgrind manually, or doing it via `make check` (provided you configured --with-valgrind). Make it more convenient to run valgrind by passing the test to run to the "run-test-valgrind.sh" wrapper. This also allows to pass -p/-s to the test, which is not possible during `make check` because selecting tests conflicts with "--tap". The following invocations are largely equivalent and work as expected: $ ./tools/run-test-valgrind.sh ./src/platform/tests/test-link-linux -p /link/software/detect/vlan $ NMTST_DEBUG=no-debug,p=/link/software/detect/vlan ./tools/run-test-valgrind.sh ./src/platform/tests/test-link-linux
* tests: add a test for connection_compatible() for wired devicesJiří Klimeš2015-09-291-5/+11
| | | | | Allow setting MAC address and S390 subchannels for ethernet devices in testing NM service.
* tools/check-exports.sh: use ${NM} when availableQuentin Glidic2015-09-241-1/+1
| | | | | | | | This way you can export NM to use a prefixed tool https://bugzilla.gnome.org/show_bug.cgi?id=755540 Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
* macros: add NM_BACKPORT_SYMBOL()Dan Winship2015-06-261-3/+1
| | | | | | | | | | | Add a macro to insert the necessary compiler/linker magic to add a copy of an existing symbol to an older version. Also, update check-exports.sh to be able to check for such symbols by listed them commented-out in the appropriate section. [thaller@redhat.com: patch modified] Related: https://bugzilla.gnome.org/show_bug.cgi?id=742993
* valgrind: rework run-test-valgrind.sh script not to print unrelated messageThomas Haller2015-06-041-17/+29
| | | | | | | If the valgrind logfile is empty, don't log an error message with the location of the logfile. Also, if the test didn't fail due to memleaks, log a different message.
* tests: delete the valgrind logs if they're emptyLubomir Rintel2015-06-041-0/+3
|
* tests: don't limit the valgrind tracebacks to 12 framesLubomir Rintel2015-06-041-0/+1
| | | | The glib tracebacks are typically longer.
* tests: avoid calling GLib.IOChannel.unix_new()Lubomir Rintel2015-06-021-1/+1
| | | | | The Ubuntu 12.04 introspection data don't contain it. However, the default constructor works just well and even looks a bit more Python-y.
* test: fix running valgrind tests with NMTST_NO_VALGRINDThomas Haller2015-05-261-1/+1
| | | | Fixes: 6463ce5dd9ffc1aae3ca9ddc4dac4e25fd815237
* tests: be a bit more helpful when valgrind tests failLubomir Rintel2015-05-261-1/+13
|
* tests: use the TAP formatterLubomir Rintel2015-05-261-2/+2
| | | | The test results in standard format are easily integrated into CI systems.
* tests: always spawn private d-busLubomir Rintel2015-05-261-5/+3
| | | | Parallel test runs would not be possible without this.
* tests: allow running tests without valgrind by setting NMTST_NO_VALGRINDThomas Haller2015-02-091-0/+5
| | | | | | | When configuring with --with-valgrind, tests will be invoked via valgrind. That significantly slows down the tests. Allow user to set the environment variable NMTST_NO_VALGRIND to invoke tests directly, even when valgrind was enabled at configure time.
* tests: fail valgrind script if log file is non-emptyth/memleaksThomas Haller2015-02-091-0/+5
|
* libnm/tests: enable valgrind for libnm testsThomas Haller2015-02-091-0/+8
|
* tests: fix valgrind script to handle exit value 77 (skip)Thomas Haller2015-02-061-1/+1
|
* libnm/tests: fix GetAccessPoints() in test-networkmanager-service.py for ↵Thomas Haller2015-01-051-5/+1
| | | | | | | hidden APs There was a bug checking for "if a.ssid():". Refactor the whole line to use a list comprehension.
* libnm/tests: cleanup handling object paths in test-networkmanager-service.pyThomas Haller2015-01-051-9/+9
|
* libnm/tests: fix handling ByteArray in test-networkmanager-service.py for ↵Thomas Haller2015-01-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | Python 3 In Python 3, dbus.ByteArray() must be created using a byte string, while strings obtained via DBUS are unicode strings. This was wrong in WifiAp.__get_props() which broke the test test_wifi_ap_added_removed(). File "/usr/lib/python3.3/site-packages/dbus/service.py", line 707, in _message_cb retval = candidate_method(self, *args, **keywords) File "./NetworkManager/tools/test-networkmanager-service.py", line 102, in GetAll return self._get_dbus_properties(iface) File "./NetworkManager/tools/test-networkmanager-service.py", line 96, in _get_dbus_properties return self.__dbus_ifaces[iface]() File "./NetworkManager/tools/test-networkmanager-service.py", line 315, in __get_props props[PP_SSID] = dbus.ByteArray(self.ssid) TypeError: string argument without an encoding https://bugzilla.gnome.org/show_bug.cgi?id=739448
* build: fix check-exports.sh for ppc64 archThomas Haller2014-12-191-1/+1
| | | | | | | | On ppc64, `nm` reports the exported symbols as 'D' instead of 'T'. This caused `make check` to fail. "D" The symbol is in the initialized data section. "T" The symbol is in the text (code) section.
* build: adjust tools/check-exports.shThomas Haller2014-12-051-13/+44
| | | | | | Now that the version scripts might have different sections, the previous check-exports.sh script no longer works.
* test,examples: fix scripts to avoid 'has_key' for Python 3Thomas Haller2014-10-311-6/+6
| | | | | | 'has_key' on Dictionaries is removed from Python3 in favor of 'in'. Signed-off-by: Thomas Haller <thaller@redhat.com>
* libnm-core, settings: move NMSettingsError to nm-errorsDan Winship2014-10-221-0/+11
| | | | | | | | | Move the definition of NMSettingsError to nm-errors, register it with D-Bus, and verify in the tests that it maps correctly. Remove a few unused error codes, simplify a few others, and rename GENERAL to FAILED and HOSTNAME_INVALID to INVALID_HOSTNAME, for consistency.
* libnm-core, libnm, devices: merge client and daemon NMDeviceErrorDan Winship2014-10-221-0/+9
| | | | | | | | | | | | | | Merge libnm's NMDeviceError and the daemon's NMDeviceError into a single enum (in nm-errors.h). Register the domain with D-Bus, and add a test that the client side decodes it correctly. The daemon's NM_DEVICE_ERROR_CONNECTION_INVALID gets absorbed into libnm's NM_DEVICE_ERROR_INVALID_CONNECTION, and NM_DEVICE_ERROR_UNSUPPORTED_DEVICE_TYPE gets dropped, since it was only returned from one place, which is now using NM_DEVICE_ERROR_FAILED, since (a) it ought to be a "can't happen", and (b) the only caller of that function just logs error->message and then frees the error without ever looking at the code.
* libnm-core, core: register NMConnectionError with D-BusDan Winship2014-10-221-0/+22
| | | | | | Register NMConnectionError with D-Bus on both sides, so that, eg, connection validation failures in the daemon will translate to the correct error codes in the client.
* libnm: add an object-creation-failed testDan Winship2014-10-191-1/+7
|
* tools: add a bit of support for VLANs to test-networkmanager-service.pyDan Winship2014-10-191-6/+40
|
* tools: add a bit more activation support to test-networkmanager-service.pyDan Winship2014-10-191-3/+89
| | | | | Now test-networkmanager-service.py can create ActiveConnections, though they don't actually finish activating.
* tools: fix test-networkmanager-service Settings.ConnectionsDan Winship2014-09-181-2/+5
| | | | The test settings service wasn't exporting a Connections property.
* libnm: add test-secret-agentDan Winship2014-09-091-2/+90
| | | | | | Implement some basic secret agent functionality in test-networkmanager-service.py, and add test-secret-agent to test that NMSecretAgent works as expected.
* libnm-glib/test: fix test failure for test-remote-settings-clientThomas Haller2014-08-081-1/+1
| | | | | | | | | Due to behavioral change of test-networkmanager-service.py, the test /remote_settings/remove_connection fails (test_remove_connection() at test-remote-settings-client.c:318). Fixes: 66a34803293e1012d7a1728d503dd64a1d906366 Signed-off-by: Thomas Haller <thaller@redhat.com>
* libnm: add a test for connection-deleted-while-being-createdDan Winship2014-08-071-0/+17
| | | | | | | Since NMRemoteSettings doesn't announce new connections until it has fetched their properties, it's possible that a connection could get deleted while we're waiting for it to be created. NMRemoteSettings has code to deal with this, so add a test to make sure that it works.
* libnm-glib: make test-networkmanager-service.py automatically exit with its ↵Dan Winship2014-08-011-1/+8
| | | | | | | | | | | | | | | | | | | parent test-nm-client.c and test-remote-settings-client.c were using their own assertion macros so they could kill the test service on assertion failure. Except that some new code didn't get the memo and used the g_assert* macros. Not to mention that sometimes the tests would crash outside of an assertion macro. We can make test-networkmanager-service.py notice that its parent has crashed by opening a pipe between them and taking advantage of the fact that the pipe will be automatically closed if the parent crashes. So then test-networkmanager-service.py just has to watch for that, and exit if the pipe closes. Then that lets us drop the test_assert* macros and just use g_assert* instead.
* tools: move libnm-glib's fake NM service implementations hereDan Winship2014-07-302-0/+888
| | | | | | | | | | Move libnm-glib's test-fake-nm.py and test-remote-settings-service.py to tools/, merge them together into a single program, and fix a few bugs (notably some missing signal emissions in the Settings service). Although they are currently only used by libnm-glib's tests, they are generic enough that they could be used by other code in the future (and in particular, they will be used by libnm's tests as well).
* tools: move debug-helper.py from test/ to tools/Dan Winship2014-07-302-0/+62
|
* tools: dist everythingDan Winship2014-07-301-1/+3
| | | | | Dist run-test-valgrind.sh and test-sudo-wrapper.sh, since they may be of use to people building from tarballs as well.
* tools: remove generate-settings-spec, which is no longer usedDan Winship2014-06-192-481/+1
|