Changeset View
Changeset View
Standalone View
Standalone View
tests/sys/fs/fusefs/mockfs.cc
Show First 20 Lines • Show All 827 Lines • ▼ Show 20 Lines | case SELECT: | ||||
ASSERT_TRUE(FD_ISSET(m_fuse_fd, &readfds)); | ASSERT_TRUE(FD_ISSET(m_fuse_fd, &readfds)); | ||||
break; | break; | ||||
default: | default: | ||||
FAIL() << "not yet implemented"; | FAIL() << "not yet implemented"; | ||||
} | } | ||||
res = read(m_fuse_fd, &in, sizeof(in)); | res = read(m_fuse_fd, &in, sizeof(in)); | ||||
if (res < 0 && !m_quit) { | if (res < 0 && !m_quit) { | ||||
FAIL() << "read: " << strerror(errno); | |||||
m_quit = true; | m_quit = true; | ||||
FAIL() << "read: " << strerror(errno); | |||||
} | } | ||||
ASSERT_TRUE(res >= static_cast<ssize_t>(sizeof(in.header)) || m_quit); | ASSERT_TRUE(res >= static_cast<ssize_t>(sizeof(in.header)) || m_quit); | ||||
/* | /* | ||||
* Inconsistently, fuse_in_header.len is the size of the entire | * Inconsistently, fuse_in_header.len is the size of the entire | ||||
* request,including header, even though fuse_out_header.len excludes | * request,including header, even though fuse_out_header.len excludes | ||||
* the size of the header. | * the size of the header. | ||||
*/ | */ | ||||
ASSERT_TRUE(res == static_cast<ssize_t>(in.header.len) || m_quit); | ASSERT_TRUE(res == static_cast<ssize_t>(in.header.len) || m_quit); | ||||
▲ Show 20 Lines • Show All 47 Lines • Show Last 20 Lines |