History log of /bionic/tests/libc_logging_test.cpp
Revision Date Author Comments
b36efa4343d79e3fb548d12d039193850246b892 15-Sep-2016 Josh Gao <jmgao@google.com> Fix instances of '#if __LP64__'.

Triggers -Wundef, which is on in -Weverything.

Bug: http://b/31496165
Change-Id: Ib06107073f7dd1d584c19c222d0430da9d35630b
416d7ddaff0946d480b6aa945a741b3eeaca5569 19-Aug-2014 Elliott Hughes <enh@google.com> Add GNU-compatible strerror_r.

We already had the POSIX strerror_r, but some third-party code defines
_GNU_SOURCE and expects to get the GNU strerror_r instead.

This exposed a bug in the libc internal logging functions where unlike
their standard brethren they wouldn't return the number of bytes they'd
have liked to have written.

Bug: 16243479
Change-Id: I1745752ccbdc569646d34f5071f6df2be066d5f4
b1b60c30bf321c0fc02264b953b5c16c49d34457 26-Jul-2014 Elliott Hughes <enh@google.com> Use vsnprintf(3) in syslog(3).

It seemed like a clever trick to use the internal log message formatting
code in syslog(3), but on reflection that means you can't (for example)
format floating point numbers. This patch switches us over to using good
old vsnprintf(3), even though that requires us to jump through a few hoops.

There's no obvious way to unit test this, so I wrote a little program and
ran that.

Bug: 14292866
Change-Id: I9c83500ba9cbb209b6f496067a91bf69434eeef5
f1e83cc34a58761fc7bc5178c6f283db85d6057a 26-Jul-2014 Elliott Hughes <enh@google.com> Use vsnprintf(3) in syslog(3).

It seemed like a clever trick to use the internal log message formatting
code in syslog(3), but on reflection that means you can't (for example)
format floating point numbers. This patch switches us over to using good
old vsnprintf(3), even though that requires us to jump through a few hoops.

There's no obvious way to unit test this, so I wrote a little program and
ran that.

(cherry-pick of b1b60c30bf321c0fc02264b953b5c16c49d34457.)

Bug: 14292866
Change-Id: I9c83500ba9cbb209b6f496067a91bf69434eeef5
b76613627d045acd3bdb7294f424f14c21584872 22-Jul-2014 Elliott Hughes <enh@google.com> Rewrite syslog(3) to use Android logging.

Since we don't have syslogd on Android and you can't run one on a non-rooted
device, it's more useful if syslog output just goes to the regular Android
logging system.

Bug: 14292866

(cherry picked from commit 3ad8ecb64e9dd5614169232b84a93eb3b8aa32d7)

Change-Id: I3038855ca4f22532bf6d2c45d3f8028b866975f9
3ad8ecb64e9dd5614169232b84a93eb3b8aa32d7 22-Jul-2014 Elliott Hughes <enh@google.com> Rewrite syslog(3) to use Android logging.

Since we don't have syslogd on Android and you can't run one on a non-rooted
device, it's more useful if syslog output just goes to the regular Android
logging system.

Bug: 14292866
Change-Id: Icee7f088b97f88ccbdaf471b98cbac7f19f9210a
f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6d 21-Dec-2013 Christopher Ferris <cferris@google.com> Make sure that the same tests are on all platforms.

In order to be able to generate a list of tests for cts, the same set of
tests must exist across all platforms. This CL adds empty tests where a
test was conditionally compiled out.

This CL creates a single library libBionicTests that includes all of
the tests found in bionic-unit-tests-static.

Also fix a few missing include files in some test files.

Tested by running and compiling the tests for every platform and
verifying the same number of tests are on each platform.

Change-Id: I9989d4bfebb0f9c409a0ce7e87169299eac605a2
925753aa1175ae58b24bbfe2d9e38eb4fe3f579d 18-Oct-2013 Elliott Hughes <enh@google.com> Fix some test assumptions that are wrong for __LP64__.

Change-Id: Ic79cd5858ceb611640a76bd03f3da4925d3150d9
6c7b3cb056509fd8756bc012878a499f6f102114 12-Oct-2013 Stephen Hines <srhines@google.com> Fix clang warnings in bionic.

This fixes a few diverse issues that clang warns on in bionic. First,
it specifies the appropriate converted types for format specifiers.
The "h" and "hh" modifiers specify that the user is passing a short or
char respectively. We were passing int deliberately in both cases and
relying on the compiler to implicitly downcast to the smaller type.
We also remove the non-standard "d" suffix from our double-precision
floating point constant. This is an extension for gcc that clang does
not implement. The third fix is to mark the c1 variable as unused,
since it truly is neither read nor written.

Change-Id: I4793352b9d3e58f1f4cac9e7581ef4b2a70b43c7
8f2a5a0b40fc82126c691d5c30131d908772aab7 15-Mar-2013 Elliott Hughes <enh@google.com> Clean up internal libc logging.

We only need one logging API, and I prefer the one that does no
allocation and is thus safe to use in any context.

Also use O_CLOEXEC when opening the /dev/log files.

Move everything logging-related into one header file.

Change-Id: Ic1e3ea8e9b910dc29df351bff6c0aa4db26fbb58