-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleanup the emscripten tests relating to the event loop. NFC #23760
base: main
Are you sure you want to change the base?
Conversation
f2af566
to
6970efe
Compare
295f2fc
to
c1a2f16
Compare
The browser tests were only being run in `PROXY_TO_PTHREAD` mode for some reason even though these tests should pass on the main thread. In test_other the `PROXY_TO_PTHREAD` flags were being passed as args (rather then emcc_args). Likely a copy/paste bug.
c1a2f16
to
a6b1367
Compare
self.btest_exit('gl_textures.c', args=['-lGL', '-g', '-sSTACK_SIZE=1MB'] + args) | ||
@also_with_proxy_to_pthread | ||
def test_gl_textures(self): | ||
self.btest_exit('gl_textures.c', args=['-lGL', '-g', '-sSTACK_SIZE=1MB', '-sOFFSCREEN_FRAMEBUFFER']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This did not always test with OFFSCREEN_FRAMEBUFFER before. Do we not error on that being used without pthreads?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I think think its harmlessly ignored.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should error ? But we don't today.
def test_emscripten_set_interval(self): | ||
self.do_runf('emscripten_set_interval.c', args=['-pthread', '-sPROXY_TO_PTHREAD']) | ||
self.do_runf('emscripten_set_interval.c') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously this was tested with pthreads, but now it isn't, if I read this diff correctly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, see the PR description. There is a typo here. args
should be emcc_args
so this was never working here. args
in this context refers to arguments for the program itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. Should we fix the typo and test it with pthreads, or not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't think of a reason to use pthreads on this myself. lgtm either way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We test with and without threads in the browser already.
def test_emscripten_set_interval(self): | ||
self.do_runf('emscripten_set_interval.c', args=['-pthread', '-sPROXY_TO_PTHREAD']) | ||
self.do_runf('emscripten_set_interval.c') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't think of a reason to use pthreads on this myself. lgtm either way.
The browser tests were only being run in
PROXY_TO_PTHREAD
modefor some reason even though these tests should pass on the main thread.
In test_other the
PROXY_TO_PTHREAD
flags were being passed as args(rather then emcc_args). Likely a copy/paste bug.