960c8a88c83c55c21a3286628591a41d2fb42231 |
|
28-Oct-2016 |
mukesh agrawal <quiche@google.com> |
Os: add Nanosleep() Add Nanosleep(), so that upper layers of wifilogd can briefly suspend execution after a transient error. Bug: 32454491 Test: ./runtest.sh (on angler) Change-Id: I85e95ddf4139ae10ab95a40c46ed2a424e2a28ad
/system/connectivity/wifilogd/os.h
|
a5bb08c1cf8a8d1ff097fa7a050d7787e9821c6a |
|
26-Oct-2016 |
mukesh agrawal <quiche@google.com> |
Os: add GetControlSocket() Add the GetControlSocket() method to Os, and add unit tests for the same. A "control socket" is a service-specific socket created by the init daemon, to enable other processes to talk to a given service. Bug: 32446680 Test: ./runtests.sh (on angler) Change-Id: I25ea54f8ab85fafd492ec2953e4e369d64ecd02d
/system/connectivity/wifilogd/os.h
|
d75fd9e9b73995a6303ae99977ab1baf9db9b42f |
|
27-Oct-2016 |
mukesh agrawal <quiche@google.com> |
Os: add ReceiveDatagram Add a wrapper for recv(), which reads one datagram from a socket. Add unit tests for the same. While there: - add NONNULL annotation to the |buf| argument of Os::Write() - add some more tests for Os::Write() - replace an instance of EBADFD with EBADF (the two errors are not necessarily the same, and the documentation for write() talks about EBADF, not EBADFD.) - remove unnecessary ON_CALL in a test (in WriteWithOverlyLargeBufferCausesDeath, we expect to abort before calling RawOs::Write()) Bug: 32447384 Test: ./runtests.sh (on angler) Change-Id: I1a8b7e94d415d5f63a2ccc842d292c6c65b85b09
/system/connectivity/wifilogd/os.h
|
cc8458a847dafc8be2ce5de5a0e39a292780e6d5 |
|
07-Oct-2016 |
mukesh agrawal <quiche@google.com> |
CommandProcessor: add fd argument to ProcessInput() Various commands (such as commands which request a log dump, or which write a blob to the log) will need to provide a file descriptor argument. Accordingly, we revise ProcessInput(), to support such an argument. Add tests that verify that a provided FD argument is closed when ProcessInput() returns. As noted in the test implementation, these tests aren't truly unit tests. But they're the best we can reasonably do, given how unique_fd works. Along the way: rename ProcessInput() to ProcessCommand(). The new name is more consistent with various bits of documentation (comments and type names). Bug: 32093334 Test: ./runtests.sh Change-Id: Ib5845dc4ec13d10564894c4dbe7b486e3351ed22
/system/connectivity/wifilogd/os.h
|
b8f8f6ab38fe147fa7aed5cdd9f9ce0e5a3a2e2f |
|
07-Oct-2016 |
mukesh agrawal <quiche@google.com> |
Os: add Write() method If we're going to dump log messages, we need to be able to write to a file descriptor. Plumb up write(), via Os::Write(). Bug: 31997280 Test: ./runtests.sh Change-Id: I0ebdf2f33dd1f458116e9bbf51ae82e51d107d42
/system/connectivity/wifilogd/os.h
|
ec533e0f59b7e88bac734d538f596ab095bc74ca |
|
01-Oct-2016 |
mukesh agrawal <quiche@google.com> |
add OS abstraction Add the Os class, which abstracts the clock_gettime() call. (Additionally methods will be added over time.) Additionally: - Add the MockOs class, so that other classes can be tested in isolation from the underlying system. - Add the RawOs class, to test the logic within the Os class itself. - Add unit tests for the Os class. Bug: 31862754 Test: ./runtests.sh (on bullhead) Change-Id: Ic40e09439966d74b1e470bcfd66d8c8e74157137
/system/connectivity/wifilogd/os.h
|