summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_subprocess.py
Commit message (Collapse)AuthorAgeFilesLines
* [3.4] Backport CI config from master (#2475)Victor Stinner2017-07-221-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Issues #23808, #25911: Trying to fix walk tests on Windows. On Windows a symlink can has the FILE_ATTRIBUTE_DIRECTORY flag. (cherry picked from commit 388b90f28e029daaf06aae8026b596e2f20a1cd3) * bpo-30231: Remove skipped test_imaplib tests (#1419) (#2193) The public cyrus.andrew.cmu.edu IMAP server (port 993) doesn't accept TLS connection using our self-signed x509 certificate. Remove the two tests which are already skipped. (cherry picked from commit 7895a0585b4b6a1c8082d17227307c6ce2c8bb8b) * Backport CI config from master * Add .travis.yml for Travis CI * Add .github/ for AppVeyor and CodeCov. * Travis CI: remove "make regen-all" check The regen-all Makefile rule doesn't exist in Python 3.4, only since Python 3.5 and newer (and 2.7). * appveyor: replace --slowest with --slow * Travis CI: remove the GCC coverage job * Travis CI: remove tzdata resource from regrtest tzdata resource doesn't exist in Python 3.4. * Travis CI: remove the doc job Fixing Sphinx warnings requires to backport huge intrusive changes like: - commit d97b7dc94b19063f0589d401bdc4aaadc7030762 - commit 5c6793394066b012b9674681b0815667938ce4d9 * appveyor: set version to 3.4.6+ * bpo-30730: Fix test_os tests. Fix test_invalid_cmd() and test_invalid_env(), TypeError is raised on Python 3.4. (cherry picked from commit 5e22721e586344b547194f0f7ea67fd425f94e72)
* [security][3.4] bpo-30730: Prevent environment variables injection in ↵Serhiy Storchaka2017-07-111-0/+40
| | | | | | | | | | | subprocess on Windows. (GH-2325) (#2362) * [3.4] bpo-30730: Prevent environment variables injection in subprocess on Windows. (GH-2325) Prevent passing other invalid environment variables and command arguments.. (cherry picked from commit d174d24a5d37d1516b885dc7c82f71ecd5930700) * Update NEWS
* Issue #25764: Skip the test on OS XMartin Panter2015-12-051-0/+2
| | | | | | | The OS X buildbots were failing at the second setrlimit() call with EPERM, as if they were trying to raise the hard limit. The call should be keeping the hard limit the same and raising the soft limit back to its original value, so I don't understand the failure.
* Issue #25764: Preserve subprocess fork exception when preexec_fn usedMartin Panter2015-11-301-0/+16
| | | | Also fix handling of failure to release the import lock.
* Issue #25249: Remove unneeded mkstemp helper in test_subprocessBerker Peksag2015-09-281-18/+8
| | | | | | | The helper was added in 76641824cf05 11 years ago and it can be removed now since all supported Python versions have tempfile.mkstemp(). Patch by Nir Soffer.
* Use support.change_cwd() in tests.Serhiy Storchaka2015-09-061-5/+2
|
* Issue #21619: Cleaned up test_broken_pipe_cleanup.Serhiy Storchaka2015-03-081-10/+8
| | | | Patch by Martin Panter.
* Issue #21619: Try to fix test_broken_pipe_cleanup()Victor Stinner2015-03-051-6/+9
|
* Fixed a test for issue #21619 on Windows.Serhiy Storchaka2015-02-281-1/+1
| | | | On Windows an OSError with errno=EINVAL is raised.
* Issue #21619: Popen objects no longer leave a zombie after exit in the withSerhiy Storchaka2015-02-281-0/+15
| | | | statement if the pipe was broken. Patch by Martin Panter.
* Use os.devnull instead of hardcoded '/dev/null'.Serhiy Storchaka2015-02-151-2/+2
|
* Issue #22290: Fix error handling in the _posixsubprocess module.Victor Stinner2014-10-051-0/+33
| | | | | | | | * Don't call the garbage collector with an exception set: it causes an assertion to fail in debug mode. * Enhance also error handling if allocating an array for the executable list failed. * Add an unit test for 4 different errors in the _posixsubprocess module.
* Issue #21332: Ensure that ``bufsize=1`` in subprocess.Popen() selects line ↵Antoine Pitrou2014-09-211-0/+33
| | | | buffering, rather than block buffering.
* fix a BytesWarning in my previous commit.Gregory P. Smith2014-06-161-1/+1
|
* Isolate the subprocess test_close_fds_when_max_fd_is_lowered test soGregory P. Smith2014-06-161-8/+30
| | | | | | that the rlimit calls happens in a child process rather than the TestCase process to attempt to fix the gentoo buildbot's "Too many open files" error.
* Skip test_subprocess test_close_fds_when_max_fd_is_lowered on FreeBSDGregory P. Smith2014-06-011-0/+3
| | | | when fdescfs is not mounted on /dev/fd.
* Attempt to fix the "too many open files" errors on several of theGregory P. Smith2014-06-011-4/+6
| | | | | buildbots that the new test_close_fds_when_max_fd_is_lowered test causes. It now leaves 10 more low fd's available.
* Explicitly wait for the child instead of letting a destructor do it.Gregory P. Smith2014-06-011-1/+1
|
* Don't restrict ourselves to a "max" fd when closing fds before exec()Gregory P. Smith2014-06-011-0/+53
| | | | | | | | | when we have a way to get an actual list of all open fds from the OS. Fixes issue #21618: The subprocess module would ignore fds that were inherited by the calling process and already higher than POSIX resource limits would otherwise allow. On systems with a functioning /proc/self/fd or /dev/fd interface the max is now ignored and all fds are closed.
* Issue #21396: Fix TextIOWrapper(..., write_through=True) to not force a ↵Antoine Pitrou2014-05-081-0/+1
| | | | | | flush() on the underlying binary stream. Patch by akira.
* fix the test on windows which has different return codes from killedGregory P. Smith2014-04-231-5/+10
| | | | children.
* subprocess's Popen.wait() is now thread safe so that multiple threadsGregory P. Smith2014-04-231-0/+48
| | | | | may be calling wait() or poll() on a Popen instance at the same time without losing the Popen.returncode value. Fixes issue #21291.
* Fixes issue #15798: subprocess.Popen() no longer fails if fileGregory P. Smith2013-12-021-0/+21
| | | | descriptor 0, 1 or 2 is closed. (correct fix for 3.4 this time)
* Undo supposed fix for Issue #15798 until I understand why this isGregory P. Smith2013-12-011-21/+0
|\ | | | | | | | | causing test_multiprocessing_forkserver and test_multiprocessing_spawn failures on head (3.4).
| * Undo supposed fix for Issue #15798 until I understand why this isGregory P. Smith2013-12-011-21/+0
| | | | | | | | | | causing test_multiprocessing_forkserver and test_multiprocessing_spawn failures on head (3.4).
* | Fixes Issue #15798 - subprocess.Popen() no longer fails if fileGregory P. Smith2013-12-011-0/+21
|\ \ | |/ | | | | descriptor 0, 1 or 2 is closed.
| * Fixes Issue #15798 - subprocess.Popen() no longer fails if fileGregory P. Smith2013-12-011-0/+21
| | | | | | | | descriptor 0, 1 or 2 is closed.
* | Issue #19637: fix test_undecodable_env() of test_subprocess on AIXVictor Stinner2013-11-191-5/+12
| | | | | | | | On AIX, the C locale encoding uses the ISO-8859-1 encoding, not ASCII.
* | Issue #18923: Update subprocess to use the new selectors module.Charles-François Natali2013-11-081-4/+6
| |
* | Issue #10197 Rework subprocess.get[status]output to use subprocess ↵Tim Golden2013-11-031-9/+2
|\ \ | |/ | | | | functionality and thus to work on Windows. Patch by Nick Coghlan.
| * Issue #10197 Rework subprocess.get[status]output to use subprocess ↵Tim Golden2013-11-031-9/+2
| | | | | | | | functionality and thus to work on Windows. Patch by Nick Coghlan.
* | Issue #9548: Add a minimal "_bootlocale" module that is imported by the _io ↵Antoine Pitrou2013-10-111-3/+4
| | | | | | | | module instead of the full locale module.
* | Issue #18948: improve SuppressCoreFiles to include Windows crash popup ↵Antoine Pitrou2013-10-081-1/+1
| | | | | | | | | | | | suppression, and use it in more tests. Patch by Valerie Lambert and Zachary Ware.
* | Issue #18623: Factor out the _SuppressCoreFiles context manager into ↵Antoine Pitrou2013-09-061-46/+1
| | | | | | | | | | | | test.support. Patch by Valerie Lambert.
* | Issue #18571: Merge duplicate test codeVictor Stinner2013-09-011-2/+2
| | | | | | | | Merge test/subprocessdata/inherited.py into test/subprocessdata/fd_status.py
* | Forward port new tests from Issue #18851.Antoine Pitrou2013-08-301-0/+34
|\ \ | |/
| * Forward port new tests from Issue #18851.Antoine Pitrou2013-08-301-0/+34
| |
* | Fixes Issue #15507: test_subprocess's test_send_signal could fail if the testGregory P. Smith2013-08-291-10/+16
|\ \ | |/ | | | | | | | | runner were run in an environment where the process inherited an ignore setting for SIGINT. Restore the SIGINT handler to the desired KeyboardInterrupt raising one during that test.
| * Fixes issue #15507: test_subprocess's test_send_signal could fail if the testGregory P. Smith2013-08-291-10/+16
| | | | | | | | | | | | runner were run in an environment where the process inherited an ignore setting for SIGINT. Restore the SIGINT handler to the desired KeyboardInterrupt raising one during that test.
* | Issue #18571: Implementation of the PEP 446: file descriptors and file handlesVictor Stinner2013-08-271-19/+54
| | | | | | | | | | are now created non-inheritable; add functions os.get/set_inheritable(), os.get/set_handle_inheritable() and socket.socket.get/set_inheritable().
* | Merge.Charles-François Natali2013-08-251-0/+17
|\ \ | |/
| * Issue #18763: subprocess: The file descriptors are now closed after calling theCharles-François Natali2013-08-251-0/+17
| | | | | | | | preexec_fn callback, which may open file descriptors.
* | Issue #17046: merge from 3.3Ned Deily2013-08-031-1/+2
|\ \ | |/
| * Issue #17046: Fix test_subprocess test_executable_without_cwd broken test case.Ned Deily2013-08-031-1/+2
| |
* | Fix the RLIMIT_CORE resource lowering logic in test_subprocess.Antoine Pitrou2013-08-011-1/+1
| | | | | | | | | | We must only lower the soft limit, since lowering the hard limit makes it impossible to raise it back at the end. (this could prevent core dumps from being generated when the test suite crashes)
* | Merge.Richard Oudkerk2013-06-101-1/+2
|\ \ | |/
| * Issue #18174: Fix fd leaks in tests.Richard Oudkerk2013-06-101-1/+2
| |
* | Try to make test more reliable (saw some sporadic failures on buildbots)Antoine Pitrou2013-05-191-3/+3
|\ \ | |/
| * Try to make test more reliable (saw some sporadic failures on buildbots)Antoine Pitrou2013-05-191-3/+3
| |
* | Issue #16624: `subprocess.check_output` now accepts an `input` argument,Serhiy Storchaka2013-04-221-1/+35
| | | | | | | | | | allowing the subprocess's stdin to be provided as a (byte) string. Patch by Zack Weinberg.