Skip to content

[test] Remove test/spec/expected-output. NFC#7385

Closed
sbc100 wants to merge 1 commit into
mainfrom
remove_expected
Closed

[test] Remove test/spec/expected-output. NFC#7385
sbc100 wants to merge 1 commit into
mainfrom
remove_expected

Conversation

@sbc100
Copy link
Copy Markdown
Member

@sbc100 sbc100 commented Mar 20, 2025

For some reason these 4 tests had expected output but no others. The spec tests work based on internal assertions so comparing output should not be needed.

@sbc100 sbc100 requested a review from tlively March 20, 2025 21:48
Comment thread test/spec/expected-output/func_ptrs.wast.log
@tlively
Copy link
Copy Markdown
Member

tlively commented Dec 15, 2025

Looks like they're still used by other tests.

@sbc100
Copy link
Copy Markdown
Member Author

sbc100 commented Dec 15, 2025

Am I wrong about this? Do we care about the output of these tests in this way?

For some reason these 4 tests had expected output but no others.  The
spec tests work based on internal assertions so comparing output should
not be needed.
@sbc100
Copy link
Copy Markdown
Member Author

sbc100 commented Dec 15, 2025

It seems like if we do care about the stdout of the tests we should care about all of them, not just these 4.

@stevenfontanella
Copy link
Copy Markdown
Member

I think the stdout is only checked in these tests because they're the only ones that print e.g. func_ptrs.wast. The logic for printing is sort of special: link. Do we have something else that will exercise the logic if we remove these tests?

@sbc100
Copy link
Copy Markdown
Member Author

sbc100 commented Dec 15, 2025

Good point, yes. It would be annoying if we should detect failures of the print import.

Does the upstream spec tests check output like this though? Its seems odd that we could add golden files for tests that are based on assertions instead.

Maybe a better approach would be write some specific tests for the print import? I certainly wouldn't want to land this without that first I guess.

I'll abandon this PR I think since these golden files kind of act as a test for the print import, even if its a bit overkill in terms of the whole golden file thing.

@sbc100 sbc100 closed this Dec 15, 2025
@sbc100 sbc100 deleted the remove_expected branch December 15, 2025 18:15
@tlively
Copy link
Copy Markdown
Member

tlively commented Dec 15, 2025

Does the upstream spec tests check output like this though?

Running the upstream spec tests does produce e.g. imports.wast.log, but it doesn't look like anything is checking its output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants