Repository navigation
test: port upstream regression tests for repeated calls, exit codes, abort, terminate and issues #494, #611, #687, #719 - #81
Conversation
…abort, terminate and issues ffmpegwasm#494, ffmpegwasm#611, ffmpegwasm#687, ffmpegwasm#719
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 31 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
This PR ports upstream regression tests for repeated exec/ffprobe calls, exit codes, abort signals, terminate behavior, and load() on an already-loaded instance. Tests are added to the core, Node, and browser Mocha suites. All tests use endless lavfi inputs where needed so commands cannot finish before the call settles. The test structure is sound: each suite cleans up after itself, no test depends on another's filesystem state, and abort/terminate promises settle synchronously.
review-bot, model nvidia/nemotron-3-ultra-550b-a55b:free, verdict approve
What and why
Ports the useful tests from upstream ffmpegwasm/ffmpeg.wasm ffmpegwasm#950, ffmpegwasm#962 and ffmpegwasm#968 into the existing Mocha suites (no Vitest). Tests only, no CHANGELOG entry. Anything that waits on a command uses an endless lavfi input (
testsrc=d=600), so it cannot finish first.Mapping
-select_streamsnot kept, ffprobe alternating with execcore.retmatch, no throw on abortSkipped
TypeError: Cannot read from private fieldffmpegwasm/ffmpeg.wasm#687 (Proxy): already covered intests/ffmpeg-node.test.mjs. Using vite + vue:TypeError: Cannot read from private fieldffmpegwasm/ffmpeg.wasm#687 is also not browser-specific.-loglevel quiet/-report,-show_entriesreset,-nostatsprogress, ffprobe missing file, terminate then reload, concurrent/double load, chunked FS, locateFile hash.Not run locally
Core tests (
tests/ffmpeg-core.test.js) and browser tests (tests/ffmpeg.test.js) were not run. The node tests were run against the old debug st core: all new ones pass except theit.skipbelow, which was verified by readingbind.js. Existing transcode tests time out on that old core, as expected.pnpm lintpasses.Noticed, not fixed
Upstream issue ffmpegwasm#611 applies to us:
bind.jsdeclaredfunction setTimeout, which shadowed the global one for Emscripten's glue. It is fixed in #82, with its test, so this PR no longer carries the skipped check.Review
review-bot did not review this PR, so a Sonnet reviewer did. It found nothing blocking. The abort and terminate tests settle synchronously, no test depends on another's file system state, and outputs are cleaned up. Its low-severity notes: some nonzero exit code checks would also pass for a swallowed abort, and one test name overstated what it checked. That test is renamed in the latest commit.