Skip to content
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

gh-127146: Fix Emscripten test suite when run with -uall #132092

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

hoodmane
Copy link
Contributor

@hoodmane hoodmane commented Apr 4, 2025

Emscripten large file support works fine and is required for testZip64LargeFile to work.

And skip more stack overflows
@freakboy3742

Emscripten large file support works fine and is required for
`testZip64LargeFile` to work.

And skip more stack overflows
@python-cla-bot
Copy link

python-cla-bot bot commented Apr 6, 2025

All commit authors signed the Contributor License Agreement.

CLA signed

@freakboy3742
Copy link
Contributor

Can confirm the test suite now completes for me without crashing. I'm seeing 2 test failures at runtime on the Buildbot machine (using emscripten 4.0.6, running cross-build/wasm32-emscripten/build/python/python.sh -m test -v -uall --rerun -W --single-process):

======================================================================
FAIL: test_mode (test.test_os.MakedirTests.test_mode)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/emscripten/cpython/Lib/test/test_os.py", line 1932, in test_mode
    self.assertEqual(os.stat(parent).st_mode & 0o777, 0o775)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 493 != 509

----------------------------------------------------------------------
Ran 373 tests in 4.888s

FAILED (failures=1, skipped=159)
test test_os failed

and

======================================================================
ERROR: test_sysconfigdata_json (test.test_sysconfig.TestSysConfig.test_sysconfigdata_json)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/emscripten/cpython/Lib/test/test_sysconfig.py", line 662, in test_sysconfigdata_json
    json_config_vars.pop(key)
    ~~~~~~~~~~~~~~~~~~~~^^^^^
KeyError: 'userbase'

----------------------------------------------------------------------
Ran 32 tests in 0.052s

FAILED (errors=1, skipped=6)
test test_sysconfig failed

Are you seeing those failures as well?

@hoodmane
Copy link
Contributor Author

hoodmane commented Apr 7, 2025

Nope. Did you run it on this specific commit? The sysconfigdata failure I was seeing in the fall but @FFY00 made some changes that made it go away for me a couple months ago.

Is the test_mode failure consistent or could it be flaky?

@hoodmane
Copy link
Contributor Author

hoodmane commented Apr 7, 2025

I will double check everything in my setup and rerun the tests.

@hoodmane hoodmane requested a review from FFY00 as a code owner April 7, 2025 09:12
@hoodmane
Copy link
Contributor Author

hoodmane commented Apr 7, 2025

I can reproduce the test_sysconfig failure and f36c496 fixes it for me.

@hoodmane
Copy link
Contributor Author

hoodmane commented Apr 7, 2025

I sometimes get:

======================================================================
FAIL: test_utime_by_indexed (test.test_os.UtimeTests.test_utime_by_indexed)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/rchatham/cpython/Lib/test/test_os.py", line 961, in test_utime_by_indexed
    self._test_utime(set_time)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^
  File "/home/rchatham/cpython/Lib/test/test_os.py", line 925, in _test_utime
    self.assertAlmostEqual(st.st_atime, atime_ns * 1e-9, delta=1e-5)
    ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 1744017482.524 != 1.002003 within 1e-05 delta (1744017481.521997 difference)

But I cannot reproduce the test_mode failure. Maybe we should xfail it for now to unblock the build bot?

@freakboy3742
Copy link
Contributor

Did you run it on this specific commit?
Is the test_mode failure consistent or could it be flaky?

I've run it twice with 3d49b34, and once with f36c496, and it has failed all three times.

Updating to f36c496 has resolved the sysconfig issue, though.

I have tried to reproduce the failure locally, but the hotel wifi I'm on is currently blocking downloads from GitHub 🙄 . I'll be at a different hotel in about 12 hours, so I can try again there.

@freakboy3742
Copy link
Contributor

I've finally got a chance to test this locally, and I'm seeing the same problem (running on macOS).

@hoodmane
Copy link
Contributor Author

hoodmane commented Apr 8, 2025

You okay to skip it and investigate later?

@freakboy3742
Copy link
Contributor

You okay to skip it and investigate later?

I'm not wild about merging an open ended TODO; and given it will be about a week before I'll have a chance to focus on getting the buildbot in place, and this is literally the last piece before we have a clean test run, I'd rather do at least a preliminary investigation so we've got an idea how deep this hole goes.

@hoodmane
Copy link
Contributor Author

hoodmane commented Apr 8, 2025

Sounds good. I just wish I could reproduce it. I'll try cleaning everything and rebuild again.

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

Successfully merging this pull request may close these issues.

2 participants