MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / main

Function main

crates/test-programs/src/bin/p1_path_open_missing.rs:17–38  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15}
16
17fn main() {
18 let mut args = env::args();
19 let prog = args.next().unwrap();
20 let arg = if let Some(arg) = args.next() {
21 arg
22 } else {
23 eprintln!("usage: {prog} <scratch directory>");
24 process::exit(1);
25 };
26
27 // Open scratch directory
28 let dir_fd = match open_scratch_directory(&arg) {
29 Ok(dir_fd) => dir_fd,
30 Err(err) => {
31 eprintln!("{err}");
32 process::exit(1)
33 }
34 };
35
36 // Run the tests.
37 unsafe { test_path_open_missing(dir_fd) }
38}

Callers

nothing calls this directly

Calls 4

open_scratch_directoryFunction · 0.85
test_path_open_missingFunction · 0.85
unwrapMethod · 0.45
nextMethod · 0.45

Tested by

no test coverage detected