| Index: native_client_sdk/src/tests/nacl_io_test/kernel_object_test.cc
|
| diff --git a/native_client_sdk/src/tests/nacl_io_test/kernel_object_test.cc b/native_client_sdk/src/tests/nacl_io_test/kernel_object_test.cc
|
| index cfa1ca4611f628040e83c6f7d9aa0c3f04980985..54d7a8e597139fc7f6c5c455edc0e59db4b4e9f1 100644
|
| --- a/native_client_sdk/src/tests/nacl_io_test/kernel_object_test.cc
|
| +++ b/native_client_sdk/src/tests/nacl_io_test/kernel_object_test.cc
|
| @@ -95,16 +95,18 @@ TEST_F(KernelObjectTest, Referencing) {
|
|
|
| // Allocating an FD should cause the KernelProxy to ref the handle and
|
| // the node and filesystem should be unchanged.
|
| - int fd1 = proxy.AllocateFD(handle_a);
|
| + int fd1 = proxy.AllocateFD(handle_a, "/example");
|
| EXPECT_EQ(3, handle_a->RefCount());
|
| EXPECT_EQ(2, fs->RefCount());
|
| EXPECT_EQ(2, node->RefCount());
|
| + EXPECT_EQ("/example", proxy.GetFDPath(fd1));
|
|
|
| // If we "dup" the handle, we should bump the ref count on the handle
|
| - int fd2 = proxy.AllocateFD(handle_b);
|
| + int fd2 = proxy.AllocateFD(handle_b, "");
|
| EXPECT_EQ(4, handle_a->RefCount());
|
| EXPECT_EQ(2, fs->RefCount());
|
| EXPECT_EQ(2, node->RefCount());
|
| + EXPECT_EQ("", proxy.GetFDPath(fd2));
|
|
|
| // Handles are expected to come out in order
|
| EXPECT_EQ(0, fd1);
|
| @@ -165,15 +167,18 @@ TEST_F(KernelObjectTest, FreeAndReassignFD) {
|
| EXPECT_EQ(2, node->RefCount());
|
| EXPECT_EQ(1, raw_handle->RefCount());
|
|
|
| - proxy.AllocateFD(handle);
|
| + int fd1 = proxy.AllocateFD(handle, "/example");
|
| EXPECT_EQ(2, fs->RefCount());
|
| EXPECT_EQ(2, node->RefCount());
|
| EXPECT_EQ(2, raw_handle->RefCount());
|
| + EXPECT_EQ("/example", proxy.GetFDPath(fd1));
|
|
|
| proxy.FreeAndReassignFD(5, handle);
|
| EXPECT_EQ(2, fs->RefCount());
|
| EXPECT_EQ(2, node->RefCount());
|
| EXPECT_EQ(3, raw_handle->RefCount());
|
| + EXPECT_EQ("/example", proxy.GetFDPath(fd1));
|
| +
|
|
|
| handle.reset();
|
| EXPECT_EQ(2, raw_handle->RefCount());
|
|
|