Move disabled test out.
hidl_test must be static so we can't test preloadPassthroughService
here. Instead, the test has been moved to libhidl_test.
Test: libhidl_test, hidl_test
Change-Id: Ib2c85288c3805449101c7ea6f15370eadb13836f
diff --git a/test/hidl_test/hidl_test_client.cpp b/test/hidl_test/hidl_test_client.cpp
index 9c809c1..797d914 100644
--- a/test/hidl_test/hidl_test_client.cpp
+++ b/test/hidl_test/hidl_test_client.cpp
@@ -133,17 +133,6 @@
using ::android::ONEWAY_TOLERANCE_NS;
using std::to_string;
-bool isLibraryOpen(const std::string &lib) {
- std::ifstream ifs("/proc/self/maps");
- for (std::string line; std::getline(ifs, line);) {
- if (line.size() >= lib.size() && line.substr(line.size() - lib.size()) == lib) {
- return true;
- }
- }
-
- return false;
-}
-
template <typename T>
static inline ::testing::AssertionResult isOk(const ::android::hardware::Return<T> &ret) {
return ret.isOk()
@@ -428,20 +417,6 @@
}
};
-// does not work with linker configurations since libs are statically included
-TEST_F(HidlTest, DISABLED_PreloadTest) {
- // in passthrough mode, this will already be opened
- if (mode == BINDERIZED) {
- using android::hardware::preloadPassthroughService;
-
- static const std::string kLib = "android.hardware.tests.inheritance@1.0-impl.so";
-
- EXPECT_FALSE(isLibraryOpen(kLib));
- preloadPassthroughService<IParent>();
- EXPECT_TRUE(isLibraryOpen(kLib));
- }
-}
-
TEST_F(HidlTest, ToStringTest) {
using namespace android::hardware;