Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue23919

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:[Windows] test_os fails several C-level assertions
Type:behaviorStage:resolved
Components:WindowsVersions:Python 3.6, Python 3.5
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To: steve.dowerNosy List: python-dev, steve.dower, tim.golden, vstinner, zach.ware
Priority:normalKeywords:patch

Created on2015-04-12 02:34 byzach.ware, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.

Files
File nameUploadedDescriptionEdit
23919_1.patchsteve.dower,2015-10-03 20:24
Messages (11)
msg240522 -(view)Author: Zachary Ware (zach.ware)*(Python committer)Date: 2015-04-12 02:34
Uninteresting bits of the output elided:C:\Data\code\CPython\hg.python.org\default>python -m test -vn test_osRunning Debug|Win32 interpreter...== CPython 3.5.0a3+ (default:0b3027a2abbc, Apr 11 2015, 21:11:57) [MSC v.1900 32 bit (Intel)]==   Windows-post2012Server-6.3.9600 little-endian==   hash algorithm: siphash24 32bit==   C:\Data\code\CPython\hg.python.org\default\build\test_python_4312Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, verbose=0,bytes_warning=0, quiet=0, hash_randomization=1, isolated=0)[1/1] test_os...test_bad_fd (test.test_os.DeviceEncodingTests) ... minkernel\crts\ucrt\src\appcrt\lowio\osfinfo.cpp(257) : Assertion failed: fh >= 0 && (unsigned)fh < (unsigned)_nhandleok...test_closerange (test.test_os.FileTests) ... minkernel\crts\ucrt\src\appcrt\lowio\osfinfo.cpp(258) : Assertion failed: _osfile(fh) & FOPENminkernel\crts\ucrt\src\appcrt\lowio\osfinfo.cpp(258) : Assertion failed: _osfile(fh) & FOPENok...test_15261 (test.test_os.StatAttributeTests) ... minkernel\crts\ucrt\src\appcrt\lowio\osfinfo.cpp(258) : Assertion failed: _osfile(fh) & FOPENok...test_stty_match (test.test_os.TermsizeTests)Check if stty returns the same results ... minkernel\crts\ucrt\src\appcrt\lowio\osfinfo.cpp(257) : Assertion failed: fh >= 0 && (unsigned)fh < (unsigned)_nhandleskipped 'stty invocation failed'...test_closerange (test.test_os.TestInvalidFD) ... minkernel\crts\ucrt\src\appcrt\lowio\osfinfo.cpp(258) : Assertion failed: _osfile(fh) & FOPENminkernel\crts\ucrt\src\appcrt\lowio\osfinfo.cpp(258) : Assertion failed: _osfile(fh) & FOPENminkernel\crts\ucrt\src\appcrt\lowio\osfinfo.cpp(258) : Assertion failed: _osfile(fh) & FOPENminkernel\crts\ucrt\src\appcrt\lowio\osfinfo.cpp(258) : Assertion failed: _osfile(fh) & FOPENminkernel\crts\ucrt\src\appcrt\lowio\osfinfo.cpp(258) : Assertion failed: _osfile(fh) & FOPENminkernel\crts\ucrt\src\appcrt\lowio\osfinfo.cpp(258) : Assertion failed: _osfile(fh) & FOPENminkernel\crts\ucrt\src\appcrt\lowio\osfinfo.cpp(258) : Assertion failed: _osfile(fh) & FOPENminkernel\crts\ucrt\src\appcrt\lowio\osfinfo.cpp(258) : Assertion failed: _osfile(fh) & FOPENminkernel\crts\ucrt\src\appcrt\lowio\osfinfo.cpp(258) : Assertion failed: _osfile(fh) & FOPENminkernel\crts\ucrt\src\appcrt\lowio\osfinfo.cpp(258) : Assertion failed: _osfile(fh) & FOPENminkernel\crts\ucrt\src\appcrt\lowio\osfinfo.cpp(258) : Assertion failed: _osfile(fh) & FOPENminkernel\crts\ucrt\src\appcrt\lowio\osfinfo.cpp(258) : Assertion failed: _osfile(fh) & FOPENminkernel\crts\ucrt\src\appcrt\lowio\osfinfo.cpp(258) : Assertion failed: _osfile(fh) & FOPENminkernel\crts\ucrt\src\appcrt\lowio\osfinfo.cpp(258) : Assertion failed: _osfile(fh) & FOPENminkernel\crts\ucrt\src\appcrt\lowio\osfinfo.cpp(258) : Assertion failed: _osfile(fh) & FOPENminkernel\crts\ucrt\src\appcrt\lowio\osfinfo.cpp(258) : Assertion failed: _osfile(fh) & FOPENminkernel\crts\ucrt\src\appcrt\lowio\osfinfo.cpp(258) : Assertion failed: _osfile(fh) & FOPENminkernel\crts\ucrt\src\appcrt\lowio\osfinfo.cpp(258) : Assertion failed: _osfile(fh) & FOPENoktest_dup (test.test_os.TestInvalidFD) ... minkernel\crts\ucrt\src\appcrt\lowio\osfinfo.cpp(258) : Assertion failed: _osfile(fh) & FOPENoktest_dup2 (test.test_os.TestInvalidFD) ... minkernel\crts\ucrt\src\appcrt\lowio\osfinfo.cpp(258) : Assertion failed: _osfile(fh) & FOPENok...test_fdopen (test.test_os.TestInvalidFD) ... minkernel\crts\ucrt\src\appcrt\lowio\osfinfo.cpp(258) : Assertion failed: _osfile(fh) & FOPENok...test_fstat (test.test_os.TestInvalidFD) ... minkernel\crts\ucrt\src\appcrt\lowio\osfinfo.cpp(258) : Assertion failed: _osfile(fh) & FOPENok...test_fsync (test.test_os.TestInvalidFD) ... minkernel\crts\ucrt\src\appcrt\lowio\osfinfo.cpp(258) : Assertion failed: _osfile(fh) & FOPENok...test_inheritable (test.test_os.TestInvalidFD) ... minkernel\crts\ucrt\src\appcrt\lowio\osfinfo.cpp(258) : Assertion failed: _osfile(fh) & FOPENminkernel\crts\ucrt\src\appcrt\lowio\osfinfo.cpp(258) : Assertion failed: _osfile(fh) & FOPENoktest_isatty (test.test_os.TestInvalidFD) ... minkernel\crts\ucrt\src\appcrt\lowio\osfinfo.cpp(258) : Assertion failed: _osfile(fh) & FOPENoktest_lseek (test.test_os.TestInvalidFD) ... minkernel\crts\ucrt\src\appcrt\lowio\osfinfo.cpp(258) : Assertion failed: _osfile(fh) & FOPENoktest_read (test.test_os.TestInvalidFD) ... minkernel\crts\ucrt\src\appcrt\lowio\osfinfo.cpp(258) : Assertion failed: _osfile(fh) & FOPENok...test_write (test.test_os.TestInvalidFD) ... minkernel\crts\ucrt\src\appcrt\lowio\osfinfo.cpp(258) : Assertion failed: _osfile(fh) & FOPENok...----------------------------------------------------------------------Ran 189 tests in 7.424sOK (skipped=75)1 test OK.
msg240528 -(view)Author: Steve Dower (steve.dower)*(Python committer)Date: 2015-04-12 03:22
The fix for these is to hide the output, which is in the test modules handling of the -n option.The assertions should fail, as they are testing error conditions.
msg240529 -(view)Author: Zachary Ware (zach.ware)*(Python committer)Date: 2015-04-12 03:24
Here's the problem with that:C:\Data\code\CPython\hg.python.org\default>python -m test.test_osRunning Debug|Win32 interpreter...s.ssss.<crash with error popup>
msg240552 -(view)Author: Steve Dower (steve.dower)*(Python committer)Date: 2015-04-12 10:57
I mean we just suppress the output completely. Currently it sets the mode to stderr but we can set it to silent, though I don't recall what the name of the constant we need is.
msg240591 -(view)Author: STINNER Victor (vstinner)*(Python committer)Date: 2015-04-13 07:18
> The fix for these is to hide the output, which is in the test modules handling of the -n option.Since Python raises an exception for EBADF, I don't see the purpose of these assertion messages.
msg241013 -(view)Author: Steve Dower (steve.dower)*(Python committer)Date: 2015-04-14 20:30
So just discussed with Zach the idea of hiding all assertion outputs by default and then using -n to display the output on stderr. That would help people get started running tests locally as well, since the dialogs that appear by default look like pretty bad failures.One of us will get a patch together and probably review it in person, since it's a fairly simple change, but if anyone not at PyCon has a strong opinion it'd be good to hear it.
msg252238 -(view)Author: Steve Dower (steve.dower)*(Python committer)Date: 2015-10-03 20:24
This patch:* defaults to no assert dialogs and no stderr output* enables stderr output for assertions on "-vv" (or more)* displays a deprecation message on "-n"
msg252262 -(view)Author: STINNER Victor (vstinner)*(Python committer)Date: 2015-10-04 08:10
I would prefer to disable the popups and messages to stderr by default in Python directly. If some users want to see them, we can add a -X option to enable them. Example: -X enable_mscrt_checks. What do you think? Do you recall who complain that Python hides MSCRT warnings? And why he/she complained?I don't want these warnings, especially popups blocking my program, on my own applications. Python already raises OSError on errors.The problem in tests is also that some tests use subprocesses and regrtest only configures the test runner, not subprocesses. For example, I had to modify a subprocess started by the test. Otherwise, the test *hangs* :-(Popups are annoying because it's not possible to ignore them all by a single click. I have to click N times for N errors, with N>100 it's just a nightmare...For me, it's a regression compared to older Python versions. I don't remember to have to click on so much popups or have stderr flooded by warnings when working on Windows, when I worked on Python 3.4 or older.
msg252263 -(view)Author: STINNER Victor (vstinner)*(Python committer)Date: 2015-10-04 08:11
23919_1.patch looks good to me.
msg252266 -(view)Author: Steve Dower (steve.dower)*(Python committer)Date: 2015-10-04 12:52
I referred to the issues that had -n added in the first place many times while adding the IPH handlers, but I don't have them handy now on my phone.The rationale was that people who cause assertions in their C extensions should see them and not have Python suppress them. All cases where an assert is raised in a debug build is a coding error - the test suite deliberately causes some but this is not normal development and should not dictate normal configuration.
msg252552 -(view)Author: Roundup Robot (python-dev)(Python triager)Date: 2015-10-08 16:08
New changeset69c4fa62b608 by Steve Dower in branch '3.5':Issue#23919: Prevents assert dialogs appearing in the test suite.https://hg.python.org/cpython/rev/69c4fa62b608New changeset62897db9ae51 by Steve Dower in branch 'default':Issue#23919: Prevents assert dialogs appearing in the test suite.https://hg.python.org/cpython/rev/62897db9ae51
History
DateUserActionArgs
2022-04-11 14:58:15adminsetgithub: 68107
2015-10-08 16:15:11steve.dowersetstatus: open -> closed
resolution: fixed
stage: needs patch -> resolved
2015-10-08 16:08:17python-devsetnosy: +python-dev
messages: +msg252552
2015-10-04 12:52:04steve.dowersetmessages: +msg252266
2015-10-04 08:11:13vstinnersetmessages: +msg252263
2015-10-04 08:10:15vstinnersetmessages: +msg252262
2015-10-03 20:24:10steve.dowersetfiles: +23919_1.patch
versions: + Python 3.6
messages: +msg252238

assignee:steve.dower
keywords: +patch
2015-04-14 20:30:12steve.dowersetmessages: +msg241013
2015-04-13 07:18:44vstinnersettitle: test_os fails several C-level assertions -> [Windows] test_os fails several C-level assertions
2015-04-13 07:18:12vstinnersetmessages: +msg240591
2015-04-12 10:57:52steve.dowersetmessages: +msg240552
2015-04-12 05:20:03serhiy.storchakasetnosy: +vstinner
2015-04-12 03:24:15zach.waresetmessages: +msg240529
2015-04-12 03:22:14steve.dowersetmessages: +msg240528
2015-04-12 02:34:27zach.warecreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp