Test dlopen with symlinked .so files

Bug: 9741592
Change-Id: I68c59d6f4e690136395c3dc3de13f99ce38de528
diff --git a/tests/dlfcn_test.cpp b/tests/dlfcn_test.cpp
index fc90dd9..1fdecdb 100644
--- a/tests/dlfcn_test.cpp
+++ b/tests/dlfcn_test.cpp
@@ -242,3 +242,11 @@
   void* addr = dlsym(RTLD_NEXT, "fopen");
   ASSERT_TRUE(addr != NULL);
 }
+
+TEST(dlfcn, dlopen_symlink) {
+  void* handle1 = dlopen("libdlext_test.so", RTLD_NOW);
+  void* handle2 = dlopen("libdlext_test_v2.so", RTLD_NOW);
+  ASSERT_TRUE(handle1 != NULL);
+  ASSERT_TRUE(handle2 != NULL);
+  ASSERT_EQ(handle1, handle2);
+}