/curl/tests/http/testenv/ |
H A D | vsftpd.py | 51 self._port = self.env.ftps_port 54 self._port = self.env.ftp_port 57 self._run_dir = os.path.join(self._vsftpd_dir, 'run') 58 self._docs_dir = os.path.join(self._vsftpd_dir, 'docs') 59 self._tmp_dir = os.path.join(self._vsftpd_dir, 'tmp') 80 self._rmf(self._error_log) 105 self._mkpath(self._tmp_dir) 118 self._mkpath(self._tmp_dir) 182 self._mkpath(self._docs_dir) 183 self._mkpath(self._tmp_dir) [all …]
|
H A D | caddy.py | 47 self._docs_dir = os.path.join(self._caddy_dir, 'docs') 48 self._conf_file = os.path.join(self._caddy_dir, 'Caddyfile') 50 self._tmp_dir = os.path.join(self._caddy_dir, 'tmp') 52 self._rmf(self._error_log) 63 self._rmf(self._error_log) 77 self._mkpath(self._tmp_dir) 96 self._mkpath(self._tmp_dir) 109 curl = CurlClient(env=self.env, run_dir=self._tmp_dir) 122 curl = CurlClient(env=self.env, run_dir=self._tmp_dir) 144 self._mkpath(self._docs_dir) [all …]
|
H A D | env.py | 65 self.gen_dir = os.path.join(self.tests_dir, 'gen') 123 self.httpd = self.config['httpd']['httpd'] 124 self.apachectl = self.config['httpd']['apachectl'] 125 self.apxs = self.config['httpd']['apxs'] 134 self.htdocs_dir = os.path.join(self.gen_dir, 'htdocs') 151 self.nghttpx = self.config['nghttpx']['nghttpx'] 167 self.caddy = self.config['caddy']['caddy'] 186 self.vsftpd = self.config['vsftpd']['vsftpd'] 227 hv = self.versiontuple(self.httpd_version) 233 hv = self.versiontuple(self.caddy_version) [all …]
|
H A D | nghttpx.py | 54 self._tmp_dir = os.path.join(self._run_dir, 'tmp') 57 self._rmf(self._pid_file) 58 self._rmf(self._error_log) 59 self._mkpath(self._run_dir) 66 self._rmf(self._error_log) 67 self._rmf(self._stderr) 89 self._mkpath(self._tmp_dir) 128 curl = CurlClient(env=self.env, run_dir=self._tmp_dir) 143 curl = CurlClient(env=self.env, run_dir=self._tmp_dir) 180 self._mkpath(self._tmp_dir) [all …]
|
H A D | httpd.py | 67 self._run_dir = os.path.join(self._apache_dir, 'run') 69 self._docs_dir = os.path.join(self._apache_dir, 'docs') 70 self._conf_dir = os.path.join(self._apache_dir, 'conf') 72 self._logs_dir = os.path.join(self._apache_dir, 'logs') 74 self._tmp_dir = os.path.join(self._apache_dir, 'tmp') 92 self._rmf(self._error_log) 100 self._rmf(self._error_log) 213 self._mkpath(self._conf_dir) 214 self._mkpath(self._logs_dir) 215 self._mkpath(self._tmp_dir) [all …]
|
H A D | curl.py | 74 def sample(self): argument 78 self._psu = psutil.Process(pid=self._pid) 90 self._duration = datetime.now() - self._started_at 373 self._rmrf(self._run_dir) 374 self._mkpath(self._run_dir) 447 self._rmf(self.download_file(i)) 558 self._rmf(self.download_file(i)) 629 self._rmf(self._stdoutfile) 630 self._rmf(self._stderrfile) 631 self._rmf(self._headerfile) [all …]
|
H A D | client.py | 50 self.name = name 52 self.env = env 59 self._rmrf(self._run_dir) 60 self._mkpath(self._run_dir) 64 return self._run_dir 76 def _rmf(self, path): argument 80 def _rmrf(self, path): argument 88 def run(self, args): argument 89 self._rmf(self._stdoutfile) 90 self._rmf(self._stderrfile) [all …]
|
H A D | certs.py | 85 self._name = name 98 if self._name: 106 if self.domains and len(self.domains): 108 elif self.client: 110 elif self.name: 117 def __init__(self, argument 122 self._name = name 123 self._cert = cert 124 self._pkey = pkey 139 def key_type(self): argument [all …]
|
/curl/tests/ |
H A D | util.py | 40 def __init__(self, filename): argument 43 self.setStream(None) 45 def emit(self, record): argument 47 self.setStream(fp) 49 self.setStream(None) 51 def setStream(self, stream): argument 55 if stream is self.stream: 58 result = self.stream 59 self.acquire() 61 self.flush() [all …]
|
H A D | negtelnetserver.py | 134 self.state = self.NO_NEG 159 elif self.state in [self.WILL, self.WONT, self.DO, self.DONT]: 166 self.state = self.NO_NEG 176 self.state = self.START_NEG 189 self.state = self.WILL 194 self.state = self.WONT 198 self.state = self.DO 202 self.state = self.DONT 208 self.state = self.NO_NEG 219 self.state = self.NO_NEG [all …]
|
H A D | smbserver.py | 73 def __init__(self, server): argument 75 self.server = server 78 def __enter__(self): argument 79 self.start() 83 def __exit__(self, *_): argument 85 self.shutdown_event.set() 87 self.join() 100 def run(self): argument 104 self.server.shutdown() 168 def __init__(self, argument [all …]
|
/curl/tests/http/ |
H A D | test_11_unix.py | 42 self._done = False 45 def path(self): argument 48 def start(self): argument 49 def process(self): argument 51 self._process() 59 self._socket.bind(self._uds_path) 60 self._thread = Thread(target=process, daemon=True, args=[self]) 61 self._thread.start() 63 def stop(self): argument 64 self._done = True [all …]
|
H A D | scorecard.py | 55 self.env = env 62 def info(self, msg): argument 82 curl = CurlClient(env=self.env, silent=self._silent_curl) 130 curl = CurlClient(env=self.env, silent=self._silent_curl) 157 curl = CurlClient(env=self.env, silent=self._silent_curl) 185 curl = CurlClient(env=self.env, silent=self._silent_curl) 239 self._make_docs_file(docs_dir=self.httpd.docs_dir, 256 self._make_docs_file(docs_dir=self.caddy.docs_dir, 275 curl = CurlClient(env=self.env, silent=self._silent_curl) 322 self._make_docs_file(docs_dir=self.httpd.docs_dir, [all …]
|
H A D | test_16_info.py | 43 def _class_scope(self, env, httpd, nghttpx): argument 50 def _class_scope(self, env, httpd): argument 67 self.check_stat(idx, s, r, dl_size=30, ul_size=0) 114 self.check_stat_times(s) 116 self.check_stat_positive(s, 'size_request') 118 self.check_stat_positive(s, 'size_header') 126 def check_stat_positive(self, s, key): argument 130 def check_stat_zero(self, s, key): argument 134 def check_stat_times(self, s): argument 153 self.check_stat_zero(s, key) [all …]
|
H A D | test_03_goaway.py | 43 def _class_scope(self, env, httpd, nghttpx): argument 50 def test_03_01_h2_goaway(self, env: Env, httpd, nghttpx, repeat): argument 53 self.r = None 60 self.r = curl.http_download(urls=[urln], alpn_proto=proto) 69 r: ExecResult = self.r 82 def test_03_02_h3_goaway(self, env: Env, httpd, nghttpx, repeat): argument 91 self.r = None 107 r: ExecResult = self.r 118 def test_03_03_h1_goaway(self, env: Env, httpd, nghttpx, repeat): argument 121 self.r = None [all …]
|
H A D | test_30_vsftpd.py | 44 def vsftpd(self, env): argument 50 def _make_docs_file(self, docs_dir: str, fname: str, fsize: int): argument 61 def _class_scope(self, env, vsftpd): argument 93 self.check_downloads(curl, srcfile, count) 105 self.check_downloads(curl, srcfile, count) 119 self.check_downloads(curl, srcfile, count) 128 self._rmf(dstfile) 133 self.check_upload(env, vsftpd, docname=docname) 135 def _rmf(self, path): argument 139 def check_downloads(self, client, srcfile: str, count: int, argument [all …]
|
H A D | test_31_vsftpds.py | 49 def vsftpds(self, env): argument 60 def _make_docs_file(self, docs_dir: str, fname: str, fsize: int): argument 71 def _class_scope(self, env, vsftpds): argument 103 self.check_downloads(curl, srcfile, count) 115 self.check_downloads(curl, srcfile, count) 129 self.check_downloads(curl, srcfile, count) 138 self._rmf(dstfile) 143 self.check_upload(env, vsftpds, docname=docname) 145 def _rmf(self, path): argument 149 def check_downloads(self, client, srcfile: str, count: int, argument [all …]
|
H A D | test_20_websockets.py | 45 def check_alive(self, env, timeout=5): argument 56 def _mkpath(self, path): argument 60 def _rmrf(self, path): argument 65 def ws_echo(self, env): argument 68 self._rmrf(run_dir) 69 self._mkpath(run_dir) 77 assert self.check_alive(env) 81 def test_20_01_basic(self, env: Env, ws_echo, repeat): argument 107 def test_20_04_data_small(self, env: Env, ws_echo, repeat): argument 116 def test_20_05_data_med(self, env: Env, ws_echo, repeat): argument [all …]
|
H A D | test_02_download.py | 43 def _class_scope(self, env, httpd, nghttpx): argument 50 def _class_scope(self, env, httpd): argument 146 def test_02_07_download_reuse(self, env: Env, argument 165 def test_02_07b_download_reuse(self, env: Env, argument 181 def test_02_08_1MB_serial(self, env: Env, argument 192 def test_02_09_1MB_parallel(self, env: Env, argument 207 def test_02_10_10MB_serial(self, env: Env, argument 220 def test_02_11_10MB_parallel(self, env: Env, argument 235 def test_02_12_head_serial_https(self, env: Env, argument 248 def test_02_13_head_serial_h2c(self, env: Env, argument [all …]
|
H A D | test_08_caddy.py | 42 def caddy(self, env): argument 48 def _make_docs_file(self, docs_dir: str, fname: str, fsize: int): argument 59 def _class_scope(self, env, caddy): argument 60 self._make_docs_file(docs_dir=caddy.docs_dir, fname='data1.data', fsize=1024*1024) 67 def test_08_01_download_1(self, env: Env, caddy: Caddy, repeat, proto): argument 79 def test_08_02_download_1mb_sequential(self, env: Env, caddy: Caddy, argument 93 def test_08_03_download_1mb_parallel(self, env: Env, caddy: Caddy, argument 116 def test_08_04a_download_10mb_sequential(self, env: Env, caddy: Caddy, argument 132 def test_08_04b_download_10mb_sequential(self, env: Env, caddy: Caddy, argument 148 def test_08_05_download_1mb_parallel(self, env: Env, caddy: Caddy, argument [all …]
|
H A D | test_04_stuttered.py | 43 def _class_scope(self, env, httpd, nghttpx): argument 51 def test_04_01_download_1(self, env: Env, httpd, nghttpx, repeat, argument 67 def test_04_02_100_100_10(self, env: Env, argument 82 t_avg, i_min, t_min, i_max, t_max = self.stats_spread(r.stats[warmups:], 'time_total') 90 def test_04_03_1000_10_1(self, env: Env, httpd, nghttpx, repeat, proto): argument 104 t_avg, i_min, t_min, i_max, t_max = self.stats_spread(r.stats[warmups:], 'time_total') 112 def test_04_04_1000_10_1(self, env: Env, httpd, nghttpx, repeat, proto): argument 126 t_avg, i_min, t_min, i_max, t_max = self.stats_spread(r.stats[warmups:], 'time_total') 130 def stats_spread(self, stats: List[Dict], key: str) -> Tuple[float, int, float, int, float]: argument
|
H A D | test_13_proxy_auth.py | 45 def _class_scope(self, env, httpd, nghttpx_fwd): argument 55 def get_tunnel_proto_used(self, r: ExecResult): argument 64 def test_13_01_proxy_no_auth(self, env: Env, httpd, repeat): argument 72 def test_13_02_proxy_auth(self, env: Env, httpd, repeat): argument 84 def test_13_03_proxys_no_auth(self, env: Env, httpd, nghttpx_fwd, repeat): argument 95 def test_13_04_proxys_auth(self, env: Env, httpd, nghttpx_fwd, repeat): argument 104 def test_13_05_tunnel_http_no_auth(self, env: Env, httpd, repeat): argument 113 def test_13_06_tunnel_http_auth(self, env: Env, httpd, repeat): argument 137 assert self.get_tunnel_proto_used(r) == 'HTTP/2' \ 145 def test_13_08_tunnels_auth(self, env: Env, httpd, proto, tunnel, repeat): argument [all …]
|
H A D | test_06_eyeballs.py | 41 def _class_scope(self, env, httpd, nghttpx): argument 49 def test_06_01_h3_only(self, env: Env, httpd, nghttpx, repeat): argument 58 def test_06_02_h3_only(self, env: Env, httpd, nghttpx, repeat): argument 67 def test_06_03_h3_fallback_h2(self, env: Env, httpd, nghttpx, repeat): argument 77 def test_06_04_h3_fallback_h1(self, env: Env, httpd, nghttpx, repeat): argument 86 def test_06_10_stats_success(self, env: Env, httpd, nghttpx, repeat): argument 95 def test_06_11_stats_fail_verify(self, env: Env, httpd, nghttpx, repeat): argument 106 def test_06_12_stats_fail_tcp(self, env: Env, httpd, nghttpx, repeat): argument
|
H A D | test_01_basic.py | 40 def _class_scope(self, env, nghttpx): argument 45 def test_01_01_http_get(self, env: Env, httpd): argument 54 def test_01_02_https_get(self, env: Env, httpd): argument 63 def test_01_03_h2_get(self, env: Env, httpd): argument 72 def test_01_04_h2_unsupported(self, env: Env, httpd): argument 81 def test_01_05_h3_get(self, env: Env, httpd, nghttpx): argument 91 def test_01_06_timings(self, env: Env, httpd, nghttpx, repeat, proto): argument
|
H A D | test_10_proxy.py | 42 def _class_scope(self, env, httpd, nghttpx_fwd): argument 53 def get_tunnel_proto_used(self, r: ExecResult): argument 62 def test_10_01_proxy_http(self, env: Env, httpd, repeat): argument 161 assert self.get_tunnel_proto_used(r) == 'HTTP/2' \ 189 assert self.get_tunnel_proto_used(r) == 'HTTP/2' \ 218 assert self.get_tunnel_proto_used(r) == 'HTTP/2' \ 240 assert self.get_tunnel_proto_used(r) == 'HTTP/2' \ 263 assert self.get_tunnel_proto_used(r1) == 'HTTP/2' \ 288 assert self.get_tunnel_proto_used(r1) == 'HTTP/2' \ 314 assert self.get_tunnel_proto_used(r1) == 'HTTP/2' \ [all …]
|