about summary refs log tree commit diff
path: root/src/libstd/io/test.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/io/test.rs')
-rw-r--r--src/libstd/io/test.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/libstd/io/test.rs b/src/libstd/io/test.rs
index a3e5bac89d6..9eeaf4635a4 100644
--- a/src/libstd/io/test.rs
+++ b/src/libstd/io/test.rs
@@ -176,16 +176,14 @@ mod darwin_fd_limit {
         if sysctl(&mut mib[0], 2, &mut maxfiles as *mut libc::c_int as *mut libc::c_void, &mut size,
                   mut_null(), 0) != 0 {
             let err = last_os_error();
-            error!("raise_fd_limit: error calling sysctl: {}", err);
-            return;
+            fail!("raise_fd_limit: error calling sysctl: {}", err);
         }
 
         // Fetch the current resource limits
         let mut rlim = rlimit{rlim_cur: 0, rlim_max: 0};
         if getrlimit(RLIMIT_NOFILE, &mut rlim) != 0 {
             let err = last_os_error();
-            error!("raise_fd_limit: error calling getrlimit: {}", err);
-            return;
+            fail!("raise_fd_limit: error calling getrlimit: {}", err);
         }
 
         // Bump the soft limit to the smaller of kern.maxfilesperproc and the hard limit
@@ -194,8 +192,7 @@ mod darwin_fd_limit {
         // Set our newly-increased resource limit
         if setrlimit(RLIMIT_NOFILE, &rlim) != 0 {
             let err = last_os_error();
-            error!("raise_fd_limit: error calling setrlimit: {}", err);
-            return;
+            fail!("raise_fd_limit: error calling setrlimit: {}", err);
         }
     }
 }