Skip to content

test_httpservers: OSError: [Errno 39] Directory not empty #117879

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
furkanonder opened this issue Apr 14, 2024 · 0 comments
Closed

test_httpservers: OSError: [Errno 39] Directory not empty #117879

furkanonder opened this issue Apr 14, 2024 · 0 comments
Labels
3.12 only security fixes 3.13 bugs and security fixes tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@furkanonder
Copy link
Contributor

furkanonder commented Apr 14, 2024

Bug description:

Configuration:

./configure --enable-profiling

Tests

./python -m test test_httpservers -v

Output:

== CPython 3.13.0a6+ (heads/main:e01831760e, Apr 14 2024, 23:35:24) [GCC 13.2.1 20230801]
== Linux-6.8.4-arch1-1-x86_64-with-glibc2.39 little-endian
== Python build: release
== cwd: /home/arf/cpython/build/test_python_worker_59354æ
== CPU count: 16
== encodings: locale=UTF-8 FS=utf-8
== resources: all test resources are disabled, use -u option to unskip tests

Using random seed: 3724174862
0:00:00 load avg: 6.37 Run 1 test sequentially
0:00:00 load avg: 6.37 [1/1] test_httpservers
test_close_connection (test.test_httpservers.BaseHTTPRequestHandlerTestCase.test_close_connection) ... ok
test_date_time_string (test.test_httpservers.BaseHTTPRequestHandlerTestCase.test_date_time_string) ... ok
test_extra_space (test.test_httpservers.BaseHTTPRequestHandlerTestCase.test_extra_space) ... ok
test_header_buffering_of_send_error (test.test_httpservers.BaseHTTPRequestHandlerTestCase.test_header_buffering_of_send_error) ... ok
test_header_buffering_of_send_header (test.test_httpservers.BaseHTTPRequestHandlerTestCase.test_header_buffering_of_send_header) ... ok
test_header_buffering_of_send_response_only (test.test_httpservers.BaseHTTPRequestHandlerTestCase.test_header_buffering_of_send_response_only) ... ok
test_header_length (test.test_httpservers.BaseHTTPRequestHandlerTestCase.test_header_length) ... ok
test_header_unbuffered_when_continue (test.test_httpservers.BaseHTTPRequestHandlerTestCase.test_header_unbuffered_when_continue) ... ok
test_html_escape_on_error (test.test_httpservers.BaseHTTPRequestHandlerTestCase.test_html_escape_on_error) ... ok
test_http_0_9 (test.test_httpservers.BaseHTTPRequestHandlerTestCase.test_http_0_9) ... ok
test_http_1_0 (test.test_httpservers.BaseHTTPRequestHandlerTestCase.test_http_1_0) ... ok
test_http_1_1 (test.test_httpservers.BaseHTTPRequestHandlerTestCase.test_http_1_1) ... ok
test_request_length (test.test_httpservers.BaseHTTPRequestHandlerTestCase.test_request_length) ... ok
test_too_many_headers (test.test_httpservers.BaseHTTPRequestHandlerTestCase.test_too_many_headers) ... ok
test_unprintable_not_logged (test.test_httpservers.BaseHTTPRequestHandlerTestCase.test_unprintable_not_logged) ... ok
test_with_continue_1_0 (test.test_httpservers.BaseHTTPRequestHandlerTestCase.test_with_continue_1_0) ... ok
test_with_continue_1_1 (test.test_httpservers.BaseHTTPRequestHandlerTestCase.test_with_continue_1_1) ... ok
test_with_continue_rejected (test.test_httpservers.BaseHTTPRequestHandlerTestCase.test_with_continue_rejected) ... ok
test_command (test.test_httpservers.BaseHTTPServerTestCase.test_command) ... ok
test_error_content_length (test.test_httpservers.BaseHTTPServerTestCase.test_error_content_length) ... ok
test_handler (test.test_httpservers.BaseHTTPServerTestCase.test_handler) ... ok
test_head_via_send_error (test.test_httpservers.BaseHTTPServerTestCase.test_head_via_send_error) ... ok
test_header_close (test.test_httpservers.BaseHTTPServerTestCase.test_header_close) ... ok
test_header_keep_alive (test.test_httpservers.BaseHTTPServerTestCase.test_header_keep_alive) ... ok
test_internal_key_error (test.test_httpservers.BaseHTTPServerTestCase.test_internal_key_error) ... ok
test_latin1_header (test.test_httpservers.BaseHTTPServerTestCase.test_latin1_header) ... ok
test_major_version_number_too_long (test.test_httpservers.BaseHTTPServerTestCase.test_major_version_number_too_long) ... ok
test_minor_version_number_too_long (test.test_httpservers.BaseHTTPServerTestCase.test_minor_version_number_too_long) ... ok
test_request_line_trimming (test.test_httpservers.BaseHTTPServerTestCase.test_request_line_trimming) ... ok
test_return_custom_status (test.test_httpservers.BaseHTTPServerTestCase.test_return_custom_status) ... ok
test_return_explain_error (test.test_httpservers.BaseHTTPServerTestCase.test_return_explain_error) ... ok
test_return_header_keep_alive (test.test_httpservers.BaseHTTPServerTestCase.test_return_header_keep_alive) ... ok
test_send_blank (test.test_httpservers.BaseHTTPServerTestCase.test_send_blank) ... ok
test_send_error (test.test_httpservers.BaseHTTPServerTestCase.test_send_error) ... ok
test_version_bogus (test.test_httpservers.BaseHTTPServerTestCase.test_version_bogus) ... ok
test_version_digits (test.test_httpservers.BaseHTTPServerTestCase.test_version_digits) ... ok
test_version_invalid (test.test_httpservers.BaseHTTPServerTestCase.test_version_invalid) ... ok
test_version_none (test.test_httpservers.BaseHTTPServerTestCase.test_version_none) ... ok
test_version_none_get (test.test_httpservers.BaseHTTPServerTestCase.test_version_none_get) ... ok
test_version_signs_and_underscores (test.test_httpservers.BaseHTTPServerTestCase.test_version_signs_and_underscores) ... ok
test_accept (test.test_httpservers.CGIHTTPServerTestCase.test_accept) ... ERROR
test_authorization (test.test_httpservers.CGIHTTPServerTestCase.test_authorization) ... ERROR
test_cgi_path_in_sub_directories (test.test_httpservers.CGIHTTPServerTestCase.test_cgi_path_in_sub_directories) ... ERROR
test_headers_and_content (test.test_httpservers.CGIHTTPServerTestCase.test_headers_and_content) ... ERROR
test_invaliduri (test.test_httpservers.CGIHTTPServerTestCase.test_invaliduri) ... ok
test_issue19435 (test.test_httpservers.CGIHTTPServerTestCase.test_issue19435) ... ok
test_nested_cgi_path_issue21323 (test.test_httpservers.CGIHTTPServerTestCase.test_nested_cgi_path_issue21323) ... ERROR
test_no_leading_slash (test.test_httpservers.CGIHTTPServerTestCase.test_no_leading_slash) ... ERROR
test_os_environ_is_not_altered (test.test_httpservers.CGIHTTPServerTestCase.test_os_environ_is_not_altered) ... ERROR
test_post (test.test_httpservers.CGIHTTPServerTestCase.test_post) ... ERROR
test_query_with_continuous_slashes (test.test_httpservers.CGIHTTPServerTestCase.test_query_with_continuous_slashes) ... ERROR
test_query_with_multiple_question_mark (test.test_httpservers.CGIHTTPServerTestCase.test_query_with_multiple_question_mark) ... ERROR
test_url_collapse_path (test.test_httpservers.CGIHTTPServerTestCase.test_url_collapse_path) ... ok
test_urlquote_decoding_in_cgi_check (test.test_httpservers.CGIHTTPServerTestCase.test_urlquote_decoding_in_cgi_check) ... ERROR
test_all (test.test_httpservers.MiscTestCase.test_all) ... ok
test_err (test.test_httpservers.RequestHandlerLoggingTestCase.test_err) ... ok
test_get (test.test_httpservers.RequestHandlerLoggingTestCase.test_get) ... ok
test_server_test_ipv4 (test.test_httpservers.ScriptTestCase.test_server_test_ipv4) ... ok
test_server_test_ipv6 (test.test_httpservers.ScriptTestCase.test_server_test_ipv6) ... ok
test_server_test_localhost (test.test_httpservers.ScriptTestCase.test_server_test_localhost) ... ok
test_server_test_unspec (test.test_httpservers.ScriptTestCase.test_server_test_unspec) ... ok
test_query_arguments (test.test_httpservers.SimpleHTTPRequestHandlerTestCase.test_query_arguments) ... ok
test_start_with_double_slash (test.test_httpservers.SimpleHTTPRequestHandlerTestCase.test_start_with_double_slash) ... ok
test_windows_colon (test.test_httpservers.SimpleHTTPRequestHandlerTestCase.test_windows_colon) ... ok
test_browser_cache (test.test_httpservers.SimpleHTTPServerTestCase.test_browser_cache)
Check that when a request to /test is sent with the request header ... ok
test_browser_cache_file_changed (test.test_httpservers.SimpleHTTPServerTestCase.test_browser_cache_file_changed) ... ok
test_browser_cache_with_If_None_Match_header (test.test_httpservers.SimpleHTTPServerTestCase.test_browser_cache_with_If_None_Match_header) ... ok
test_get (test.test_httpservers.SimpleHTTPServerTestCase.test_get) ... ok
test_get_dir_redirect_location_domain_injection_bug (test.test_httpservers.SimpleHTTPServerTestCase.test_get_dir_redirect_location_domain_injection_bug)
Ensure //evil.co/..%2f../../X does not put //evil.co/ in Location. ... ok
test_head (test.test_httpservers.SimpleHTTPServerTestCase.test_head) ... ok
test_html_escape_filename (test.test_httpservers.SimpleHTTPServerTestCase.test_html_escape_filename) ... ok
test_invalid_requests (test.test_httpservers.SimpleHTTPServerTestCase.test_invalid_requests) ... ok
test_last_modified (test.test_httpservers.SimpleHTTPServerTestCase.test_last_modified)
Checks that the datetime returned in Last-Modified response header ... ok
test_path_without_leading_slash (test.test_httpservers.SimpleHTTPServerTestCase.test_path_without_leading_slash) ... ok
test_undecodable_filename (test.test_httpservers.SimpleHTTPServerTestCase.test_undecodable_filename) ... ok
test_undecodable_parameter (test.test_httpservers.SimpleHTTPServerTestCase.test_undecodable_parameter) ... ok

======================================================================
ERROR: test_accept (test.test_httpservers.CGIHTTPServerTestCase.test_accept)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/arf/cpython/Lib/test/test_httpservers.py", line 818, in tearDown
    os.rmdir(self.parent_dir)
    ~~~~~~~~^^^^^^^^^^^^^^^^^
OSError: [Errno 39] Directory not empty: '/tmp/tmp1h1tzv4r'

======================================================================
ERROR: test_authorization (test.test_httpservers.CGIHTTPServerTestCase.test_authorization)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/arf/cpython/Lib/test/test_httpservers.py", line 818, in tearDown
    os.rmdir(self.parent_dir)
    ~~~~~~~~^^^^^^^^^^^^^^^^^
OSError: [Errno 39] Directory not empty: '/tmp/tmpbgszmbsn'

======================================================================
ERROR: test_cgi_path_in_sub_directories (test.test_httpservers.CGIHTTPServerTestCase.test_cgi_path_in_sub_directories)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/arf/cpython/Lib/test/test_httpservers.py", line 818, in tearDown
    os.rmdir(self.parent_dir)
    ~~~~~~~~^^^^^^^^^^^^^^^^^
OSError: [Errno 39] Directory not empty: '/tmp/tmp9y_so6st'

======================================================================
ERROR: test_headers_and_content (test.test_httpservers.CGIHTTPServerTestCase.test_headers_and_content)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/arf/cpython/Lib/test/test_httpservers.py", line 818, in tearDown
    os.rmdir(self.parent_dir)
    ~~~~~~~~^^^^^^^^^^^^^^^^^
OSError: [Errno 39] Directory not empty: '/tmp/tmpz35qy5vx'

======================================================================
ERROR: test_nested_cgi_path_issue21323 (test.test_httpservers.CGIHTTPServerTestCase.test_nested_cgi_path_issue21323)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/arf/cpython/Lib/test/test_httpservers.py", line 818, in tearDown
    os.rmdir(self.parent_dir)
    ~~~~~~~~^^^^^^^^^^^^^^^^^
OSError: [Errno 39] Directory not empty: '/tmp/tmp_cvvyzsz'

======================================================================
ERROR: test_no_leading_slash (test.test_httpservers.CGIHTTPServerTestCase.test_no_leading_slash)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/arf/cpython/Lib/test/test_httpservers.py", line 818, in tearDown
    os.rmdir(self.parent_dir)
    ~~~~~~~~^^^^^^^^^^^^^^^^^
OSError: [Errno 39] Directory not empty: '/tmp/tmpel2n0m1e'

======================================================================
ERROR: test_os_environ_is_not_altered (test.test_httpservers.CGIHTTPServerTestCase.test_os_environ_is_not_altered)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/arf/cpython/Lib/test/test_httpservers.py", line 818, in tearDown
    os.rmdir(self.parent_dir)
    ~~~~~~~~^^^^^^^^^^^^^^^^^
OSError: [Errno 39] Directory not empty: '/tmp/tmpazpth3_5'

======================================================================
ERROR: test_post (test.test_httpservers.CGIHTTPServerTestCase.test_post)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/arf/cpython/Lib/test/test_httpservers.py", line 818, in tearDown
    os.rmdir(self.parent_dir)
    ~~~~~~~~^^^^^^^^^^^^^^^^^
OSError: [Errno 39] Directory not empty: '/tmp/tmpyv1olkj6'

======================================================================
ERROR: test_query_with_continuous_slashes (test.test_httpservers.CGIHTTPServerTestCase.test_query_with_continuous_slashes)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/arf/cpython/Lib/test/test_httpservers.py", line 818, in tearDown
    os.rmdir(self.parent_dir)
    ~~~~~~~~^^^^^^^^^^^^^^^^^
OSError: [Errno 39] Directory not empty: '/tmp/tmpoovm41tl'

======================================================================
ERROR: test_query_with_multiple_question_mark (test.test_httpservers.CGIHTTPServerTestCase.test_query_with_multiple_question_mark)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/arf/cpython/Lib/test/test_httpservers.py", line 818, in tearDown
    os.rmdir(self.parent_dir)
    ~~~~~~~~^^^^^^^^^^^^^^^^^
OSError: [Errno 39] Directory not empty: '/tmp/tmps71xpjbp'

======================================================================
ERROR: test_urlquote_decoding_in_cgi_check (test.test_httpservers.CGIHTTPServerTestCase.test_urlquote_decoding_in_cgi_check)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/arf/cpython/Lib/test/test_httpservers.py", line 818, in tearDown
    os.rmdir(self.parent_dir)
    ~~~~~~~~^^^^^^^^^^^^^^^^^
OSError: [Errno 39] Directory not empty: '/tmp/tmpasfmgl7g'

----------------------------------------------------------------------
Ran 76 tests in 2.008s

FAILED (errors=11)
test test_httpservers failed
test_httpservers failed (11 errors)

== Tests result: FAILURE ==

1 test failed:
    test_httpservers

Total duration: 2.1 sec
Total tests: run=76
Total test files: run=1/1 failed=1
Result: FAILURE

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

@furkanonder furkanonder added tests Tests in the Lib/test dir 3.13 bugs and security fixes labels Apr 14, 2024
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this issue Apr 16, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Apr 17, 2024
@serhiy-storchaka serhiy-storchaka added the 3.12 only security fixes label Apr 17, 2024
serhiy-storchaka added a commit that referenced this issue Apr 17, 2024
@furkanonder furkanonder added the type-bug An unexpected behavior, bug, or error label Apr 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.12 only security fixes 3.13 bugs and security fixes tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants