test-programs: no longer test virtfs separately

wasi-c2 does not have a virtfs yet, and when it does we'll design a
better test harness

also fix prestat get: i was reporting the wrong error
This commit is contained in:
Pat Hickey
2020-12-11 15:50:35 -08:00
parent 61f97a3e92
commit dfcdbfd0fe
3 changed files with 8 additions and 99 deletions

View File

@@ -5,20 +5,7 @@ use std::path::Path;
use wasi_c2::WasiCtx;
use wasmtime::{Linker, Module, Store};
#[derive(Clone, Copy, Debug)]
pub enum PreopenType {
/// Preopens should be satisfied with real OS files.
OS,
/// Preopens should be satisfied with virtual files.
Virtual,
}
pub fn instantiate(
data: &[u8],
bin_name: &str,
workspace: Option<&Path>,
preopen_type: PreopenType,
) -> anyhow::Result<()> {
pub fn instantiate(data: &[u8], bin_name: &str, workspace: Option<&Path>) -> anyhow::Result<()> {
let store = Store::default();
// Create our wasi context with pretty standard arguments/inheritance/etc.