Commit 04223d27 authored by Tudor Bosman's avatar Tudor Bosman Committed by Jordan DeLong

fix typos

Test Plan: async_io_test

Reviewed By: lucian@fb.com

FB internal diff: D699175
parent 9547cef8
...@@ -54,7 +54,7 @@ inline void checkKernelError(ssize_t ret, const char* msg) { ...@@ -54,7 +54,7 @@ inline void checkKernelError(ssize_t ret, const char* msg) {
} }
} }
// Check a traditional Uinx return code (-1 and sets errno on error), throw // Check a traditional Unix return code (-1 and sets errno on error), throw
// on error. // on error.
inline void checkUnixError(ssize_t ret, const char* msg) { inline void checkUnixError(ssize_t ret, const char* msg) {
if (UNLIKELY(ret == -1)) { if (UNLIKELY(ret == -1)) {
......
...@@ -44,7 +44,7 @@ class AsyncIO : private boost::noncopyable { ...@@ -44,7 +44,7 @@ class AsyncIO : private boost::noncopyable {
}; };
/** /**
* Create an AsyncIO context capacble of holding at most 'capacity' pending * Create an AsyncIO context capable of holding at most 'capacity' pending
* requests at the same time. As requests complete, others can be scheduled, * requests at the same time. As requests complete, others can be scheduled,
* as long as this limit is not exceeded. * as long as this limit is not exceeded.
* *
...@@ -53,7 +53,7 @@ class AsyncIO : private boost::noncopyable { ...@@ -53,7 +53,7 @@ class AsyncIO : private boost::noncopyable {
* *
* If pollMode is POLLABLE, pollFd() will return a file descriptor that * If pollMode is POLLABLE, pollFd() will return a file descriptor that
* can be passed to poll / epoll / select and will become readable when * can be passed to poll / epoll / select and will become readable when
* any IOs on this AioReader have completed. If you do this, you must use * any IOs on this AsyncIO have completed. If you do this, you must use
* pollCompleted() instead of wait() -- do not read from the pollFd() * pollCompleted() instead of wait() -- do not read from the pollFd()
* file descriptor directly. * file descriptor directly.
*/ */
......
...@@ -114,13 +114,13 @@ TemporaryFile::~TemporaryFile() { ...@@ -114,13 +114,13 @@ TemporaryFile::~TemporaryFile() {
} }
} }
TemporaryFile thisBinary(6 << 20); // 6MiB TemporaryFile tempFile(6 << 20); // 6MiB
void testReadsSerially(const std::vector<TestSpec>& specs, void testReadsSerially(const std::vector<TestSpec>& specs,
AsyncIO::PollMode pollMode) { AsyncIO::PollMode pollMode) {
AsyncIO aioReader(1, pollMode); AsyncIO aioReader(1, pollMode);
AsyncIO::Op op; AsyncIO::Op op;
int fd = ::open(thisBinary.path().c_str(), O_DIRECT | O_RDONLY); int fd = ::open(tempFile.path().c_str(), O_DIRECT | O_RDONLY);
PCHECK(fd != -1); PCHECK(fd != -1);
SCOPE_EXIT { SCOPE_EXIT {
::close(fd); ::close(fd);
...@@ -147,7 +147,7 @@ void testReadsParallel(const std::vector<TestSpec>& specs, ...@@ -147,7 +147,7 @@ void testReadsParallel(const std::vector<TestSpec>& specs,
std::unique_ptr<AsyncIO::Op[]> ops(new AsyncIO::Op[specs.size()]); std::unique_ptr<AsyncIO::Op[]> ops(new AsyncIO::Op[specs.size()]);
std::vector<std::unique_ptr<char[]>> bufs(specs.size()); std::vector<std::unique_ptr<char[]>> bufs(specs.size());
int fd = ::open(thisBinary.path().c_str(), O_DIRECT | O_RDONLY); int fd = ::open(tempFile.path().c_str(), O_DIRECT | O_RDONLY);
PCHECK(fd != -1); PCHECK(fd != -1);
SCOPE_EXIT { SCOPE_EXIT {
::close(fd); ::close(fd);
...@@ -269,7 +269,7 @@ TEST(AsyncIO, ManyAsyncDataPollable) { ...@@ -269,7 +269,7 @@ TEST(AsyncIO, ManyAsyncDataPollable) {
TEST(AsyncIO, NonBlockingWait) { TEST(AsyncIO, NonBlockingWait) {
AsyncIO aioReader(1, AsyncIO::NOT_POLLABLE); AsyncIO aioReader(1, AsyncIO::NOT_POLLABLE);
AsyncIO::Op op; AsyncIO::Op op;
int fd = ::open(thisBinary.path().c_str(), O_DIRECT | O_RDONLY); int fd = ::open(tempFile.path().c_str(), O_DIRECT | O_RDONLY);
PCHECK(fd != -1); PCHECK(fd != -1);
SCOPE_EXIT { SCOPE_EXIT {
::close(fd); ::close(fd);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment