diff options
author | Elliott Hughes <enh@google.com> | 2014-07-21 16:35:24 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2014-07-21 16:56:48 -0700 |
commit | 3ad8ecb64e9dd5614169232b84a93eb3b8aa32d7 (patch) | |
tree | f756f624e7cc5bb019465444881deb6ffbc2dfe6 /tests/libc_logging_test.cpp | |
parent | 1fb90a8aa0086f7e4f7960a5b916b8605a9a3c96 (diff) | |
download | bionic-3ad8ecb64e9dd5614169232b84a93eb3b8aa32d7.zip bionic-3ad8ecb64e9dd5614169232b84a93eb3b8aa32d7.tar.gz bionic-3ad8ecb64e9dd5614169232b84a93eb3b8aa32d7.tar.bz2 |
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
Diffstat (limited to 'tests/libc_logging_test.cpp')
-rw-r--r-- | tests/libc_logging_test.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/libc_logging_test.cpp b/tests/libc_logging_test.cpp index 950161e..ef39d1c 100644 --- a/tests/libc_logging_test.cpp +++ b/tests/libc_logging_test.cpp @@ -176,3 +176,14 @@ 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__ +} |