test(java-oracle): DhcpRun records DHCP as Java FILIUS runs it
Builds a core scenario's network in Java FILIUS, starts it as the action mode does and writes every frame each card saw (the Lauscher) and the addresses at the end. References for the four DHCP scenarios: one DISCOVER/REQUEST per attempt, an ARP check that waits one RTT, DECLINE on a conflict, link-local 169.254.1.x after the fifth failure. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -21,7 +21,7 @@ if [ ! -f "$upstream/target/filius.jar" ]; then
|
||||
fi
|
||||
classpath="$upstream/target/filius.jar:$upstream/target/lib/*"
|
||||
mkdir -p "$here/.build"
|
||||
javac -encoding UTF-8 -d "$here/.build" -cp "$classpath" "$here/src/FlsOracle.java" "$here/src/GetterDefaults.java" "$here/src/IpCheckCases.java" "$here/src/DnsHostsCases.java" "$here/src/EmailFileCases.java" "$here/src/BeansDump.java" "$here/src/Base64Cases.java"
|
||||
javac -encoding UTF-8 -d "$here/.build" -cp "$classpath" "$here/src/FlsOracle.java" "$here/src/GetterDefaults.java" "$here/src/IpCheckCases.java" "$here/src/DnsHostsCases.java" "$here/src/EmailFileCases.java" "$here/src/BeansDump.java" "$here/src/Base64Cases.java" "$here/src/DhcpRun.java"
|
||||
# FILIUS writes its settings below $HOME; keep them out of the real one.
|
||||
mkdir -p "$here/.build/home"
|
||||
# Removed first: a crashed run must not leave the previous result standing.
|
||||
@@ -106,3 +106,16 @@ for written in "$root/packages/fls/test/written" "$root/packages/fls/test/export
|
||||
test -s "$written.java.json"
|
||||
fi
|
||||
done
|
||||
|
||||
# DHCP as Java FILIUS runs it: a core scenario's network, started as the
|
||||
# action mode starts it, for the given real-time milliseconds; every frame
|
||||
# each card saw and the addresses at the end (packages/core/test/dhcpJava.test.ts).
|
||||
# One run after another: a busy machine stretches the times.
|
||||
for run in dhcp-lan:8000 dhcp-two-servers:8000 dhcp-conflict:25000 dhcp-no-server:25000; do
|
||||
name="${run%%:*}"
|
||||
output="$root/packages/core/test/scenarios/$name.java.json"
|
||||
rm -f "$output"
|
||||
HOME="$here/.build/home" xvfb-run -a java -cp "$classpath:$here/.build" DhcpRun \
|
||||
"$root/packages/core/test/scenarios/$name.scenario.json" "${run##*:}" "$output" 2>&1 | grep -v 'logback\|^$' || true
|
||||
test -s "$output"
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user