Stop defining our own PAGE_SIZE and PAGE_MASK, and test dlclose(3) too.

Also remove an unnecessary #include and a now-obsolete TODO.

Change-Id: I36d923721e349a286934b9534090a67ce0786e7b
This commit is contained in:
Elliott Hughes
2012-11-01 13:49:32 -07:00
parent 0be1819b22
commit 1a6961650c
3 changed files with 12 additions and 22 deletions

View File

@@ -46,6 +46,8 @@ TEST(dlopen, dlsym_in_self) {
gCalled = false;
function();
ASSERT_TRUE(gCalled);
ASSERT_EQ(0, dlclose(self));
}
TEST(dlopen, dlopen_failure) {
@@ -108,6 +110,8 @@ TEST(dlopen, dlsym_failures) {
sym = dlsym(self, "ThisSymbolDoesNotExist");
ASSERT_TRUE(sym == NULL);
ASSERT_SUBSTR("undefined symbol: ThisSymbolDoesNotExist", dlerror());
ASSERT_EQ(0, dlclose(self));
}
TEST(dlopen, dladdr) {
@@ -166,6 +170,8 @@ TEST(dlopen, dladdr) {
// The base address should be the address we were loaded at.
ASSERT_EQ(info.dli_fbase, base_address);
ASSERT_EQ(0, dlclose(self));
}
TEST(dlopen, dladdr_invalid) {