zephyr/tests
Paul Sokolovsky 25307d5331 net: net_pkt_append: Refactor to return length of data actually added
For stream-based protocols (TCP), adding less data than requested
("short write") is generally not a problem - the rest of data can
be sent in the next packet. So, make net_pkt_append() return length
of written data instead of just bool flag, which makes it closer
to the behavior of POSIX send()/write() calls.

There're many users of older net_pkt_append() in the codebase
however, so net_pkt_append_all() convenience function is added which
keeps returning a boolean flag. All current users were converted to
this function, except for two:

samples/net/http_server/src/ssl_utils.c
samples/net/mbedtls_sslclient/src/tcp.c

Both are related to TLS and implement mbedTLS "tx callback", which
follows POSIX short-write semantics. Both cases also had a code to
workaround previous boolean-only behavior of net_pkt_append() - after
calling it, they measured length of the actual data added (but only
in case of successful return of net_pkt_append(), so that didn't
really help). So, these 2 cases are already improved.

Jira: ZEP-1984

Change-Id: Ibaf7c029b15e91b516d73dab3612eed190ee982b
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2017-04-28 15:01:09 +03:00
..
benchmarks x86: exception-assisted panic/oops support 2017-04-22 10:31:49 -04:00
bluetooth tests: convert to using newly introduced integer sized types 2017-04-21 09:53:49 -05:00
booting/stub
compliance
crypto tests: convert to using newly introduced integer sized types 2017-04-21 09:53:49 -05:00
drivers x86: exception-assisted panic/oops support 2017-04-22 10:31:49 -04:00
include tests: convert to using newly introduced integer sized types 2017-04-21 09:53:49 -05:00
kernel samples: tickless: Enables tickless kernel option in some apps 2017-04-27 13:46:33 +00:00
lib/json Introduce new sized integer typedefs 2017-04-20 16:07:08 +00:00
net net: net_pkt_append: Refactor to return length of data actually added 2017-04-28 15:01:09 +03:00
power samples: power: Time is passed as milliseconds in tickless kernel 2017-04-27 13:46:35 +00:00
subsys tests/ztest: rename assert macros to be zephyr specific 2017-04-13 21:17:33 +00:00
unit tests: convert to using newly introduced integer sized types 2017-04-21 09:53:49 -05:00
ztest kernel: expose struct k_thread implementation 2017-04-26 16:29:06 +00:00
Kconfig
Makefile
Makefile.test
defaults.tc