Bug 1685557

Summary: python3.spec skips test_distutils and test_bdist_rpm
Product: [Fedora] Fedora Reporter: Victor Stinner <vstinner>
Component: python3Assignee: Victor Stinner <vstinner>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: cstratak, dmalcolm, mcyprian, mhroncok, pviktori, rkuska, shcherbina.iryna, tomspur, torsava
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-07-02 12:56:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Victor Stinner 2019-03-05 13:42:26 UTC
python3.spec skips test_distutils and test_bdist_rpm.

The whole test files shouldn't be skipped, but only failing test methods should be fixed.

Obviously, the best would be to fix the tests upstream.

Comment 1 Miro Hrončok 2019-03-05 13:46:53 UTC
I was once told that running rpmbuild from withing rpmbuild is dangerous. I've never actually seen it blow up, so consider this just a note.

Comment 2 Victor Stinner 2019-03-05 14:25:30 UTC
> I was once told that running rpmbuild from withing rpmbuild is dangerous.

If it's the case, we can skip the test if WITHIN_PYTHON_RPM_BUILD env var is set using our @unittest._skipInRpmBuild(reason) decorator.

But I would prefer to put this decorator upstream rather than maintaining such code downstream.

Comment 3 Miro Hrončok 2019-03-05 14:36:37 UTC
Let's focus on moving this decorator upstream and changing it to check RPM_BUILD_ROOT instead. The custom variable is just weird.

Comment 4 Victor Stinner 2019-03-05 14:42:51 UTC
About WITHIN_PYTHON_RPM_BUILD, I proposed a change to no longer skip RecvmsgGenericStreamTests.testRecvmsgEOF() of test_socket:
https://src.fedoraproject.org/rpms/python3/pull-request/94

Comment 5 Victor Stinner 2019-03-05 14:55:45 UTC
And I wrote the following PR to "Reenable test_posix.test_fs_holes()":
https://src.fedoraproject.org/rpms/python3/pull-request/95

Comment 6 Victor Stinner 2019-04-16 13:41:29 UTC
Scratch build with the 2 tests reenabled:
https://koji.fedoraproject.org/koji/taskinfo?taskID=34213261

Comment 7 Victor Stinner 2019-06-11 14:59:51 UTC
Sine the scratchbuild was successful, I proposed a PR to simply reenable the two tests:
https://src.fedoraproject.org/rpms/python38/pull-request/24

Comment 8 Miro Hrončok 2019-06-26 12:10:12 UTC
Fixed in python38 master. https://src.fedoraproject.org/rpms/python38/pull-request/25