summaryrefslogtreecommitdiffstats
path: root/tests/stdio_test.cpp
diff options
context:
space:
mode:
authorCalin Juravle <calin@google.com>2014-05-14 17:07:10 +0100
committerCalin Juravle <calin@google.com>2014-05-15 10:34:06 +0100
commit9b95ea936a72532c3124963312d348c6ee453d78 (patch)
treeb2681f6241fc2750c0ef96e7a31f40fe64a19164 /tests/stdio_test.cpp
parenta6ab968ca0af18d84620a692f76af0d8e857c9c8 (diff)
downloadbionic-9b95ea936a72532c3124963312d348c6ee453d78.zip
bionic-9b95ea936a72532c3124963312d348c6ee453d78.tar.gz
bionic-9b95ea936a72532c3124963312d348c6ee453d78.tar.bz2
Document a known test issue in stdio_test.cpp.
Bug: 13077905 Change-Id: Iab7fc7be0737c732e26cc07ecd7884b3087b51bb
Diffstat (limited to 'tests/stdio_test.cpp')
-rw-r--r--tests/stdio_test.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/stdio_test.cpp b/tests/stdio_test.cpp
index 3194e59..4990582 100644
--- a/tests/stdio_test.cpp
+++ b/tests/stdio_test.cpp
@@ -583,9 +583,11 @@ TEST(stdio, fpos_t_and_seek) {
ASSERT_STREQ("C.UTF-8", setlocale(LC_CTYPE, "C.UTF-8"));
uselocale(LC_GLOBAL_LOCALE);
- // For glibc we need to close and re-open the file in order for fseek to work
- // after using setlocale(LC_CTYPE, "C.UTF-8") and fputwc.
- // TODO: find out if this is expected or a bug in glibc.
+ // In glibc-2.16 fseek doesn't work properly in wide mode
+ // (https://sourceware.org/bugzilla/show_bug.cgi?id=14543). One workaround is
+ // to close and re-open the file. We do it in order to make the test pass
+ // with all glibcs.
+
TemporaryFile tf;
FILE* fp = fdopen(tf.fd, "w+");
ASSERT_TRUE(fp != NULL);