diff options
author | Colin Cross <ccross@android.com> | 2022-01-24 18:20:05 -0800 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2022-02-03 16:25:26 -0800 |
commit | 9da85fa4a0f6800e0160d8f9a7a4b6b7df052c30 (patch) | |
tree | 0fa08c959615f70e04bbe40bfe42fa13389a6483 /tests | |
parent | 2a9843fe63a33a5dfa0d02b32dbdd90b2cac617d (diff) | |
download | bionic-9da85fa4a0f6800e0160d8f9a7a4b6b7df052c30.tar.gz |
Export bionic's resolv base64 functions to musl
Musl doesn't provide the resolv b64_* functions, but adb uses them.
Export them from bionic.
Bug: 190084016
Test: m USE_HOST_MUSL=true host-native
Change-Id: I37837e6179a15754d4cbd89e67649df9dea9d9f1
Diffstat (limited to 'tests')
-rw-r--r-- | tests/resolv_test.cpp | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/tests/resolv_test.cpp b/tests/resolv_test.cpp index 44255035e..0cd8e63de 100644 --- a/tests/resolv_test.cpp +++ b/tests/resolv_test.cpp @@ -33,7 +33,6 @@ #include <gtest/gtest.h> TEST(resolv, b64_pton_28035006) { -#if !defined(ANDROID_HOST_MUSL) // Test data from https://groups.google.com/forum/#!topic/mailing.openbsd.tech/w3ACIlklJkI. const char* data = "p1v3+nehH3N3n+/OokzXpsyGF2VVpxIxkjSn3Mv/Sq74OE1iFuVU+K4bQImuVj" @@ -44,33 +43,22 @@ TEST(resolv, b64_pton_28035006) { // incorrectly required an extra byte. http://b/28035006. uint8_t buf[128]; ASSERT_EQ(128, b64_pton(data, buf, sizeof(buf))); -#else - GTEST_SKIP() << "musl doesn't have b64_pton"; -#endif } TEST(resolv, b64_ntop) { -#if !defined(ANDROID_HOST_MUSL) char buf[128]; memset(buf, 'x', sizeof(buf)); ASSERT_EQ(static_cast<int>(strlen("aGVsbG8=")), b64_ntop(reinterpret_cast<u_char const*>("hello"), strlen("hello"), buf, sizeof(buf))); ASSERT_STREQ(buf, "aGVsbG8="); -#else - GTEST_SKIP() << "musl doesn't have b64_ntop"; -#endif } TEST(resolv, b64_pton) { -#if !defined(ANDROID_HOST_MUSL) u_char buf[128]; memset(buf, 'x', sizeof(buf)); ASSERT_EQ(static_cast<int>(strlen("hello")), b64_pton("aGVsbG8=", buf, sizeof(buf))); ASSERT_STREQ(reinterpret_cast<char*>(buf), "hello"); -#else - GTEST_SKIP() << "musl doesn't have b64_pton"; -#endif } TEST(resolv, p_class) { |