Add and use constants for the Android API levels.
Test: bionic tests still pass
Change-Id: If1b619cfc9db1d3f5d91f14f2ace71058dca0c4a
diff --git a/tests/dlext_test.cpp b/tests/dlext_test.cpp
index 8527b00..ed50ea5 100644
--- a/tests/dlext_test.cpp
+++ b/tests/dlext_test.cpp
@@ -1191,10 +1191,9 @@
}
TEST(dlext, dlopen_handle_value_app_compat) {
- android_set_application_target_sdk_version(23);
+ android_set_application_target_sdk_version(__ANDROID_API_M__);
void* handle = dlopen("libtest_dlsym_from_this.so", RTLD_NOW | RTLD_LOCAL);
ASSERT_TRUE(reinterpret_cast<uintptr_t>(handle) % sizeof(uintptr_t) == 0)
<< "dlopen should return valid pointer";
dlclose(handle);
}
-
diff --git a/tests/semaphore_test.cpp b/tests/semaphore_test.cpp
index 7dc7225..24a2dbe 100644
--- a/tests/semaphore_test.cpp
+++ b/tests/semaphore_test.cpp
@@ -188,7 +188,7 @@
TEST(semaphore, sem_wait_no_EINTR_in_sdk_less_equal_than_23) {
#if defined(__BIONIC__)
- android_set_application_target_sdk_version(23U);
+ android_set_application_target_sdk_version(__ANDROID_API_M__);
sem_t s;
ASSERT_EQ(0, sem_init(&s, 0, 0));
ScopedSignalHandler handler(SIGUSR1, sem_wait_test_signal_handler);