Test reading from an offset with the opfs backend.#19139
Test reading from an offset with the opfs backend.#19139brendandahl wants to merge 1 commit intoemscripten-core:mainfrom
Conversation
I noticed in the JSPI work that this code path wasn't being exercised in the tests.
| nread = read(fd, buf4, 4); | ||
| assert(nread == 4); | ||
| assert(strcmp(buf4, "ello") == 0); | ||
| emscripten_console_logf("read message: %s (%d)", buf4, nread); |
There was a problem hiding this comment.
Unrelated to this test, but every time I see changes like this I wonder why we have tests like this? Isn't this test just a generic file I/O test that should work with any backend not just OPFS? Same for wasmfs vs legacy FS. Can't we just have one set of the file I/O tests that work on each of the wasmfs backends and on the legacy FS.
I worry that we have many duplicate and overlapping tests at this point and consolidation is going to be hard (or just never happen).
I know I keep harping on about this but I worry we are moving in the wrong direction.
There was a problem hiding this comment.
Writing new tests was unavoidable at first, but now WasmFS should be feature complete that in principle we could consolidate tests, at least for some things. It's just that it already would be a lot of work :(
There was a problem hiding this comment.
I agree we should prioritize this now. How about adding no further new tests, and trying to get to this test consolidation before any other significant work on WasmFS?
I noticed in the JSPI work that this code path wasn't being exercised in the tests.