forked from cory/tildefriends
libuv 1.45.0, #include cleanup, probably something else.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4308 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
8
deps/libuv/test/test-pipe-set-fchmod.c
vendored
8
deps/libuv/test/test-pipe-set-fchmod.c
vendored
@ -22,6 +22,7 @@
|
||||
|
||||
#include "uv.h"
|
||||
#include "task.h"
|
||||
#include <string.h>
|
||||
|
||||
TEST_IMPL(pipe_set_chmod) {
|
||||
uv_pipe_t pipe_handle;
|
||||
@ -43,12 +44,13 @@ TEST_IMPL(pipe_set_chmod) {
|
||||
* successful. */
|
||||
r = uv_pipe_chmod(&pipe_handle, UV_READABLE);
|
||||
if (r == UV_EPERM) {
|
||||
MAKE_VALGRIND_HAPPY();
|
||||
MAKE_VALGRIND_HAPPY(loop);
|
||||
RETURN_SKIP("Insufficient privileges to alter pipe fmode");
|
||||
}
|
||||
ASSERT(r == 0);
|
||||
#ifndef _WIN32
|
||||
stat(TEST_PIPENAME, &stat_buf);
|
||||
memset(&stat_buf, 0, sizeof(stat_buf));
|
||||
ASSERT_EQ(0, stat(TEST_PIPENAME, &stat_buf));
|
||||
ASSERT(stat_buf.st_mode & S_IRUSR);
|
||||
ASSERT(stat_buf.st_mode & S_IRGRP);
|
||||
ASSERT(stat_buf.st_mode & S_IROTH);
|
||||
@ -85,6 +87,6 @@ TEST_IMPL(pipe_set_chmod) {
|
||||
r = uv_pipe_chmod(&pipe_handle, UV_WRITABLE | UV_READABLE);
|
||||
ASSERT(r == UV_EBADF);
|
||||
|
||||
MAKE_VALGRIND_HAPPY();
|
||||
MAKE_VALGRIND_HAPPY(loop);
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user