diff options
| author | Jan Beich <jbeich@FreeBSD.org> | 2017-08-22 13:01:20 +0000 |
|---|---|---|
| committer | Jan Beich <jbeich@FreeBSD.org> | 2017-08-22 13:01:20 +0000 |
| commit | 212056367b28056afc7702fbe11fef0d918cf928 (patch) | |
| tree | 55352d2b91e51ca0f722cf9f1707bebdec74d38c /devel/android-tools-adb/files/patch-base_file__test.cpp | |
| parent | Update to 4.0 (diff) | |
devel/android-tools-{adb,fastboot}: update to 8.0.0.r4 (oreo)
Changes: https://android.googlesource.com/platform/system/core/+log/android-7.1.2_r17..android-8.0.0_r4/adb
Changes: https://android.googlesource.com/platform/system/core/+log/android-7.1.2_r17..android-8.0.0_r4/fastboot
Notes
Notes:
svn path=/head/; revision=448522
Diffstat (limited to 'devel/android-tools-adb/files/patch-base_file__test.cpp')
| -rw-r--r-- | devel/android-tools-adb/files/patch-base_file__test.cpp | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/devel/android-tools-adb/files/patch-base_file__test.cpp b/devel/android-tools-adb/files/patch-base_file__test.cpp new file mode 100644 index 000000000000..91950644efd3 --- /dev/null +++ b/devel/android-tools-adb/files/patch-base_file__test.cpp @@ -0,0 +1,42 @@ +--- base/file_test.cpp.orig 2017-06-20 10:50:27 UTC ++++ base/file_test.cpp +@@ -52,12 +52,20 @@ TEST(file, ReadFileToString_WriteStringToFile_symlink) + ASSERT_EQ(0, unlink(link.path)); + ASSERT_EQ(0, symlink(target.path, link.path)); + ASSERT_FALSE(android::base::WriteStringToFile("foo", link.path, false)); ++#ifdef __linux__ + ASSERT_EQ(ELOOP, errno); ++#else ++ ASSERT_EQ(EMLINK, errno); ++#endif + ASSERT_TRUE(android::base::WriteStringToFile("foo", link.path, true)); + + std::string s; + ASSERT_FALSE(android::base::ReadFileToString(link.path, &s)); ++#ifdef __linux__ + ASSERT_EQ(ELOOP, errno); ++#else ++ ASSERT_EQ(EMLINK, errno); ++#endif + ASSERT_TRUE(android::base::ReadFileToString(link.path, &s, true)); + ASSERT_EQ("foo", s); + } +@@ -131,6 +139,7 @@ TEST(file, RemoveFileIfExist) { + + TEST(file, Readlink) { + #if !defined(_WIN32) ++#ifdef __linux__ + // Linux doesn't allow empty symbolic links. + std::string min("x"); + // ext2 and ext4 both have PAGE_SIZE limits. +@@ -139,6 +148,10 @@ TEST(file, Readlink) { + // in current kernels (and marlin/sailfish where we're seeing this + // failure are still on 3.18, far from current). http://b/33306057. + std::string max(static_cast<size_t>(4096 - 2 - 1 - 1), 'x'); ++#else ++ std::string min(""); ++ std::string max(static_cast<size_t>(1024 - 1), 'x'); ++#endif + + TemporaryDir td; + std::string min_path{std::string(td.path) + "/" + "min"}; |
