EXPECT_GT(_POSIX_THREAD_DESTRUCTOR_ITERATIONS, 0);
EXPECT_EQ(_POSIX_THREAD_KEYS_MAX, 128);
EXPECT_EQ(_POSIX_VERSION, _POSIX_THREAD_PRIORITY_SCHEDULING);
- EXPECT_EQ(_POSIX_VERSION, _POSIX_THREAD_PRIO_INHERIT);
- EXPECT_EQ(_POSIX_VERSION, _POSIX_THREAD_PRIO_PROTECT);
+ EXPECT_EQ(-1, _POSIX_THREAD_PRIO_INHERIT);
+ EXPECT_EQ(-1, _POSIX_THREAD_PRIO_PROTECT);
EXPECT_EQ(-1, _POSIX_THREAD_ROBUST_PRIO_PROTECT);
EXPECT_EQ(_POSIX_VERSION, _POSIX_THREAD_SAFE_FUNCTIONS);
EXPECT_EQ(-1, _POSIX_THREAD_SPORADIC_SERVER);
#endif // defined(__BIONIC__)
}
-#define VERIFY_SYSCONF_NOT_SUPPORT(name) VerifySysconf(name, #name, [](long v){return v == -1;})
+#define VERIFY_SYSCONF_UNSUPPORTED(name) VerifySysconf(name, #name, [](long v){return v == -1;})
// sysconf() means unlimited when it returns -1 with errno unchanged.
#define VERIFY_SYSCONF_POSITIVE(name) \
VERIFY_SYSCONF_POSITIVE(_SC_OPEN_MAX);
VERIFY_SYSCONF_POSITIVE(_SC_PASS_MAX);
VERIFY_SYSCONF_POSIX_VERSION(_SC_2_C_BIND);
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_2_FORT_DEV);
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_2_FORT_RUN);
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_2_UPE);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_2_FORT_DEV);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_2_FORT_RUN);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_2_UPE);
VERIFY_SYSCONF_POSITIVE(_SC_JOB_CONTROL);
VERIFY_SYSCONF_POSITIVE(_SC_SAVED_IDS);
VERIFY_SYSCONF_POSIX_VERSION(_SC_VERSION);
VERIFY_SYSCONF_POSIX_VERSION(_SC_THREAD_ATTR_STACKADDR);
VERIFY_SYSCONF_POSIX_VERSION(_SC_THREAD_ATTR_STACKSIZE);
VERIFY_SYSCONF_POSIX_VERSION(_SC_THREAD_PRIORITY_SCHEDULING);
- VERIFY_SYSCONF_POSIX_VERSION(_SC_THREAD_PRIO_INHERIT);
- VERIFY_SYSCONF_POSIX_VERSION(_SC_THREAD_PRIO_PROTECT);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_THREAD_PRIO_INHERIT);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_THREAD_PRIO_PROTECT);
VERIFY_SYSCONF_POSIX_VERSION(_SC_THREAD_SAFE_FUNCTIONS);
VERIFY_SYSCONF_POSITIVE(_SC_NPROCESSORS_CONF);
VERIFY_SYSCONF_POSITIVE(_SC_NPROCESSORS_ONLN);
VERIFY_SYSCONF_POSITIVE(_SC_PHYS_PAGES);
VERIFY_SYSCONF_POSITIVE(_SC_AVPHYS_PAGES);
VERIFY_SYSCONF_POSIX_VERSION(_SC_MONOTONIC_CLOCK);
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_2_PBS);
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_2_PBS_ACCOUNTING);
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_2_PBS_CHECKPOINT);
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_2_PBS_LOCATE);
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_2_PBS_MESSAGE);
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_2_PBS_TRACK);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_2_PBS);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_2_PBS_ACCOUNTING);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_2_PBS_CHECKPOINT);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_2_PBS_LOCATE);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_2_PBS_MESSAGE);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_2_PBS_TRACK);
VERIFY_SYSCONF_POSIX_VERSION(_SC_CLOCK_SELECTION);
VERIFY_SYSCONF_POSITIVE(_SC_HOST_NAME_MAX);
VERIFY_SYSCONF_POSIX_VERSION(_SC_IPV6);
VERIFY_SYSCONF_POSIX_VERSION(_SC_READER_WRITER_LOCKS);
VERIFY_SYSCONF_POSITIVE(_SC_REGEXP);
VERIFY_SYSCONF_POSITIVE(_SC_SHELL);
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_SPORADIC_SERVER);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_SPORADIC_SERVER);
VERIFY_SYSCONF_POSITIVE(_SC_SYMLOOP_MAX);
VERIFY_SYSCONF_POSIX_VERSION(_SC_THREAD_CPUTIME);
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_THREAD_SPORADIC_SERVER);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_THREAD_SPORADIC_SERVER);
VERIFY_SYSCONF_POSIX_VERSION(_SC_TIMEOUTS);
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_TRACE);
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_TRACE_EVENT_FILTER);
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_TRACE_EVENT_NAME_MAX);
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_TRACE_INHERIT);
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_TRACE_LOG);
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_TRACE_NAME_MAX);
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_TRACE_SYS_MAX);
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_TRACE_USER_EVENT_MAX);
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_TYPED_MEMORY_OBJECTS);
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_XOPEN_STREAMS);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_TRACE);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_TRACE_EVENT_FILTER);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_TRACE_EVENT_NAME_MAX);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_TRACE_INHERIT);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_TRACE_LOG);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_TRACE_NAME_MAX);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_TRACE_SYS_MAX);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_TRACE_USER_EVENT_MAX);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_TYPED_MEMORY_OBJECTS);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_XOPEN_STREAMS);
#if defined(__LP64__)
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_V7_ILP32_OFF32);
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_V7_ILP32_OFFBIG);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_V7_ILP32_OFF32);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_V7_ILP32_OFFBIG);
VERIFY_SYSCONF_POSITIVE(_SC_V7_LP64_OFF64);
VERIFY_SYSCONF_POSITIVE(_SC_V7_LPBIG_OFFBIG);
#else
VERIFY_SYSCONF_POSITIVE(_SC_V7_ILP32_OFF32);
#if defined(__BIONIC__)
// bionic does not support 64 bits off_t type on 32bit machine.
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_V7_ILP32_OFFBIG);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_V7_ILP32_OFFBIG);
#endif
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_V7_LP64_OFF64);
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_V7_LPBIG_OFFBIG);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_V7_LP64_OFF64);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_V7_LPBIG_OFFBIG);
#endif
#if defined(__BIONIC__)
// Tests can only run on bionic, as bionic and glibc have different support for these options.
// Below options are not supported on bionic yet.
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_ASYNCHRONOUS_IO);
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_BARRIERS);
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_MESSAGE_PASSING);
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_PRIORITIZED_IO);
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_SHARED_MEMORY_OBJECTS);
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_SPAWN);
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_SPIN_LOCKS);
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_THREAD_PROCESS_SHARED);
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_THREAD_ROBUST_PRIO_INHERIT);
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_THREAD_ROBUST_PRIO_PROTECT);
-
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_2_C_DEV);
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_2_CHAR_TERM);
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_2_LOCALEDEF);
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_2_SW_DEV);
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_2_VERSION);
-
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_XOPEN_CRYPT);
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_XOPEN_ENH_I18N);
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_XOPEN_LEGACY);
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_XOPEN_REALTIME);
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_XOPEN_REALTIME_THREADS);
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_XOPEN_SHM);
- VERIFY_SYSCONF_NOT_SUPPORT(_SC_XOPEN_UUCP);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_ASYNCHRONOUS_IO);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_BARRIERS);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_MESSAGE_PASSING);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_PRIORITIZED_IO);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_SHARED_MEMORY_OBJECTS);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_SPAWN);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_SPIN_LOCKS);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_THREAD_PROCESS_SHARED);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_THREAD_ROBUST_PRIO_INHERIT);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_THREAD_ROBUST_PRIO_PROTECT);
+
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_2_C_DEV);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_2_CHAR_TERM);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_2_LOCALEDEF);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_2_SW_DEV);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_2_VERSION);
+
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_XOPEN_CRYPT);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_XOPEN_ENH_I18N);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_XOPEN_LEGACY);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_XOPEN_REALTIME);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_XOPEN_REALTIME_THREADS);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_XOPEN_SHM);
+ VERIFY_SYSCONF_UNSUPPORTED(_SC_XOPEN_UUCP);
#endif // defined(__BIONIC__)
}