NetworkManager/src/platform/tests
Thomas Haller a2d59f5f10 platform: add buffer argument to platform to-string functions
Arguably, it is more convenient to use the static buffer as
it saves typing.

But having such a low-level function use a static buffer also
limits the way how to use it. As it was, you could not avoid
using the static buffer.

E.g. you cannot do:

  char buf[100];

  _LOGD ("nmp-object: %s; platform-link: %s",
         nmp_object_to_string (nmpobj, buf, sizeof(buf)),
         nm_platform_link_to_string (link));

This will fail for non-obvious reasons because both
to-string functions end up using the same static buffer.

Also change the to-string implementations to accept NULL
as valid and return it as "(null)".

https://bugzilla.gnome.org/show_bug.cgi?id=756427
2015-11-01 17:28:08 +01:00
..
.gitignore platform: add nmp-object.h file 2015-06-17 11:23:51 +02:00
dump.c platform: add buffer argument to platform to-string functions 2015-11-01 17:28:08 +01:00
Makefile.am build: extract version macros from "nm-version.h" to new header file "nm-version-macros.h" 2015-09-30 23:10:29 +02:00
monitor.c all: make use of new header file "nm-default.h" 2015-08-05 15:32:40 +02:00
platform.c platform: properly handle peer-address for IPv4 addresses 2015-10-14 12:52:07 +02:00
test-address.c platform/test: add test adding IPv4 addresses that only differ by their peer-address 2015-10-14 16:16:21 +02:00
test-cleanup.c platform: refactor order of peer-address argument in ip_address_add() function 2015-10-14 12:52:07 +02:00
test-common.c test: don't fail if setting /sys as a slave mount doesn't succeed 2015-10-31 22:38:24 +01:00
test-common.h platform/test: add test adding IPv4 addresses that only differ by their peer-address 2015-10-14 16:16:21 +02:00
test-general.c platform: add buffer argument to platform to-string functions 2015-11-01 17:28:08 +01:00
test-link.c platform/test: add test adding IPv4 addresses that only differ by their peer-address 2015-10-14 16:16:21 +02:00
test-nmp-object.c platform/trivial: rename "auto_nmp_obj" macro to "nm_auto_nmpobj" 2015-10-20 14:43:54 +02:00
test-route.c platform/test: introduce _LOGD() macros to fake platform and platform tests 2015-09-04 11:06:26 +02:00