| OLD | NEW |
| 1 /* Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 * Use of this source code is governed by a BSD-style license that can be | 2 * Use of this source code is governed by a BSD-style license that can be |
| 3 * found in the LICENSE file. | 3 * found in the LICENSE file. |
| 4 */ | 4 */ |
| 5 | 5 |
| 6 #include <errno.h> | 6 #include <errno.h> |
| 7 #include <fcntl.h> | 7 #include <fcntl.h> |
| 8 #include <stdio.h> | 8 #include <stdio.h> |
| 9 #include <sys/ioctl.h> |
| 9 #include <sys/stat.h> | 10 #include <sys/stat.h> |
| 10 #include <sys/time.h> | 11 #include <sys/time.h> |
| 11 | 12 |
| 12 #include "gtest/gtest.h" | 13 #include "gtest/gtest.h" |
| 13 | 14 |
| 14 #include "nacl_io/event_emitter.h" | 15 #include "nacl_io/event_emitter.h" |
| 15 #include "nacl_io/event_listener.h" | 16 #include "nacl_io/event_listener.h" |
| 16 #include "nacl_io/kernel_intercept.h" | 17 #include "nacl_io/kernel_intercept.h" |
| 17 #include "nacl_io/kernel_proxy.h" | 18 #include "nacl_io/kernel_proxy.h" |
| 18 #include "nacl_io/kernel_wrap.h" | 19 #include "nacl_io/kernel_wrap.h" |
| (...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 // Expect normal files to be read/write and one pollable node to be read. | 472 // Expect normal files to be read/write and one pollable node to be read. |
| 472 SetFDs(&rd_set, fds); | 473 SetFDs(&rd_set, fds); |
| 473 SetFDs(&wr_set, fds); | 474 SetFDs(&wr_set, fds); |
| 474 cnt = select(fdnum, &rd_set, &wr_set, NULL, NULL); | 475 cnt = select(fdnum, &rd_set, &wr_set, NULL, NULL); |
| 475 EXPECT_EQ(7, cnt); | 476 EXPECT_EQ(7, cnt); |
| 476 EXPECT_NE(0, FD_ISSET(fds[0], &rd_set)); | 477 EXPECT_NE(0, FD_ISSET(fds[0], &rd_set)); |
| 477 EXPECT_EQ(0, FD_ISSET(fds[0], &wr_set)); | 478 EXPECT_EQ(0, FD_ISSET(fds[0], &wr_set)); |
| 478 } | 479 } |
| 479 | 480 |
| 480 | 481 |
| OLD | NEW |