Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
77a77e9
feat: configuration for 32 ports; phase 1, task 2
nicholasching Jun 5, 2026
b2ee2a3
feat: configuration and run script; phase 1, task 3-4; fails to pass …
nicholasching Jun 10, 2026
145aec2
fix: ifmap prefix, IPv6 disable, PortChannel emulation, veth-up watch…
nicholasching Jun 15, 2026
4cd92d8
fix: run multiple tests sequentially by grouping tests by config sign…
nicholasching Jun 15, 2026
2661943
feat: script to generate compatabilty matrix from test results
nicholasching Jun 15, 2026
82ca412
docs: add feature development progress context
nicholasching Jun 15, 2026
15776bb
docs: add build and usage instructions for UT harness
nicholasching Jun 15, 2026
dcc9a8f
chore: add hold when debug enabled to leave container running for deb…
nicholasching Jun 16, 2026
c36a5f1
docs: add demo documentation
nicholasching Jun 16, 2026
b882a30
docs: add coverage by functionality
nicholasching Jun 16, 2026
01a0762
docs: minor updates to demo doc
nicholasching Jun 16, 2026
120e57f
feat: L3-over-LAG forwarding (harness) — LAG/SVI interface-IP assignment
nicholasching Jun 23, 2026
c78809e
docs: current dev state, compatibility matrix
nicholasching Jun 17, 2026
4e1091b
docs: LAG-RIF neighbor/route + egress-disable progress (6-18)
nicholasching Jun 23, 2026
5780b35
feat: harness per-test isolation mode, restart backend between tests
nicholasching Jun 23, 2026
b34a713
docs: update to span full width
nicholasching Jun 19, 2026
5cda18e
docs: neighbor host-route local0 fix progress (6-19)
nicholasching Jun 23, 2026
4618cda
fix: address Semgrep findings in UT harness (defusedxml, Dockerfile U…
nicholasching Jun 23, 2026
7805b63
chore: strip trailing whitespace in progress-6-10 devdoc
nicholasching Jun 23, 2026
51cb75c
docs: remove devdocs, demodocs, consolidate results matrix into READM…
nicholasching Jun 29, 2026
cd93fc5
feat: add script to automate staging, build, and missing .debs errors
nicholasching Jun 29, 2026
b9319d8
feat: route libsaivs SWSS_LOG_* to stdout via LD_PRELOAD shim
nicholasching Jun 29, 2026
2bf43ab
docs: consolidate results matrix into README supported-test list
nicholasching Jun 29, 2026
80f20dc
feat: separate VPP startup configuration from code into a template
nicholasching Jun 30, 2026
16168bf
feat: execute VPP interface creation and RX mode setup at startup via…
nicholasching Jun 30, 2026
250031f
chore: migrate harness to Debian Trixie
nicholasching Jun 30, 2026
05af734
fix: retry VPP interface verification after init.cli startup
nicholasching Jun 30, 2026
7ef37b9
fix: Trixie harness image build and libpcre3 deb staging
nicholasching Jun 30, 2026
91adf0b
chore: drop SAI submodule pointer bump from harness PR
nicholasching Jul 2, 2026
4df2021
refactor: move PortChannel and LAG/SVI IP setup into sai_test setUp
nicholasching Jul 3, 2026
4da0942
docs: explain why the harness restarts the backend per test instead o…
nicholasching Jul 6, 2026
e57cb6e
chore: drop sai_test overrides and drive PortChannel/RIF setup via SI…
nicholasching Jul 6, 2026
a01722c
fix: satisfy aspell and SWSS_LOG_ENTER checks in UT harness preload shim
nicholasching Jul 8, 2026
67b5980
fix: scope relaxed packet checks to flood tests
nicholasching Jul 21, 2026
2ce71f7
fix: preserve JUnit results across test invocations
nicholasching Jul 21, 2026
ae89be9
docs: record strict 19-test harness baseline
nicholasching Jul 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .azure-pipelines/docker-sai-test-vpp/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Local-only working notes and test artifacts (not published to remote).
# devdocs/ — progress/debug logs for agent/developer context across branches
# demodocs/ — stakeholder demo notes
# results/ — JUnit XML, run logs, compatibility matrices (update README pass list when changed)
devdocs/
demodocs/
results/
138 changes: 138 additions & 0 deletions .azure-pipelines/docker-sai-test-vpp/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
FROM debian:trixie

ENV DEBIAN_FRONTEND=noninteractive \
PIP_BREAK_SYSTEM_PACKAGES=1 \
PYTHONUNBUFFERED=1 \
SAI_PROFILE=/etc/sai/sai.profile \
SAISERVER_PORTMAP=/etc/sai/port-map.ini \
PTF_PORTMAP=/etc/sai/ptf-port-map.ini \
SAI_TEST_DIR=/sai_test \
TEST_RESULTS_DIR=/test-results

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

# Build from the sonic-sairedis repository root:
# docker build -f .azure-pipelines/docker-sai-test-vpp/Dockerfile -t docker-sai-test-vpp .
COPY .azure-pipelines/docker-sai-test-vpp /opt/docker-sai-test-vpp
COPY SAI/test/ptf /opt/ptf
COPY SAI/test/sai_test /sai_test

RUN apt-get update && \
apt-get install -y --no-install-recommends \
bash \
ca-certificates \
iproute2 \
libboost-serialization1.83.0 \
libpcap0.8 \
libthrift-0.19.0t64 \
libzmq5 \
procps \
python3 \
python3-pip \
python3-setuptools \
python3-thrift \
python3-wheel \
redis-server \
redis-tools \
tcpdump && \
rm -rf /var/lib/apt/lists/*

RUN python3 -m pip install --no-cache-dir scapy==2.5.0 unittest-xml-reporting==3.2.0 && \
python3 -m pip install --no-cache-dir --ignore-installed /opt/ptf

RUN set -eux; \
deb_dir=/opt/docker-sai-test-vpp/debs; \
require_deb() { \
local label="$1"; \
shift; \
local found=0; \
local pattern; \
for pattern in "$@"; do \
if compgen -G "${deb_dir}/${pattern}" >/dev/null; then \
found=1; \
fi; \
done; \
if [[ "$found" -eq 0 ]]; then \
echo "Missing ${label}; expected one of: $*" >&2; \
exit 1; \
fi; \
}; \
require_deb "VPP infra package" "libvppinfra_*.deb"; \
require_deb "VPP package" "vpp_*.deb"; \
require_deb "VPP core plugin package" "vpp-plugin-core_*.deb"; \
require_deb "VPP DPDK plugin package" "vpp-plugin-dpdk_*.deb"; \
require_deb "SAI virtual switch package" "libsaivs_*.deb"; \
require_deb "SAI Redis package" "libsairedis_*.deb"; \
require_deb "SAI metadata package" "libsaimetadata_*.deb"; \
require_deb "SONiC SWSS common package" "libswsscommon_*.deb"; \
require_deb "YANG runtime package" "libyang_*.deb" "libyang3_*.deb"; \
require_deb "SAI thrift server package" "saiserver_*.deb" "saiserverv2_*.deb"; \
require_deb "SAI Python thrift package" "python-saithrift_*.deb" "python-saithriftv2_*.deb"; \
runtime_debs=(); \
have_saiserverv2=0; \
have_python_saithriftv2=0; \
compgen -G "${deb_dir}/saiserverv2_*.deb" >/dev/null && have_saiserverv2=1; \
compgen -G "${deb_dir}/python-saithriftv2_*.deb" >/dev/null && have_python_saithriftv2=1; \
while IFS= read -r deb_file; do \
deb_name="$(basename "$deb_file")"; \
case "$deb_name" in \
*-dbg_*.deb|*-dbgsym_*.deb|*-dev_*.deb) continue ;; \
libyang3-tools_*.deb) continue ;; \
saiserver_*.deb) [[ "$have_saiserverv2" -eq 1 ]] && continue ;; \
python-saithrift_*.deb) [[ "$have_python_saithriftv2" -eq 1 ]] && continue ;; \
esac; \
runtime_debs+=("$deb_file"); \
done < <(find "$deb_dir" -maxdepth 1 -type f -name '*.deb' | sort); \
if [[ "${#runtime_debs[@]}" -eq 0 ]]; then \
echo "No runtime .deb packages found under ${deb_dir}" >&2; \
exit 1; \
fi; \
apt-get update; \
cp /usr/sbin/sysctl /usr/sbin/sysctl.real; \
cp /usr/bin/true /usr/sbin/sysctl; \
apt-get install -y --no-install-recommends --allow-downgrades "${runtime_debs[@]}"; \
find /usr/lib/python3/dist-packages -maxdepth 1 -type d -name 'saithrift-*.egg' -print > /usr/lib/python3/dist-packages/saithrift.pth; \
test -s /usr/lib/python3/dist-packages/saithrift.pth; \
python3 -c 'import sai_thrift'; \
mv /usr/sbin/sysctl.real /usr/sbin/sysctl; \
build_dev_debs=(); \
for f in ${deb_dir}/libswsscommon-dev_*.deb; do \
[[ -f "$f" ]] && build_dev_debs+=("$f"); \
done; \
if [[ ${#build_dev_debs[@]} -gt 0 ]]; then \
apt-get install -y --no-install-recommends "${build_dev_debs[@]}"; \
else \
apt-get install -y --no-install-recommends libswsscommon-dev || true; \
fi; \
apt-get install -y --no-install-recommends g++ libhiredis-dev && \
g++ -shared -fPIC -o /usr/local/lib/libswss_log_stdout.so \
/opt/docker-sai-test-vpp/swss_log_stdout_preload.cpp -lswsscommon && \
apt-get purge -y g++ libhiredis-dev && \
if [[ ${#build_dev_debs[@]} -gt 0 ]]; then apt-get purge -y libswsscommon-dev; fi && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

RUN install -d \
/etc/sai \
/run/vpp \
/var/run/redis \
/test-results \
/usr/share/sonic/hwsku \
/var/log && \
install -m 0644 /opt/docker-sai-test-vpp/sai.profile /etc/sai/sai.profile && \
install -m 0644 /opt/docker-sai-test-vpp/lanemap.ini /etc/sai/lanemap.ini && \
install -m 0644 /opt/docker-sai-test-vpp/port-map.ini /etc/sai/port-map.ini && \
install -m 0644 /opt/docker-sai-test-vpp/ptf-port-map.ini /etc/sai/ptf-port-map.ini && \
install -m 0755 /opt/docker-sai-test-vpp/run_test.sh /usr/local/bin/run_test.sh && \
ln -sf /usr/local/bin/run_test.sh /run_test.sh

WORKDIR /

# This is a single-purpose, --privileged test harness: the entrypoint starts VPP,
# Redis and saiserver, creates/destroys veth + PortChannel netdevs, and uses raw
# AF_PACKET sockets, all of which require root inside the container. It is run
# manually/in CI as a disposable test container, never as a deployed service, so a
# non-root USER would break the harness without adding meaningful isolation.
# nosemgrep: dockerfile.security.missing-user-entrypoint.missing-user-entrypoint
ENTRYPOINT ["/usr/local/bin/run_test.sh"]
Loading
Loading