Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(428)

Unified Diff: tests/irt_ext/file_desc.c

Issue 511253005: Added irt extension support for supplying the nacl_irt_memory interface. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Moved size declaration down Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/untrusted/nacl/nacl_ext_supply.c ('k') | tests/irt_ext/libc/file_tests.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/irt_ext/file_desc.c
diff --git a/tests/irt_ext/file_desc.c b/tests/irt_ext/file_desc.c
index bf163e8555298f65155a723f81b67781837b9389..95babf3de8dc99920a19557f878cb3d50818f63a 100644
--- a/tests/irt_ext/file_desc.c
+++ b/tests/irt_ext/file_desc.c
@@ -8,11 +8,11 @@
#include <fcntl.h>
#include <string.h>
-#include "native_client/tests/irt_ext/file_desc.h"
#include "native_client/src/include/nacl_assert.h"
#include "native_client/src/include/nacl_macros.h"
#include "native_client/src/untrusted/irt/irt_dev.h"
#include "native_client/src/untrusted/irt/irt_extension.h"
+#include "native_client/tests/irt_ext/file_desc.h"
static struct file_desc_environment *g_activated_env = NULL;
static const struct inode_data g_default_inode = {
@@ -296,18 +296,9 @@ void init_file_desc_module(void) {
my_isatty,
};
- /* These tables should have share common prefixes with one another. */
- ASSERT_GT(sizeof(struct nacl_irt_dev_fdio_v0_2),
- sizeof(struct nacl_irt_fdio));
- ASSERT_GT(sizeof(struct nacl_irt_dev_fdio),
- sizeof(struct nacl_irt_dev_fdio_v0_2));
-
- nacl_interface_ext_supply(NACL_IRT_FDIO_v0_1, &fdio,
- sizeof(struct nacl_irt_fdio));
- nacl_interface_ext_supply(NACL_IRT_DEV_FDIO_v0_2, &fdio,
- sizeof(struct nacl_irt_dev_fdio_v0_2));
- nacl_interface_ext_supply(NACL_IRT_DEV_FDIO_v0_3, &fdio,
- sizeof(fdio));
+ size_t size = nacl_interface_ext_supply(NACL_IRT_DEV_FDIO_v0_3, &fdio,
+ sizeof(fdio));
+ ASSERT_EQ(size, sizeof(fdio));
struct nacl_irt_dev_filename fname = {
my_open,
@@ -329,17 +320,9 @@ void init_file_desc_module(void) {
};
/* These tables should have share common prefixes with one another. */
- ASSERT_GT(sizeof(struct nacl_irt_dev_filename_v0_2),
- sizeof(struct nacl_irt_filename));
- ASSERT_GT(sizeof(struct nacl_irt_dev_filename),
- sizeof(struct nacl_irt_dev_filename_v0_2));
-
- nacl_interface_ext_supply(NACL_IRT_FILENAME_v0_1, &fname,
- sizeof(struct nacl_irt_filename));
- nacl_interface_ext_supply(NACL_IRT_DEV_FILENAME_v0_2, &fname,
- sizeof(struct nacl_irt_dev_filename_v0_2));
- nacl_interface_ext_supply(NACL_IRT_DEV_FILENAME_v0_3, &fname,
- sizeof(fname));
+ size = nacl_interface_ext_supply(NACL_IRT_DEV_FILENAME_v0_3, &fname,
+ sizeof(fname));
+ ASSERT_EQ(size, sizeof(fname));
}
void init_inode_data(struct inode_data *inode_data) {
« no previous file with comments | « src/untrusted/nacl/nacl_ext_supply.c ('k') | tests/irt_ext/libc/file_tests.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698