From 2ee910416df89d7fc9572a27f0481340343f111a Mon Sep 17 00:00:00 2001 From: Syrus Akbary Date: Fri, 28 Dec 2018 13:59:55 +0100 Subject: [PATCH] Trying to fix failures in build-mac tests --- .circleci/config.yml | 3 +++ src/apis/emscripten/syscalls.rs | 9 --------- src/bin/wasmer.rs | 2 ++ 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4203a0881..aca4d3e96 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -91,6 +91,9 @@ jobs: command: | export PATH="`pwd`/cmake-3.4.1-Darwin-x86_64/CMake.app/Contents/bin:$PATH" export PATH="$HOME/.cargo/bin:$PATH" + # We increase the ulimit for fixing cargo unclosed files in mac + ulimit -n 8000 + sudo sysctl -w kern.maxfiles=655360 kern.maxfilesperproc=327680 make test make lint - run: diff --git a/src/apis/emscripten/syscalls.rs b/src/apis/emscripten/syscalls.rs index 150ff625b..17cc91678 100644 --- a/src/apis/emscripten/syscalls.rs +++ b/src/apis/emscripten/syscalls.rs @@ -852,15 +852,6 @@ pub extern "C" fn ___syscall197( 0 } -// /// fcntl64 -// pub extern "C" fn ___syscall221(_which: c_int, mut varargs: VarArgs, instance: &mut Instance) -> c_int { -// debug!("emscripten::___syscall221"); -// let fd: i32 = varargs.get(instance); -// let cmd: i32 = varargs.get(instance); -// debug!("fd: {}, cmd: {}", fd, cmd); -// unsafe { fcntl(fd, cmd) } -// } - // getgid pub extern "C" fn ___syscall201() -> gid_t { debug!("emscripten::___syscall201 (getgid)"); diff --git a/src/bin/wasmer.rs b/src/bin/wasmer.rs index 7f9f82bd4..77596f3d9 100644 --- a/src/bin/wasmer.rs +++ b/src/bin/wasmer.rs @@ -43,6 +43,8 @@ fn read_file_contents(path: &PathBuf) -> Result, io::Error> { let mut buffer: Vec = Vec::new(); let mut file = File::open(path)?; file.read_to_end(&mut buffer)?; + // We force to close the file + drop(file); Ok(buffer) }