Skip to content

Commit

Permalink
chore: updating to latest quic interop commit (#2396)
Browse files Browse the repository at this point in the history
  • Loading branch information
WesleyRosenblum authored Dec 4, 2024
1 parent 513212c commit 0f943e9
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 71 deletions.
111 changes: 43 additions & 68 deletions .github/interop/runner.patch
Original file line number Diff line number Diff line change
@@ -1,45 +1,21 @@
diff --git a/certs.sh b/certs.sh
index 603dade..320f1c0 100755
index f7c19f5..4b5eccc 100755
--- a/certs.sh
+++ b/certs.sh
@@ -21,6 +21,14 @@ openssl req -x509 -sha256 -nodes -days 10 -key "$CERTDIR"/ca_0.key \
-extensions v3_ca \
2> /dev/null

+ # Inflate certificate for the amplification test
+ fakedns=""
+ if [ "$CHAINLEN" != "1" ]; then
+ for i in $(seq 1 20); do
+ fakedns="$fakedns,DNS:$(LC_CTYPE=C tr -dc 0-9A-Za-z < /dev/urandom | head -c 250)"
+ done
+ fi
+
for i in $(seq 1 "$CHAINLEN"); do
# Generate a CSR
SUBJ="interop runner intermediate $i"
@@ -44,7 +52,7 @@ for i in $(seq 1 "$CHAINLEN"); do
else
openssl x509 -req -sha256 -days 10 -in "$CERTDIR"/cert.csr -out "$CERTDIR"/cert_"$i".pem \
-CA "$CERTDIR"/cert_"$j".pem -CAkey "$CERTDIR"/ca_"$j".key -CAcreateserial \
- -extfile <(printf "subjectAltName=DNS:server,DNS:server4,DNS:server6,DNS:server46") \
+ -extfile <(printf "subjectAltName=DNS:server,DNS:server4,DNS:server6,DNS:server46$fakedns") \
2> /dev/null
fi
done
@@ -55,6 +63,6 @@ cp "$CERTDIR"/ca_"$CHAINLEN".key "$CERTDIR"/priv.key
@@ -63,6 +63,6 @@ cp "$CERTDIR"/ca_"$CHAINLEN".key "$CERTDIR"/priv.key
# combine certificates
for i in $(seq "$CHAINLEN" -1 1); do
cat "$CERTDIR"/cert_"$i".pem >> "$CERTDIR"/cert.pem
cat "$CERTDIR"/cert_"$i".pem >>"$CERTDIR"/cert.pem
- rm "$CERTDIR"/cert_"$i".pem "$CERTDIR"/ca_"$i".key
+ rm -f "$CERTDIR"/cert_"$i".pem "$CERTDIR"/ca_"$i".key
done
rm -f "$CERTDIR"/*.srl "$CERTDIR"/ca_0.key "$CERTDIR"/cert.csr
diff --git a/docker-compose.yml b/docker-compose.yml
index 496d7aa..42822d6 100644
index 93664f0..f0fa93e 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -2,7 +2,7 @@ version: "2.4"

services:
sim:
- image: martenseemann/quic-network-simulator
Expand All @@ -52,17 +28,17 @@ index 496d7aa..42822d6 100644
- QLOGDIR=/logs/qlog/
- TESTCASE=$TESTCASE_SERVER
+ - TEST_TYPE=$TEST_TYPE
- VERSION=$VERSION
depends_on:
- sim
@@ -69,6 +70,7 @@ services:
cap_add:
@@ -68,6 +69,7 @@ services:
- SSLKEYLOGFILE=/logs/keys.log
- QLOGDIR=/logs/qlog/
- TESTCASE=$TESTCASE_CLIENT
+ - TEST_TYPE=$TEST_TYPE
- REQUESTS=$REQUESTS
- VERSION=$VERSION
depends_on:
- sim
diff --git a/implementations.json b/implementations.json
index 09e2fdd..72513c8 100644
--- a/implementations.json
Expand All @@ -83,42 +59,34 @@ index 09e2fdd..72513c8 100644
"role": "both"
},
diff --git a/interop.py b/interop.py
index 8f2769b..df430a9 100644
index d6b27ce..ac7a7b7 100644
--- a/interop.py
+++ b/interop.py
@@ -123,6 +123,7 @@ class InteropRunner:
@@ -126,6 +126,7 @@ class InteropRunner:
cmd = (
"CERTS=" + certs_dir.name + " "
"TESTCASE_CLIENT=" + random_string(6) + " "
+ "TEST_TYPE=TEST "
"SERVER_LOGS=/dev/null "
"CLIENT_LOGS=" + client_log_dir.name + " "
"WWW=" + www_dir.name + " "
@@ -150,6 +151,7 @@ class InteropRunner:
@@ -153,6 +154,7 @@ class InteropRunner:
cmd = (
"CERTS=" + certs_dir.name + " "
"TESTCASE_SERVER=" + random_string(6) + " "
+ "TEST_TYPE=TEST "
"SERVER_LOGS=" + server_log_dir.name + " "
"CLIENT_LOGS=/dev/null "
"WWW=" + www_dir.name + " "
@@ -217,7 +219,6 @@ class InteropRunner:
t = prettytable.PrettyTable()
t.hrules = prettytable.ALL
t.vrules = prettytable.ALL
- t.field_names = [""]
rows = {}
columns = {}
for client, server in self._client_server_pairs:
@@ -373,6 +374,7 @@ class InteropRunner:
@@ -408,6 +410,7 @@ class InteropRunner:
"CERTS=" + testcase.certs_dir() + " "
"TESTCASE_SERVER=" + testcase.testname(Perspective.SERVER) + " "
"TESTCASE_CLIENT=" + testcase.testname(Perspective.CLIENT) + " "
+ "TEST_TYPE=" + testcase.test_type() + " "
"WWW=" + testcase.www_dir() + " "
"DOWNLOADS=" + testcase.download_dir() + " "
"SERVER_LOGS=" + server_log_dir.name + " "
@@ -490,9 +492,14 @@ class InteropRunner:
@@ -524,9 +527,14 @@ class InteropRunner:
logging.debug(values)
res = MeasurementResult()
res.result = TestResult.SUCCEEDED
Expand All @@ -134,9 +102,9 @@ index 8f2769b..df430a9 100644
+ statistics.mean(values), statistics.stdev(values), test.unit()
+ )
return res

def run(self):
@@ -507,23 +514,26 @@ class InteropRunner:
@@ -541,23 +549,26 @@ class InteropRunner:
client,
self._implementations[client]["image"],
)
Expand All @@ -146,7 +114,7 @@ index 8f2769b..df430a9 100644
- ):
- logging.info("Not compliant, skipping")
- continue

+ transfer_succeeded = True
# run the test cases
for testcase in self._tests:
Expand All @@ -156,7 +124,7 @@ index 8f2769b..df430a9 100644
nr_failed += 1
+ if testcase == testcases.TestCaseTransfer:
+ transfer_succeeded = False

# run the measurements
for measurement in self._measurements:
- res = self._run_measurement(server, client, measurement)
Expand All @@ -168,8 +136,8 @@ index 8f2769b..df430a9 100644
+ res.result = TestResult.UNSUPPORTED
+ res.details = "Skipping measurements as Transfer testcase was unsuccessful"
self.measurement_results[server][client][measurement] = res
self._print_results()

self._postprocess_results()
diff --git a/pull.py b/pull.py
index c2d6d1f..844bbd5 100644
--- a/pull.py
Expand Down Expand Up @@ -206,33 +174,40 @@ index 4564681..3a28eec 100755
- sys.exit(main())
+ main()
diff --git a/testcases.py b/testcases.py
index df0fac5..91f0261 100644
index fc69e11..7dafb07 100644
--- a/testcases.py
+++ b/testcases.py
@@ -97,6 +97,10 @@ class TestCase(abc.ABC):
@@ -98,6 +98,10 @@ class TestCase(abc.ABC):
"""The name of testcase presented to the endpoint Docker images"""
return self.name()

+ @staticmethod
+ def test_type() -> str:
+ return "TEST"
+
@staticmethod
def scenario() -> str:
"""Scenario for the ns3 simulator"""
@@ -1207,7 +1211,7 @@ class TestCasePortRebinding(TestCaseTransfer):
@@ -1239,10 +1243,14 @@ class TestCasePortRebinding(TestCaseTransfer):
]
return self._files

+ @staticmethod
+ def test_type() -> str:
+ return "TEST"
+
@staticmethod
def scenario() -> str:
"""Scenario for the ns3 simulator"""
- return "rebind --delay=15ms --bandwidth=10Mbps --queue=25 --first-rebind=1s --rebind-freq=5s"
+ return "rebind --delay=15ms --bandwidth=10Mbps --queue=25 --first-rebind=2s --rebind-freq=5s"

def check(self) -> TestResult:
if not self._keylog_file():
@@ -1229,56 +1233,26 @@ class TestCasePortRebinding(TestCaseTransfer):
super().check()
@@ -1265,56 +1273,26 @@ class TestCasePortRebinding(TestCaseTransfer):
logging.info("Server saw only a single client port in use; test broken?")
return TestResult.FAILED

- last = None
- num_migrations = 0
- for p in tr_server:
Expand Down Expand Up @@ -265,7 +240,7 @@ index df0fac5..91f0261 100644
+ tr_server2client = self._client_trace()._get_packets(
+ self._client_trace()._get_direction_filter(Direction.FROM_SERVER) + " quic"
)

challenges = list(
set(
getattr(p["quic"], "path_challenge.data")
Expand All @@ -285,7 +260,7 @@ index df0fac5..91f0261 100644
+ tr_client2server = self._client_trace()._get_packets(
+ self._client_trace()._get_direction_filter(Direction.FROM_CLIENT) + " quic"
+ )

responses = list(
set(
getattr(p["quic"], "path_response.data")
Expand All @@ -294,27 +269,27 @@ index df0fac5..91f0261 100644
if hasattr(p["quic"], "path_response.data")
)
)
@@ -1296,6 +1270,10 @@ class TestCaseAddressRebinding(TestCasePortRebinding):
@@ -1332,6 +1310,10 @@ class TestCaseAddressRebinding(TestCasePortRebinding):
def name():
return "rebind-addr"

+ @staticmethod
+ def test_type() -> str:
+ return "MEASUREMENT"
+
@staticmethod
def abbreviation():
return "BA"
@@ -1575,7 +1553,7 @@ class MeasurementGoodput(Measurement):
@@ -1615,7 +1597,7 @@ class MeasurementGoodput(Measurement):

@staticmethod
def repetitions() -> int:
- return 5
+ return 1

def get_paths(self):
self._files = [self._generate_random_file(self.FILESIZE)]
@@ -1646,7 +1624,7 @@ TESTCASES = [
@@ -1687,7 +1669,7 @@ TESTCASES = [
TestCaseMultiplexing,
TestCaseRetry,
TestCaseResumption,
Expand All @@ -323,7 +298,7 @@ index df0fac5..91f0261 100644
TestCaseHTTP3,
TestCaseBlackhole,
TestCaseKeyUpdate,
@@ -1657,12 +1635,11 @@ TESTCASES = [
@@ -1698,12 +1680,11 @@ TESTCASES = [
TestCaseHandshakeCorruption,
TestCaseTransferCorruption,
TestCaseIPv6,
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/qns.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ env:
RUST_BACKTRACE: 1
# This kept breaking builds so we're pinning for now. We should do our best to keep
# up with the changes, though.
INTEROP_RUNNER_REF: 4be6491794a08899f295dc5cdf9eeba8e9fa5431
INTEROP_RUNNER_REF: bda2d276de79cd016e4d90fd57ff2d863b05abe5
# This should be updated when updating wesleyrosenblum/quic-network-simulator
NETWORK_SIMULATOR_REF: sha256:20abe0bed8c0e39e1d8750507b24295f7c978bdd7e05fa6f3a5afed4b76dc191
NETWORK_SIMULATOR_REF: sha256:e102cb0e4b9457f510faf4ca888b4f7f6211aa109b68bfaaa1aa639059fcfc96
IPERF_ENDPOINT_REF: sha256:cb50cc8019d45d9cad5faecbe46a3c21dd5e871949819a5175423755a9045106
WIRESHARK_VERSION: 3.7.1
CDN: https://dnglbrstg7yg.cloudfront.net
Expand Down
2 changes: 1 addition & 1 deletion scripts/interop/run
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if [ ! -d $INTEROP_DIR ]; then
git clone https://github.com/marten-seemann/quic-interop-runner $INTEROP_DIR
# make sure to keep this up to date with the interop workflow
cd $INTEROP_DIR
git checkout 4be6491794a08899f295dc5cdf9eeba8e9fa5431
git checkout bda2d276de79cd016e4d90fd57ff2d863b05abe5
git apply --3way ../../.github/interop/runner.patch
cd ../../
fi
Expand Down

0 comments on commit 0f943e9

Please sign in to comment.