summaryrefslogtreecommitdiffstats
path: root/tests/libc_logging_test.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2014-07-25 20:31:47 -0700
committerElliott Hughes <enh@google.com>2014-07-28 09:43:21 -0700
commitf1e83cc34a58761fc7bc5178c6f283db85d6057a (patch)
treebfdd6078020a74f855f320fbcb87f60de7bd47e6 /tests/libc_logging_test.cpp
parent1a918d9be83013cdc8e194edf35b5295eba4ab1c (diff)
downloadbionic-f1e83cc34a58761fc7bc5178c6f283db85d6057a.zip
bionic-f1e83cc34a58761fc7bc5178c6f283db85d6057a.tar.gz
bionic-f1e83cc34a58761fc7bc5178c6f283db85d6057a.tar.bz2
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
Diffstat (limited to 'tests/libc_logging_test.cpp')
-rw-r--r--tests/libc_logging_test.cpp11
1 files changed, 0 insertions, 11 deletions
diff --git a/tests/libc_logging_test.cpp b/tests/libc_logging_test.cpp
index ef39d1c..950161e 100644
--- a/tests/libc_logging_test.cpp
+++ b/tests/libc_logging_test.cpp
@@ -176,14 +176,3 @@ TEST(libc_logging, lld_LLONG_MIN) {
GTEST_LOG_(INFO) << "This test does nothing.\n";
#endif // __BIONIC__
}
-
-TEST(libc_logging, m) {
-#if defined(__BIONIC__)
- char buf[BUFSIZ];
- errno = EBADF;
- __libc_format_buffer(buf, sizeof(buf), "<%m>");
- EXPECT_STREQ("<Bad file number>", buf);
-#else // __BIONIC__
- GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif // __BIONIC__
-}