summaryrefslogtreecommitdiff
path: root/tests/stdio_test.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2016-02-03 11:24:28 -0800
committerElliott Hughes <enh@google.com>2016-02-03 11:24:28 -0800
commitf226ee59e0effedeabed09e2d65be7fa7499cc25 (patch)
tree60b192388b5575a5315d7e9ea2b5b4ffa29ed59f /tests/stdio_test.cpp
parenta279324094d748b97201412b2457d2f6e26287dd (diff)
Add fopen64/freopen64/tmpfile64 aliases.
Our fopen/freopen/tmpfile are already always O_LARGEFILE, but let's add the aliases for _LARGEFILE_SOURCE compatibility. Bug: http://b/24807045 Change-Id: I5d99b3ef3c9f27ce70f13313f6a92e96c7f21f80
Diffstat (limited to 'tests/stdio_test.cpp')
-rw-r--r--tests/stdio_test.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/stdio_test.cpp b/tests/stdio_test.cpp
index 0d21dec57..2912be4aa 100644
--- a/tests/stdio_test.cpp
+++ b/tests/stdio_test.cpp
@@ -79,6 +79,12 @@ TEST(STDIO_TEST, tmpfile_fileno_fprintf_rewind_fgets) {
fclose(fp);
}
+TEST(STDIO_TEST, tmpfile64) {
+ FILE* fp = tmpfile64();
+ ASSERT_TRUE(fp != nullptr);
+ fclose(fp);
+}
+
TEST(STDIO_TEST, dprintf) {
TemporaryFile tf;
@@ -875,6 +881,14 @@ TEST(STDIO_TEST, freopen_CLOEXEC) {
fclose(fp);
}
+TEST(STDIO_TEST, fopen64_freopen64) {
+ FILE* fp = fopen64("/proc/version", "r");
+ ASSERT_TRUE(fp != nullptr);
+ fp = freopen64("/proc/version", "re", fp);
+ ASSERT_TRUE(fp != nullptr);
+ fclose(fp);
+}
+
// https://code.google.com/p/android/issues/detail?id=81155
// http://b/18556607
TEST(STDIO_TEST, fread_unbuffered_pathological_performance) {