mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 1616238 - Enable http3 tests on windows, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D112528
This commit is contained in:
parent
84dc71e689
commit
9e4dc813a7
@ -23,6 +23,5 @@ features = ["gecko"]
|
||||
[build-dependencies]
|
||||
bindgen = {version = "0.56", default-features = false, features = ["runtime"] }
|
||||
|
||||
[[bin]]
|
||||
name = "http3server"
|
||||
path = "src/main.rs"
|
||||
[lib]
|
||||
crate-type = ["staticlib"]
|
||||
|
17
netwerk/test/http3server/executable/http3server.cpp
Normal file
17
netwerk/test/http3server/executable/http3server.cpp
Normal file
@ -0,0 +1,17 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
extern "C" {
|
||||
|
||||
void C_StartServer();
|
||||
|
||||
} // extern "C"
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
C_StartServer();
|
||||
return 0;
|
||||
}
|
26
netwerk/test/http3server/executable/moz.build
Normal file
26
netwerk/test/http3server/executable/moz.build
Normal file
@ -0,0 +1,26 @@
|
||||
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
if CONFIG["OS_ARCH"] == "WINNT":
|
||||
OS_LIBS += [
|
||||
"kernel32",
|
||||
"userenv",
|
||||
"wininet",
|
||||
"ws2_32",
|
||||
]
|
||||
|
||||
USE_LIBS += [
|
||||
"http3server",
|
||||
"nspr",
|
||||
"nss",
|
||||
]
|
||||
|
||||
GeckoSimplePrograms(
|
||||
[
|
||||
"http3server",
|
||||
],
|
||||
linkage=None,
|
||||
)
|
@ -4,13 +4,5 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
if (
|
||||
CONFIG["COMPILE_ENVIRONMENT"]
|
||||
and not CONFIG["MOZ_TSAN"]
|
||||
and not CONFIG["MOZ_ASAN"]
|
||||
and not CONFIG["FUZZING"]
|
||||
and not CONFIG["OS_TARGET"] == "WINNT"
|
||||
):
|
||||
RUST_PROGRAMS += [
|
||||
"http3server",
|
||||
]
|
||||
DIRS += ["executable"]
|
||||
RustLibrary("http3server")
|
||||
|
@ -34,7 +34,7 @@ use std::net::SocketAddr;
|
||||
const MAX_TABLE_SIZE: u64 = 65536;
|
||||
const MAX_BLOCKED_STREAMS: u16 = 10;
|
||||
const PROTOCOLS: &[&str] = &["h3-27"];
|
||||
const TIMER_TOKEN: Token = Token(0xffff_ffff);
|
||||
const TIMER_TOKEN: Token = Token(0xffff);
|
||||
|
||||
const HTTP_RESPONSE_WITH_WRONG_FRAME: &[u8] = &[
|
||||
0x01, 0x06, 0x00, 0x00, 0xd9, 0x54, 0x01, 0x37, // headers
|
||||
@ -315,10 +315,15 @@ impl HttpServer for NonRespondingServer {
|
||||
}
|
||||
|
||||
fn emit_packet(socket: &UdpSocket, out_dgram: Datagram) {
|
||||
let sent = socket
|
||||
.send_to(&out_dgram, &out_dgram.destination())
|
||||
.expect("Error sending datagram");
|
||||
if sent != out_dgram.len() {
|
||||
let res = match socket.send_to(&out_dgram, &out_dgram.destination()) {
|
||||
Err(ref err) if err.kind() == io::ErrorKind::WouldBlock => 0,
|
||||
Err(err) => {
|
||||
eprintln!("UDP send error: {:?}", err);
|
||||
exit(1);
|
||||
}
|
||||
Ok(res) => res,
|
||||
};
|
||||
if res != out_dgram.len() {
|
||||
qinfo!("Unable to send all {} bytes of datagram", out_dgram.len());
|
||||
}
|
||||
}
|
||||
@ -589,7 +594,7 @@ impl ServersRunner {
|
||||
}
|
||||
}
|
||||
|
||||
fn main() -> Result<(), io::Error> {
|
||||
pub fn start_server() -> Result<(), io::Error> {
|
||||
let args: Vec<String> = env::args().collect();
|
||||
if args.len() < 2 {
|
||||
eprintln!("Wrong arguments.");
|
||||
@ -618,3 +623,8 @@ fn main() -> Result<(), io::Error> {
|
||||
servers_runner.init();
|
||||
servers_runner.run()
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn C_StartServer() {
|
||||
start_server().expect("Server should be started succeed");
|
||||
}
|
@ -4,7 +4,11 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
TEST_DIRS += ["httpserver", "gtest", "http3server"]
|
||||
TEST_DIRS += ["httpserver", "gtest"]
|
||||
|
||||
# http3server depends on winapi 0.2.8, which doesn't work with AArch64
|
||||
if not (CONFIG["OS_ARCH"] == "WINNT" and CONFIG["CPU_ARCH"] == "aarch64"):
|
||||
TEST_DIRS += ["http3server"]
|
||||
|
||||
BROWSER_CHROME_MANIFESTS += ["browser/browser.ini"]
|
||||
MOCHITEST_MANIFESTS += ["mochitests/mochitest.ini"]
|
||||
|
@ -431,14 +431,16 @@ skip-if = os == "android"
|
||||
[test_http3.js]
|
||||
# asan - bug 1616239
|
||||
# tsan - bug 1622845
|
||||
# win - bug 1616238
|
||||
# android - bug 1622901
|
||||
# mac - bug 1669892
|
||||
skip-if = asan || tsan || os == 'win' || os =='android' || os == 'mac'
|
||||
skip-if = asan || tsan || os =='android' || os == 'mac'
|
||||
run-sequentially = http3server
|
||||
[test_http3_421.js]
|
||||
skip-if = asan || tsan || os == 'win' || os =='android'
|
||||
skip-if = asan || tsan || os =='android'
|
||||
run-sequentially = http3server
|
||||
[test_http3_perf.js]
|
||||
skip-if = asan || tsan || os == 'win' || os =='android'
|
||||
skip-if = asan || tsan || os =='android'
|
||||
run-sequentially = http3server
|
||||
[test_node_execute.js]
|
||||
[test_loadgroup_cancel.js]
|
||||
[test_obs-fold.js]
|
||||
@ -461,9 +463,10 @@ run-sequentially = node server exceptions dont replay well
|
||||
[test_http_sfv.js]
|
||||
[test_blob_channelname.js]
|
||||
[test_altsvc_pref.js]
|
||||
skip-if = asan || tsan || os == 'win' || os =='android'
|
||||
skip-if = asan || tsan || os =='android'
|
||||
[test_http3_alt_svc.js]
|
||||
skip-if = asan || tsan || os == 'win' || os =='android'
|
||||
skip-if = asan || tsan || os =='android'
|
||||
run-sequentially = http3server
|
||||
[test_use_httpssvc.js]
|
||||
skip-if = os == "android"
|
||||
run-sequentially = node server exceptions dont replay well
|
||||
@ -484,35 +487,36 @@ run-sequentially = node server exceptions dont replay well
|
||||
skip-if = asan || tsan || os == 'win' || os =='android'
|
||||
run-sequentially = node server exceptions dont replay well
|
||||
[test_http3_trans_close.js]
|
||||
skip-if = asan || tsan || os == 'win' || os =='android'
|
||||
skip-if = asan || tsan || os =='android'
|
||||
run-sequentially = http3server
|
||||
[test_brotli_http.js]
|
||||
[test_altsvc_http3.js]
|
||||
skip-if =
|
||||
true # Bug 1675008
|
||||
asan
|
||||
tsan
|
||||
os == 'win'
|
||||
os =='android'
|
||||
run-sequentially = http3server
|
||||
[test_http3_fatal_stream_error.js]
|
||||
skip-if = asan || tsan || os == 'win' || os =='android' || socketprocess_networking
|
||||
skip-if = asan || tsan || os =='android' || socketprocess_networking
|
||||
run-sequentially = node server exceptions dont replay well
|
||||
[test_http3_large_post.js]
|
||||
skip-if = asan || tsan || os == 'win' || os =='android'
|
||||
[test_http3_error_before_connect.js]
|
||||
skip-if = asan || tsan || os == 'win' || os =='android' || socketprocess_networking
|
||||
skip-if = asan || tsan || os =='android' || socketprocess_networking
|
||||
run-sequentially = node server exceptions dont replay well
|
||||
[test_http3_server_not_existing.js]
|
||||
skip-if = asan || tsan || os == 'win' || os =='android' || socketprocess_networking
|
||||
skip-if = asan || tsan || os =='android' || socketprocess_networking
|
||||
run-sequentially = node server exceptions dont replay well
|
||||
[test_http3_fast_fallback.js]
|
||||
skip-if = asan || tsan || os == 'win' || os =='android' || socketprocess_networking
|
||||
skip-if = asan || tsan || os =='android' || socketprocess_networking
|
||||
run-sequentially = node server exceptions dont replay well
|
||||
[test_cookie_ipv6.js]
|
||||
[test_httpssvc_retry_with_ech.js]
|
||||
skip-if = asan || tsan || os == 'win' || os =='android'
|
||||
skip-if = asan || tsan || os =='android'
|
||||
run-sequentially = node server exceptions dont replay well
|
||||
[test_httpssvc_retry_without_ech.js]
|
||||
skip-if = asan || tsan || os == 'win' || os =='android'
|
||||
skip-if = asan || tsan || os =='android'
|
||||
run-sequentially = node server exceptions dont replay well
|
||||
[test_httpssvc_https_upgrade.js]
|
||||
[test_bug1683176.js]
|
||||
|
@ -261,6 +261,11 @@ def check_networking(target, binary):
|
||||
raise RuntimeError("Could not parse llvm-objdump output?")
|
||||
|
||||
basename = os.path.basename(binary)
|
||||
# libhttp3server is used for test only, so we can skip it.
|
||||
if basename == "libhttp3server.a":
|
||||
print("TEST-SKIP | check_networking | {}".format(basename))
|
||||
return 0
|
||||
|
||||
if bad_occurences_names:
|
||||
s = (
|
||||
"TEST-UNEXPECTED-FAIL | check_networking | {} | Identified {} "
|
||||
|
Loading…
Reference in New Issue
Block a user