You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
====================================================== ERRORS =======================================================
__________________________________ ERROR at setup of TestBasic.test_01_01_http_get __________________________________
E assert False
E + where False = <bound method Httpd.start of <testenv.httpd.Httpd object at 0x109a0a3e0>>()
E + where <bound method Httpd.start of <testenv.httpd.Httpd object at 0x109a0a3e0>> = <testenv.httpd.Httpd object at 0x109a0a3e0>.start
conftest.py:62: AssertionError
------------------------------------------------ Captured log setup -------------------------------------------------
DEBUG testenv.httpd:httpd.py:182 Server still not responding after 0:00:05
_________________________________ ERROR at setup of TestBasic.test_01_02_https_get __________________________________
E assert False
E + where False = <bound method Httpd.start of <testenv.httpd.Httpd object at 0x109a0a3e0>>()
E + where <bound method Httpd.start of <testenv.httpd.Httpd object at 0x109a0a3e0>> = <testenv.httpd.Httpd object at 0x109a0a3e0>.start
conftest.py:62: AssertionError
___________________________________ ERROR at setup of TestBasic.test_01_03_h2_get ___________________________________
E assert False
E + where False = <bound method Httpd.start of <testenv.httpd.Httpd object at 0x109a0a3e0>>()
E + where <bound method Httpd.start of <testenv.httpd.Httpd object at 0x109a0a3e0>> = <testenv.httpd.Httpd object at 0x109a0a3e0>.start
conftest.py:62: AssertionError
_______________________________ ERROR at setup of TestBasic.test_01_04_h2_unsupported _______________________________
E assert False
E + where False = <bound method Httpd.start of <testenv.httpd.Httpd object at 0x109a0a3e0>>()
E + where <bound method Httpd.start of <testenv.httpd.Httpd object at 0x109a0a3e0>> = <testenv.httpd.Httpd object at 0x109a0a3e0>.start
conftest.py:62: AssertionError
============================================== short test summary info ==============================================
ERROR test_01_basic.py::TestBasic::test_01_01_http_get - assert False
ERROR test_01_basic.py::TestBasic::test_01_02_https_get - assert False
ERROR test_01_basic.py::TestBasic::test_01_03_h2_get - assert False
ERROR test_01_basic.py::TestBasic::test_01_04_h2_unsupported - assert False
=================================== 1 skipped, 117 deselected, 4 errors in 11.96s ==...
The curl code branch
curl/tests/http % git branch -a
System: Darwin B-Q1BDMD6R-2034.local 22.1.0 Darwin Kernel Version 22.1.0: Sun Oct 9 20:14:54 PDT 2022; root:xnu-8792.41.9~2/RELEASE_X86_64 x86_64
OS: darwin
*** DISABLES memory tracking when using threaded resolver
*
Servers: SSL HTTP-IPv6 HTTP-unix FTP-IPv6
Env:
Seed: 206474
test 0003...OK (1 out of 1 , remaining: 00:00, took 1.417s, duration: 00:01)
TESTDONE: 1 tests were considered during 1 seconds.
TESTDONE: 1 tests out of 1 reported OK: 100%
the curl.trace:
15:19:37.125160 == Info: !!! WARNING !!!
15:19:37.125763 == Info: This is a debug build of libcurl, do not use in production.
15:19:37.125789 == Info: Added one.http.curl.se:60852:127.0.0.1 to DNS cache
15:19:37.125802 == Info: STATE: INIT => CONNECT handle 0x7f8ab1011c08; line 1950 (connection #-5000)
15:19:37.125853 == Info: Added connection 0. The cache now contains 1 members
15:19:37.125863 == Info: Hostname one.http.curl.se was found in DNS cache
15:19:37.125874 == Info: STATE: CONNECT => CONNECTING handle 0x7f8ab1011c08; line 2003 (connection #0)
15:19:37.125951 == Info: Trying 127.0.0.1:60852...
15:19:37.126069 == Info: connect to 127.0.0.1 port 60852 failed: Connection refused
15:19:37.126083 == Info: Failed to connect to one.http.curl.se port 60852 after 0 ms: Couldn't connect to server
15:19:37.126092 == Info: multi_done: status: 7 prem: 1 done: 0
15:19:37.126101 == Info: multi_done, not re-using connection=0, forbid=0, close=0, premature=1, conn_multiplex=0
15:19:37.126109 == Info: The cache now contains 0 members
15:19:37.126114 == Info: Curl_disconnect(conn #0, dead=1)
15:19:37.126123 == Info: Closing connection 0
15:19:37.126132 == Info: Expire cleared (transfer 0x7f8ab1011c08)
I expected the following
The pytest command is successful.
operating system
Darwin B-Q1BDMD6R-2034.local 22.1.0 Darwin Kernel Version 22.1.0: Sun Oct 9 20:14:54 PDT 2022; root:xnu-8792.41.9~2/RELEASE_X86_64 x86_64
The text was updated successfully, but these errors were encountered:
Thanks for the report. The check on a suitable httpd for the pytests was not very helpful so far. I added #10883 to improve this and the error messages it gives.
Generally, I would not advise to run sudo pytest. It is not necessary.
Note that the pytest suite looks for three commands httpd, apachectl and apxs. You seem to be on macOS, which provides the first two, but not apxs. On Linux distributions, apxs is installed via the apache2-dev package. On macOS, I am not sure if homebrew or other package managers do that.
It would be nice to hear if #10883 improves the situation for you.
@bagder hi,like "#10863 (comment)"
I have similar problem, when run test in directory “curl/tests/http”,such as,
I did this
curl/tests/http % sudo pytest -k "test_01_basic" -vvv
Password:
================================================ test session starts ================================================
platform darwin -- Python 3.10.10, pytest-7.2.2, pluggy-1.0.0 -- /usr/local/opt/python@3.10/bin/python3.10
cachedir: .pytest_cache
Testing curl 8.1.0-DEV
httpd: 2.4.56, http:60852 https:60853
httpd-proxy: 2.4.56, http:60854 https:60855
rootdir: /Users/zhangfugang/code/curl/curl/tests/http
collected 122 items / 117 deselected / 5 selected
test_01_basic.py::TestBasic::test_01_01_http_get ERROR [ 20%]
test_01_basic.py::TestBasic::test_01_02_https_get ERROR [ 40%]
test_01_basic.py::TestBasic::test_01_03_h2_get ERROR [ 60%]
test_01_basic.py::TestBasic::test_01_04_h2_unsupported ERROR [ 80%]
test_01_basic.py::TestBasic::test_01_05_h3_get SKIPPED (h3 not supported) [100%]
====================================================== ERRORS =======================================================
__________________________________ ERROR at setup of TestBasic.test_01_01_http_get __________________________________
env = <testenv.env.Env object at 0x109945750>
E assert False
E + where False = <bound method Httpd.start of <testenv.httpd.Httpd object at 0x109a0a3e0>>()
E + where <bound method Httpd.start of <testenv.httpd.Httpd object at 0x109a0a3e0>> = <testenv.httpd.Httpd object at 0x109a0a3e0>.start
conftest.py:62: AssertionError
------------------------------------------------ Captured log setup -------------------------------------------------
DEBUG testenv.httpd:httpd.py:182 Server still not responding after 0:00:05
_________________________________ ERROR at setup of TestBasic.test_01_02_https_get __________________________________
env = <testenv.env.Env object at 0x109945750>
E assert False
E + where False = <bound method Httpd.start of <testenv.httpd.Httpd object at 0x109a0a3e0>>()
E + where <bound method Httpd.start of <testenv.httpd.Httpd object at 0x109a0a3e0>> = <testenv.httpd.Httpd object at 0x109a0a3e0>.start
conftest.py:62: AssertionError
___________________________________ ERROR at setup of TestBasic.test_01_03_h2_get ___________________________________
env = <testenv.env.Env object at 0x109945750>
E assert False
E + where False = <bound method Httpd.start of <testenv.httpd.Httpd object at 0x109a0a3e0>>()
E + where <bound method Httpd.start of <testenv.httpd.Httpd object at 0x109a0a3e0>> = <testenv.httpd.Httpd object at 0x109a0a3e0>.start
conftest.py:62: AssertionError
_______________________________ ERROR at setup of TestBasic.test_01_04_h2_unsupported _______________________________
env = <testenv.env.Env object at 0x109945750>
E assert False
E + where False = <bound method Httpd.start of <testenv.httpd.Httpd object at 0x109a0a3e0>>()
E + where <bound method Httpd.start of <testenv.httpd.Httpd object at 0x109a0a3e0>> = <testenv.httpd.Httpd object at 0x109a0a3e0>.start
conftest.py:62: AssertionError
============================================== short test summary info ==============================================
ERROR test_01_basic.py::TestBasic::test_01_01_http_get - assert False
ERROR test_01_basic.py::TestBasic::test_01_02_https_get - assert False
ERROR test_01_basic.py::TestBasic::test_01_03_h2_get - assert False
ERROR test_01_basic.py::TestBasic::test_01_04_h2_unsupported - assert False
=================================== 1 skipped, 117 deselected, 4 errors in 11.96s ==...
The curl code branch
curl/tests/http % git branch -a
remotes/origin/HEAD -> origin/master
......
the commit id:
curl/tests/http % git log
commit 0409f63 (HEAD -> master, origin/master, origin/HEAD)
Author: Viktor Szakats commit@vsz.me
Date: Fri Mar 31 18:03:43 2023 +0000
......
But runtests.pl is success,as follows:
curl/tests % ./runtests.pl 3 -s
********* System characteristics ********
*** DISABLES memory tracking when using threaded resolver
*
test 0003...OK (1 out of 1 , remaining: 00:00, took 1.417s, duration: 00:01)
TESTDONE: 1 tests were considered during 1 seconds.
TESTDONE: 1 tests out of 1 reported OK: 100%
the curl.trace:
15:19:37.125160 == Info: !!! WARNING !!!
15:19:37.125763 == Info: This is a debug build of libcurl, do not use in production.
15:19:37.125789 == Info: Added one.http.curl.se:60852:127.0.0.1 to DNS cache
15:19:37.125802 == Info: STATE: INIT => CONNECT handle 0x7f8ab1011c08; line 1950 (connection #-5000)
15:19:37.125853 == Info: Added connection 0. The cache now contains 1 members
15:19:37.125863 == Info: Hostname one.http.curl.se was found in DNS cache
15:19:37.125874 == Info: STATE: CONNECT => CONNECTING handle 0x7f8ab1011c08; line 2003 (connection #0)
15:19:37.125951 == Info: Trying 127.0.0.1:60852...
15:19:37.126069 == Info: connect to 127.0.0.1 port 60852 failed: Connection refused
15:19:37.126083 == Info: Failed to connect to one.http.curl.se port 60852 after 0 ms: Couldn't connect to server
15:19:37.126092 == Info: multi_done: status: 7 prem: 1 done: 0
15:19:37.126101 == Info: multi_done, not re-using connection=0, forbid=0, close=0, premature=1, conn_multiplex=0
15:19:37.126109 == Info: The cache now contains 0 members
15:19:37.126114 == Info: Curl_disconnect(conn #0, dead=1)
15:19:37.126123 == Info: Closing connection 0
15:19:37.126132 == Info: Expire cleared (transfer 0x7f8ab1011c08)
I expected the following
The pytest command is successful.
curl/libcurl version
curl 8.0.1-DEV (x86_64-apple-darwin22.1.0) libcurl/8.0.1-DEV OpenSSL/3.1.0 zlib/1.2.11 libidn2/2.3.4 nghttp2/1.52.0
Release-Date: [unreleased]
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS HSTS HTTP2 HTTPS-proxy IDN IPv6 Largefile libz NTLM NTLM_WB SSL threadsafe TLS-SRP UnixSockets
operating system
Darwin B-Q1BDMD6R-2034.local 22.1.0 Darwin Kernel Version 22.1.0: Sun Oct 9 20:14:54 PDT 2022; root:xnu-8792.41.9~2/RELEASE_X86_64 x86_64
The text was updated successfully, but these errors were encountered: