GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-127146: Report uid in Emscripten + node as native uid by hoodmane · Pull Request #136509 · python/cpython

Conversation

@hoodmane

@hoodmane hoodmane commented Jul 10, 2025 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Fixes test_netrc.NetrcTestCase.test_security, which was getting mad that we reported the uid of a file correctly but reported the user's uid as 0.

cc @freakboy3742.

  • Issue: Emscripten: Get test suite passing #127146

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cmaloney reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@hoodmane
hoodmane requested review from corona10 and erlend-aasland as code owners July 10, 2025 14:08
@bedevere-app bedevere-app Bot added the awaiting review label Jul 10, 2025
@hoodmane hoodmane added skip news and removed awaiting review labels Jul 10, 2025
@bedevere-app bedevere-app Bot mentioned this pull request Jul 10, 2025
Emscripten: Get test suite passing #127146
Closed
@hoodmane
pythongh-127146: Report uid in Emscripten + node as native uid
f2a7202
Fixes `test_netrc.NetrcTestCase.test_security`, which was getting mad
that we reported the uid of a file correctly but reported the user's uid
as 0.
@hoodmane
hoodmane force-pushed the emscripten-uid-match-native branch from 1fc5975 to f2a7202 Compare July 10, 2025 14:08
@hoodmane hoodmane mentioned this pull request Jul 10, 2025
gh-127146: Skip test_netrc.test_security on Emscripten #136227
Closed
@freakboy3742

freakboy3742 commented Jul 10, 2025

Copy link
Copy Markdown
Contributor

!buildbot emscripten

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented Jul 10, 2025

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @freakboy3742 for commit f2a7202 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F136509%2Fmerge

The command will test the builders whose names match following regular expression: emscripten

The builders matched are:

  • WASM Emscripten PR
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@freakboy3742

freakboy3742 commented Jul 11, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

The buildbot isn't happy with the new C file...

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hoodmane
Add missing include
789681e
@hoodmane

hoodmane commented Jul 13, 2025

Copy link
Copy Markdown
Contributor Author

Indeed, there is a missing #include.
!buildbot emscripten

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hoodmane

hoodmane commented Jul 13, 2025

Copy link
Copy Markdown
Contributor Author

How do the !buildbot pragmas work? I don't find a section the devguide https://devguide.python.org/testing/buildbots/ Maybe we should add a paragraph there explaining.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@freakboy3742

freakboy3742 commented Jul 13, 2025

Copy link
Copy Markdown
Contributor

!buildbot emscripten

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented Jul 13, 2025

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @freakboy3742 for commit 789681e 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F136509%2Fmerge

The command will test the builders whose names match following regular expression: emscripten

The builders matched are:

  • WASM Emscripten PR
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@freakboy3742

freakboy3742 commented Jul 13, 2025

Copy link
Copy Markdown
Contributor

How do the !buildbot pragmas work? I don't find a section the devguide https://devguide.python.org/testing/buildbots/ Maybe we should add a paragraph there explaining.

I'm not sure if the buildbot issue is a permissions thing, or if the buildbot directive has to be a comment on its own. I've asked on Discord for clarification; in the meantime, I've kicked off a build for you.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

freakboy3742
freakboy3742 approved these changes Jul 14, 2025
View reviewed changes

@freakboy3742 freakboy3742 left a comment

Copy link
Copy Markdown
Contributor

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.

Looks like that has done the job!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-app bedevere-app Bot added the awaiting merge label Jul 14, 2025
@freakboy3742 freakboy3742 added OS-emscripten needs backport to 3.14 bugs and security fixes labels Jul 14, 2025
@freakboy3742
Merge branch 'main' into emscripten-uid-match-native
ad8db83
@freakboy3742
freakboy3742 enabled auto-merge (squash) July 14, 2025 02:47
@freakboy3742
freakboy3742 disabled auto-merge July 14, 2025 03:21
@freakboy3742

freakboy3742 commented Jul 14, 2025

Copy link
Copy Markdown
Contributor

Looks like it still isn't happy - I thought the "up-to-date" error was a configure.ac thing, but it looks like a linting check on the new C file...

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@zware

zware commented Jul 14, 2025

Copy link
Copy Markdown
Member

the buildbot directive has to be a comment on its own

^ this, or at least the comment has to start with the buildbot command.

Improvements welcome :)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hoodmane
Add emscripten_syscalls.c to excludes for Tools/c-analyzer/cpython/_p…
b8df7ea
…arser.py
@hoodmane
hoodmane requested a review from ericsnowcurrently as a code owner July 15, 2025 14:30
@hoodmane

hoodmane commented Jul 15, 2025

Copy link
Copy Markdown
Contributor Author

!buildbot emscripten

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented Jul 15, 2025

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @hoodmane for commit b8df7ea 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F136509%2Fmerge

The command will test the builders whose names match following regular expression: emscripten

The builders matched are:

  • WASM Emscripten PR
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@freakboy3742

freakboy3742 commented Jul 15, 2025

Copy link
Copy Markdown
Contributor

!buildbot ios|android

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented Jul 15, 2025

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @freakboy3742 for commit b8df7ea 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F136509%2Fmerge

The command will test the builders whose names match following regular expression: ios|android

The builders matched are:

  • aarch64 Android PR
  • iOS ARM64 Simulator PR
  • AMD64 Android PR
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@freakboy3742

freakboy3742 commented Jul 15, 2025

Copy link
Copy Markdown
Contributor

!buildbot this-doesnt-exist

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented Jul 15, 2025

Copy link
Copy Markdown

The regex 'this-doesnt-exist' did not match any buildbot builder. Is the requested builder in the list of stable builders?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@freakboy3742

freakboy3742 commented Jul 15, 2025

Copy link
Copy Markdown
Contributor

(The buildbot trigger noise was part of testing python/devguide#1605; the iOS/Android builds aren't actually required for testing)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@freakboy3742

freakboy3742 commented Jul 16, 2025

Copy link
Copy Markdown
Contributor

With the platform specific exclusion in the c-analyzer, this is now passing the netrc test; we're down to just the pydoc test failure.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@freakboy3742
freakboy3742 merged commit e81c4e8 into python:main Jul 16, 2025
@miss-islington-app

miss-islington-app Bot commented Jul 16, 2025

Copy link
Copy Markdown

Thanks @hoodmane for the PR, and @freakboy3742 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting merge label Jul 16, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 16, 2025
@hoodmane @miss-islington
pythongh-127146: Report uid in Emscripten + node as native uid (pytho…
9bab16c
…nGH-136509)

Corrects the handling of getuid on emscripten, which was consistently reporting as 0.
(cherry picked from commit e81c4e8)

Co-authored-by: Hood Chatham <[email protected]>
@bedevere-app

bedevere-app Bot commented Jul 16, 2025

Copy link
Copy Markdown

GH-136699 is a backport of this pull request to the 3.14 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Jul 16, 2025
freakboy3742 pushed a commit that referenced this pull request Jul 16, 2025
@miss-islington @hoodmane
[3.14] gh-127146: Report uid in Emscripten + node as native uid (GH-1…
cdf98c3
…36509) (#136699)

Corrects the handling of getuid on emscripten, which was consistently reporting as 0.
(cherry picked from commit e81c4e8)

Co-authored-by: Hood Chatham <[email protected]>
@bedevere-bot

bedevere-bot commented Jul 16, 2025

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot ARM Raspbian Linux Asan 3.x (no tier) has failed when building commit e81c4e8.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1811/builds/33) and take a look at the build logs.
  4. Check if the failure is related to this commit (e81c4e8) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1811/builds/33

Summary of the results of the build (if available):

Click to see traceback logs
remote: Enumerating objects: 10, done.        
remote: Counting objects:  12% (1/8)        
remote: Counting objects:  25% (2/8)        
remote: Counting objects:  37% (3/8)        
remote: Counting objects:  50% (4/8)        
remote: Counting objects:  62% (5/8)        
remote: Counting objects:  75% (6/8)        
remote: Counting objects:  87% (7/8)        
remote: Counting objects: 100% (8/8)        
remote: Counting objects: 100% (8/8), done.        
remote: Compressing objects:  16% (1/6)        
remote: Compressing objects:  33% (2/6)        
remote: Compressing objects:  50% (3/6)        
remote: Compressing objects:  66% (4/6)        
remote: Compressing objects:  83% (5/6)        
remote: Compressing objects: 100% (6/6)        
remote: Compressing objects: 100% (6/6), done.        
remote: Total 10 (delta 2), reused 2 (delta 2), pack-reused 2 (from 2)        
From https://github.com/python/cpython
 * branch                    main       -> FETCH_HEAD
Note: switching to 'e81c4e84b3a8688a367099e3adf9b2fcf914447f'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at e81c4e84b3a gh-127146: Report uid in Emscripten + node as native uid (#136509)
Switched to and reset branch 'main'

configure: WARNING: no system libmpdec found; falling back to pure-Python version for the decimal module

In file included from ./Include/internal/pycore_dict.h:11,
                 from Objects/typeobject.c:7:
In function ‘Py_DECREF_MORTAL’,
    inlined from ‘PyStackRef_XCLOSE’ at ./Include/internal/pycore_stackref.h:730:9,
    inlined from ‘_PyThreadState_PopCStackRef’ at ./Include/internal/pycore_stackref.h:810:5,
    inlined from ‘vectorcall_maybe’ at Objects/typeobject.c:3103:9:
./Include/internal/pycore_object.h:481:8: warning: array subscript 0 is outside array bounds of ‘PyObject[0]’ {aka ‘struct _object[]’} [-Warray-bounds]
  481 |     if (--op->ob_refcnt == 0) {
      |        ^

Timeout (0:05:00)!
Thread 0x0000007f8c2ef100 [Thread-2] (most recent call first):
  File "/home/buildbot/buildarea/3.x.pablogsal-rasp.asan/build/Lib/subprocess.py", line 2021 in _try_wait
  File "/home/buildbot/buildarea/3.x.pablogsal-rasp.asan/build/Lib/subprocess.py", line 2046 in _wait
  File "/home/buildbot/buildarea/3.x.pablogsal-rasp.asan/build/Lib/subprocess.py", line 1277 in wait
  File "/home/buildbot/buildarea/3.x.pablogsal-rasp.asan/build/Lib/test/libregrtest/run_workers.py", line 194 in _run_process
  File "/home/buildbot/buildarea/3.x.pablogsal-rasp.asan/build/Lib/test/libregrtest/run_workers.py", line 299 in run_tmp_files
  File "/home/buildbot/buildarea/3.x.pablogsal-rasp.asan/build/Lib/test/libregrtest/run_workers.py", line 363 in _runtest
  File "/home/buildbot/buildarea/3.x.pablogsal-rasp.asan/build/Lib/test/libregrtest/run_workers.py", line 403 in run
  File "/home/buildbot/buildarea/3.x.pablogsal-rasp.asan/build/Lib/threading.py", line 1074 in _bootstrap_inner
  File "/home/buildbot/buildarea/3.x.pablogsal-rasp.asan/build/Lib/threading.py", line 1036 in _bootstrap

Thread 0x0000007f8caff100 [Thread-1] (most recent call first):
  File "/home/buildbot/buildarea/3.x.pablogsal-rasp.asan/build/Lib/subprocess.py", line 2018 in _try_wait
  File "/home/buildbot/buildarea/3.x.pablogsal-rasp.asan/build/Lib/subprocess.py", line 2046 in _wait
  File "/home/buildbot/buildarea/3.x.pablogsal-rasp.asan/build/Lib/subprocess.py", line 1277 in wait
  File "/home/buildbot/buildarea/3.x.pablogsal-rasp.asan/build/Lib/test/libregrtest/run_workers.py", line 194 in _run_process
  File "/home/buildbot/buildarea/3.x.pablogsal-rasp.asan/build/Lib/test/libregrtest/run_workers.py", line 299 in run_tmp_files
  File "/home/buildbot/buildarea/3.x.pablogsal-rasp.asan/build/Lib/test/libregrtest/run_workers.py", line 363 in _runtest
  File "/home/buildbot/buildarea/3.x.pablogsal-rasp.asan/build/Lib/test/libregrtest/run_workers.py", line 403 in run
  File "/home/buildbot/buildarea/3.x.pablogsal-rasp.asan/build/Lib/threading.py", line 1074 in _bootstrap_inner
  File "/home/buildbot/buildarea/3.x.pablogsal-rasp.asan/build/Lib/threading.py", line 1036 in _bootstrap

Thread 0x0000007f988656c0 [python] (most recent call first):
  File "/home/buildbot/buildarea/3.x.pablogsal-rasp.asan/build/Lib/queue.py", line 214 in get
  File "/home/buildbot/buildarea/3.x.pablogsal-rasp.asan/build/Lib/test/libregrtest/run_workers.py", line 541 in _get_result
  File "/home/buildbot/buildarea/3.x.pablogsal-rasp.asan/build/Lib/test/libregrtest/run_workers.py", line 610 in run
  File "/home/buildbot/buildarea/3.x.pablogsal-rasp.asan/build/Lib/test/libregrtest/main.py", line 455 in _run_tests_mp
  File "/home/buildbot/buildarea/3.x.pablogsal-rasp.asan/build/Lib/test/libregrtest/main.py", line 561 in _run_tests
  File "/home/buildbot/buildarea/3.x.pablogsal-rasp.asan/build/Lib/test/libregrtest/main.py", line 598 in run_tests
  File "/home/buildbot/buildarea/3.x.pablogsal-rasp.asan/build/Lib/test/libregrtest/main.py", line 767 in main
  File "/home/buildbot/buildarea/3.x.pablogsal-rasp.asan/build/Lib/test/libregrtest/main.py", line 775 in main
  File "/home/buildbot/buildarea/3.x.pablogsal-rasp.asan/build/Lib/test/__main__.py", line 2 in <module>
  File "<frozen runpy>", line 88 in _run_code
  File "<frozen runpy>", line 198 in _run_module_as_main
make: *** [Makefile:2460: buildbottest] Error 1

Cannot open file '/home/buildbot/buildarea/3.x.pablogsal-rasp.asan/build/test-results.xml' for upload
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

taegyunkim pushed a commit to taegyunkim/cpython that referenced this pull request Aug 4, 2025
@hoodmane @taegyunkim
pythongh-127146: Report uid in Emscripten + node as native uid (pytho…
21209bc
…n#136509)

Corrects the handling of getuid on emscripten, which was consistently reporting as 0.
Agent-Hellboy pushed a commit to Agent-Hellboy/cpython that referenced this pull request Aug 19, 2025
@hoodmane @Agent-Hellboy
pythongh-127146: Report uid in Emscripten + node as native uid (pytho…
12e988c
…n#136509)

Corrects the handling of getuid on emscripten, which was consistently reporting as 0.
kumaraditya303 pushed a commit to miss-islington/cpython that referenced this pull request Sep 9, 2025
@miss-islington @hoodmane @kumaraditya303
[3.14] pythongh-127146: Report uid in Emscripten + node as native uid (…
f8d3289
…pythonGH-136509) (python#136699)

Corrects the handling of getuid on emscripten, which was consistently reporting as 0.
(cherry picked from commit e81c4e8)

Co-authored-by: Hood Chatham <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@freakboy3742 freakboy3742 freakboy3742 approved these changes
@erlend-aasland erlend-aasland Awaiting requested review from erlend-aasland erlend-aasland is a code owner
@corona10 corona10 Awaiting requested review from corona10 corona10 is a code owner
@ericsnowcurrently ericsnowcurrently Awaiting requested review from ericsnowcurrently ericsnowcurrently is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

OS-emscripten skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@hoodmane @freakboy3742 @bedevere-bot @zware
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.