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

Unified Diff: tests/syscalls/syscalls.cc

Issue 7669024: Diagnose EBADF before EFAULT (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Created 9 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/trusted/service_runtime/nacl_syscall_common.c ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/syscalls/syscalls.cc
diff --git a/tests/syscalls/syscalls.cc b/tests/syscalls/syscalls.cc
index 410bc49ff8a8d16e931fe2f793ff84ae97cfe999..8fc6532caead86be7b2becb42301795e5e45f998 100644
--- a/tests/syscalls/syscalls.cc
+++ b/tests/syscalls/syscalls.cc
@@ -237,9 +237,9 @@ bool test_read(const char *test_file) {
ret_val = read(-1, out_char, -1);
if (ret_val != -1)
return failed(testname, "read(-1, out_char, -1)");
- // bad address
- if (EFAULT != errno)
- return failed(testname, "EFAULT != errno");
+ // bad descriptor
+ if (EBADF != errno)
+ return failed(testname, "EBADF != errno");
// fd OK, buffer OK, count 0
ret_val = read(fd, out_char, 0);
« no previous file with comments | « src/trusted/service_runtime/nacl_syscall_common.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698