bpo-44131: Test Py_FrozenMain() by vstinner · Pull Request #26126 · python/cpython · GitHub
Skip to content

bpo-44131: Test Py_FrozenMain() - #26126

Merged
vstinner merged 4 commits into
python:mainfrom
vstinner:test_frozenmain
May 17, 2021
Merged

vstinner merged 4 commits into
python:mainfrom
vstinner:test_frozenmain

Conversation

@vstinner

@vstinner vstinner commented May 14, 2021

Copy link
Copy Markdown
Member
  • Add test_frozenmain to test_embed
  • Add Programs/test_frozenmain.py
  • Add Programs/freeze_test_frozenmain.py
  • Add Programs/test_frozenmain.h
  • Add make regen-test-frozenmain
  • Add test_frozenmain command to Programs/_testembed

https://bugs.python.org/issue44131

@encukou

encukou commented May 14, 2021

Copy link
Copy Markdown
Member

@vstinner

Copy link
Copy Markdown
Member Author

@encukou: "It seems wasteful to generate another frozen copy of importlib. There's already one in Python/importlib*.h; can that be used instead?"

Right, I wrote the test differently to retrieve the two frozen importlib modules from PyImport_FrozenModules.

@vstinner

Copy link
Copy Markdown
Member Author

Windows (x64): Failing:

_testembed.obj : error LNK2001: unresolved external symbol __imp_Py_FrozenMain

Ah, it looks like the https://bugs.python.org/issue44133 bug.

vstinner added 4 commits May 14, 2021 23:34
* Add test_frozenmain to test_embed
* Add Programs/test_frozenmain.py
* Add Programs/freeze_test_frozenmain.py
* Add Programs/test_frozenmain.h
* Add make regen-test-frozenmain
* Add test_frozenmain command to Programs/_testembed
* _testembed.c: add error(msg) function
@vstinner

Copy link
Copy Markdown
Member Author

Since Py_FrozenMain is not currently exported on Windows, I modified my PR to skip the test on Windows for now. I will enable the test once https://bugs.python.org/issue44133 will be fixed.

@vstinner
vstinner merged commit eaede0d into python:main May 17, 2021
@vstinner
vstinner deleted the test_frozenmain branch May 17, 2021 21:48
@bedevere-bot

bedevere-bot commented May 17, 2021

Copy link
Copy Markdown

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

Hi! The buildbot s390x RHEL7 LTO + PGO 3.x has failed when building commit eaede0d.

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/all/#builders/244/builds/208) and take a look at the build logs.
  4. Check if the failure is related to this commit (eaede0d) 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/all/#builders/244/builds/208

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

Click to see traceback logs
remote: Enumerating objects: 22, done.�[K
remote: Counting objects:   5% (1/18)�[K
remote: Counting objects:  11% (2/18)�[K
remote: Counting objects:  16% (3/18)�[K
remote: Counting objects:  22% (4/18)�[K
remote: Counting objects:  27% (5/18)�[K
remote: Counting objects:  33% (6/18)�[K
remote: Counting objects:  38% (7/18)�[K
remote: Counting objects:  44% (8/18)�[K
remote: Counting objects:  50% (9/18)�[K
remote: Counting objects:  55% (10/18)�[K
remote: Counting objects:  61% (11/18)�[K
remote: Counting objects:  66% (12/18)�[K
remote: Counting objects:  72% (13/18)�[K
remote: Counting objects:  77% (14/18)�[K
remote: Counting objects:  83% (15/18)�[K
remote: Counting objects:  88% (16/18)�[K
remote: Counting objects:  94% (17/18)�[K
remote: Counting objects: 100% (18/18)�[K
remote: Counting objects: 100% (18/18), done.�[K
remote: Compressing objects:   8% (1/12)�[K
remote: Compressing objects:  16% (2/12)�[K
remote: Compressing objects:  25% (3/12)�[K
remote: Compressing objects:  33% (4/12)�[K
remote: Compressing objects:  41% (5/12)�[K
remote: Compressing objects:  50% (6/12)�[K
remote: Compressing objects:  58% (7/12)�[K
remote: Compressing objects:  66% (8/12)�[K
remote: Compressing objects:  75% (9/12)�[K
remote: Compressing objects:  83% (10/12)�[K
remote: Compressing objects:  91% (11/12)�[K
remote: Compressing objects: 100% (12/12)�[K
remote: Compressing objects: 100% (12/12), done.�[K
remote: Total 22 (delta 6), reused 6 (delta 6), pack-reused 4�[K
From https://github.com/python/cpython
 * branch            main       -> FETCH_HEAD
Note: checking out 'eaede0ded72e67cee4a91c086847d54cb64ca74c'.

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 performing another checkout.

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

  git checkout -b new_branch_name

HEAD is now at eaede0d... [bpo-44131](https://bugs.python.org/issue44131): Test Py_FrozenMain() (GH-26126)
Switched to and reset branch 'main'

./configure: line 10527: PKG_PROG_PKG_CONFIG: command not found

find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
make[2]: [clean-retain-profile] Error 1 (ignored)
Python/ceval.c: In function ‘PyEval_EvalCodeEx’:
Python/ceval.c:5265:19: warning: ‘newargs’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         PyMem_Free(newargs);
                   ^
lto1: error: libpython3.11.a: file too short
(null):0: confused by earlier errors, bailing out
lto-wrapper: gcc returned 1 exit status
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make[3]: *** [python] Error 1
make[3]: *** Waiting for unfinished jobs....
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
make[2]: *** [build_all_generate_profile] Error 2
make[1]: *** [profile-gen-stamp] Error 2
make: *** [profile-run-stamp] Error 2

find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
make: [clean-retain-profile] Error 1 (ignored)

@bedevere-bot

bedevere-bot commented May 17, 2021

Copy link
Copy Markdown

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.

4 participants