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

Function main

crates/test-programs/src/bin/p1_readlink.rs:61–83  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

59}
60
61fn main() {
62 let mut args = env::args();
63 let prog = args.next().unwrap();
64 let arg = if let Some(arg) = args.next() {
65 arg
66 } else {
67 eprintln!("usage: {prog} <scratch directory>");
68 process::exit(1);
69 };
70
71 // Open scratch directory
72 let dir_fd = match open_scratch_directory(&arg) {
73 Ok(dir_fd) => dir_fd,
74 Err(err) => {
75 eprintln!("{err}");
76 process::exit(1)
77 }
78 };
79
80 // Run the tests.
81 unsafe { test_readlink(dir_fd) }
82 unsafe { test_incremental_readlink(dir_fd) }
83}

Callers

nothing calls this directly

Calls 5

open_scratch_directoryFunction · 0.85
test_readlinkFunction · 0.85
unwrapMethod · 0.45
nextMethod · 0.45

Tested by

no test coverage detected