test: fix tests on OpenBSD

It fixes `process_title`, `poll_bad_fdtype` and `poll_nested_kqueue`
tests.

Fixes: https://github.com/libuv/libuv/issues/1216
PR-URL: https://github.com/libuv/libuv/pull/1218
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
Santiago Gimeno 2017-02-06 15:25:12 +01:00
parent c42d31ba53
commit c355c8b1a6
No known key found for this signature in database
GPG Key ID: F28C3C8DA33C03BE
3 changed files with 5 additions and 3 deletions

View File

@ -162,7 +162,8 @@ struct uv__stream_queued_fds_s {
defined(__DragonFly__) || \
defined(__FreeBSD__) || \
defined(__FreeBSD_kernel__) || \
defined(__linux__)
defined(__linux__) || \
defined(__OpenBSD__)
#define uv__cloexec uv__cloexec_ioctl
#define uv__nonblock uv__nonblock_ioctl
#else

View File

@ -163,7 +163,7 @@ char** uv_setup_args(int argc, char** argv) {
int uv_set_process_title(const char* title) {
uv__free(process_title);
process_title = uv__strdup(title);
setproctitle(title);
setproctitle("%s", title);
return 0;
}

View File

@ -594,7 +594,8 @@ TEST_IMPL(poll_unidirectional) {
*/
TEST_IMPL(poll_bad_fdtype) {
#if !defined(__DragonFly__) && !defined(__FreeBSD__) && !defined(__sun) && \
!defined(_AIX) && !defined(__MVS__) && !defined(__FreeBSD_kernel__)
!defined(_AIX) && !defined(__MVS__) && !defined(__FreeBSD_kernel__) && \
!defined(__OpenBSD__)
uv_poll_t poll_handle;
int fd;