-
Notifications
You must be signed in to change notification settings - Fork 975
Closed
Labels
Description
Until readdir is implemented in wasm, we can't re-use go's utilities for testing for bugs in impl.
2022/01/01 00:00:00 TestFS err: TestFS found errors:
.: ReadDir(-1): readdir unimplemented : errno 54
Here's what would be nice to be able to both compile and run (right now, it compiles but can't run).
package main
import (
"fmt"
"log"
"os"
"syscall"
"testing/fstest"
)
func main() {
if err := fstest.TestFS(os.DirFS("sub"), "test.txt"); err != nil {
log.Panicln("TestFS err:", err)
}
fmt.Println("TestFS ok")
}
Maybe implementing needs a change here
tinygo/src/syscall/syscall_libc_wasi.go
Lines 263 to 265 in d984b55
func ReadDirent(fd int, buf []byte) (n int, err error) { | |
return -1, ENOSYS | |
} |