Fix kernel-net check, fix misc warnings

Split out nightly check step
This commit is contained in:
Mark McCaskey 2020-04-08 15:53:54 -07:00
parent 4d58ae2d14
commit 23bc0fd720
3 changed files with 14 additions and 8 deletions

View File

@ -207,11 +207,17 @@ check-bench-llvm:
check-bench: check-bench-singlepass check-bench-llvm
check-kernel-net:
cargo check -p kernel-net --target=wasm32-wasi
# checks that require a nightly version of Rust
check-nightly: check-kernel-net
# TODO: We wanted `--workspace --exclude wasmer-runtime`, but can't due
# to https://github.com/rust-lang/cargo/issues/6745 .
NOT_RUNTIME_CRATES = -p wasmer-clif-backend -p wasmer-singlepass-backend -p wasmer-middleware-common -p wasmer-runtime-core -p wasmer-emscripten -p wasmer-llvm-backend -p wasmer-wasi -p wasmer-kernel-loader -p wasmer-interface-types
RUNTIME_CHECK = cargo check --manifest-path lib/runtime/Cargo.toml --no-default-features
check: check-bench check-kernel-net
check: check-bench
cargo check $(NOT_RUNTIME_CRATES)
cargo check --release $(NOT_RUNTIME_CRATES)
cargo check --all-features $(NOT_RUNTIME_CRATES)
@ -263,8 +269,6 @@ check: check-bench check-kernel-net
--features=llvm,default-backend-llvm
--features=default-backend-singlepass,singlepass,cranelift,llvm,cache,deterministic-execution
check-kernel-net: cargo +nightly check -p kernel-net --target=wasm32-wasi
# Release
release:
cargo build --release --features backend-singlepass,backend-cranelift,backend-llvm,loader-kernel,experimental-io-devices,log/release_max_level_off

View File

@ -116,7 +116,9 @@ jobs:
- template: .azure/install-llvm.yml
- template: .azure/install-sccache.yml
- template: .azure/install-cmake.yml
- bash: make check
- bash: |
make check
make check-nightly
displayName: Check with Flags
condition: and(succeeded(), not(eq(variables['Agent.OS'], 'Windows_NT')))

View File

@ -301,7 +301,7 @@ mod test {
assert!(unsafe { end_wasm_ptr_array.deref_mut(&memory, 0, 1).is_some() });
let invalid_idx_len_combos: [(u32, u32); 3] =
[(last_valid_address_for_u8 + 1, 0), (0, 2), (1, 1)];
for &(idx, len) in invalid_idx_len_combos.into_iter() {
for &(idx, len) in invalid_idx_len_combos.iter() {
assert!(end_wasm_ptr_array.deref(&memory, idx, len).is_none());
assert!(unsafe { end_wasm_ptr_array.deref_mut(&memory, idx, len).is_none() });
}
@ -322,7 +322,7 @@ mod test {
WasmPtr::new(last_valid_address_for_u32 + 3),
WasmPtr::new(last_valid_address_for_u32 + 4),
];
for oob_end_ptr in end_wasm_ptr_oob_array.into_iter() {
for oob_end_ptr in end_wasm_ptr_oob_array.iter() {
assert!(oob_end_ptr.deref(&memory).is_none());
assert!(unsafe { oob_end_ptr.deref_mut(&memory).is_none() });
}
@ -332,7 +332,7 @@ mod test {
let invalid_idx_len_combos: [(u32, u32); 3] =
[(last_valid_address_for_u32 + 1, 0), (0, 2), (1, 1)];
for &(idx, len) in invalid_idx_len_combos.into_iter() {
for &(idx, len) in invalid_idx_len_combos.iter() {
assert!(end_wasm_ptr_array.deref(&memory, idx, len).is_none());
assert!(unsafe { end_wasm_ptr_array.deref_mut(&memory, idx, len).is_none() });
}
@ -344,7 +344,7 @@ mod test {
WasmPtr::new(last_valid_address_for_u32 + 4),
];
for oob_end_array_ptr in end_wasm_ptr_array_oob_array.into_iter() {
for oob_end_array_ptr in end_wasm_ptr_array_oob_array.iter() {
assert!(oob_end_array_ptr.deref(&memory, 0, 1).is_none());
assert!(unsafe { oob_end_array_ptr.deref_mut(&memory, 0, 1).is_none() });
assert!(oob_end_array_ptr.deref(&memory, 1, 0).is_none());