Skip to content

Integration testing script and supporting changes#164

Open
amd-vserbu wants to merge 13 commits into
Xilinx:devfrom
amd-vserbu:feature/branch-test
Open

Integration testing script and supporting changes#164
amd-vserbu wants to merge 13 commits into
Xilinx:devfrom
amd-vserbu:feature/branch-test

Conversation

@amd-vserbu

Copy link
Copy Markdown
Collaborator

Summary

Adds an end-to-end branch-test harness that clones an arbitrary SLASH branch on a V80 host, builds it from source, and runs the full example + stress suite against real hardware. To make that possible without disturbing the system install, vrtd and its clients learn to run entirely outside systemd via environment variables.

Changes

Run vrtd outside systemd

  • VRTD_SOCKET — when set, vrtd creates and listens on its own AF_UNIX/SOCK_SEQPACKET socket at that path (in addition to any systemd-passed fds), and unlinks it on shutdown. Socket setup is refactored into create_listening_unix_socket / register_listening_socket helpers.
  • VRTD_LOG — when set, all LOG() output goes to that file instead of the journal. The old journal-reachability preflight check is replaced by vrtd_log_init / vrtd_log / vrtd_log_close, and startup fails if the log file can't be opened.

Client-side socket override

  • vrt::Device and libvrtdpp::Session now honor VRTD_SOCKET (falling back to the compiled-in default), so v80-smi and applications can target a non-standard daemon socket the same way.

scripts/extra/branch-test.sh (new)

  • Clones a given --repo-url/--branch, builds via pbuild, loads slash.ko + ami.ko, launches a direct-run vrtd with a scratch config/socket/log, programs the static shell over JTAG, then runs the emu/sim/hw examples and the stress test.
  • Serializes the hardware-mutating phase across concurrent runs with a flock advisory lock, and restores the system runtime (modules, PCIe functions, systemd vrtd) on exit.

Usage

Run as root on a V80 host. Every flag has an env-var equivalent.

sudo scripts/extra/branch-test.sh \
    --repo-url https://github.com/Xilinx/SLASH.git \
    --branch feature/branch-test \
    --scratch /scratch/branch-test \
    --bdf 0000:65:00 \
    --smbus-ip /path/to/smbus_ip.zip
Flag Env Description
--repo-url URL REPO_URL Git repository to clone
--branch BRANCH BRANCH Branch to test
--scratch DIR SCRATCH Clone destination / working directory
--bdf BDF BDF Board BDF prefix (e.g. 0000:65:00)
--smbus-ip ZIP SMBUS_IP SMBus IP zip extracted into the root-design iprepo before pbuild
--protected-user USER PROTECTED_USER Unprivileged user that owns the checkout/build (default: SUDO_USER)
--scratch-vrtd DIR SCRATCH_VRTD Directory for the direct-run vrtd config/socket/log (default: SCRATCH/vrtd)
--source FILE Environment setup script to source before building (e.g. Vivado/Vitis settings)

New test script flags

  • test-examples.sh --use-repo — build examples against this checkout (SLASH_USE_REPO=ON) instead of installed packages.
  • stress-test.sh --use-pbuild — use the pbuild-built v80-smi instead of PATH.
  • Cap validate at 32 threads: it allocates 2×512 MiB buffers per thread within the 32 GiB space, so >32 threads overflows.

Signed-off-by: Vlad-Gabriel Serbu <Vlad-Gabriel.Serbu@amd.com>
Signed-off-by: Vlad-Gabriel Serbu <Vlad-Gabriel.Serbu@amd.com>
Signed-off-by: Vlad-Gabriel Serbu <Vlad-Gabriel.Serbu@amd.com>
Signed-off-by: Vlad-Gabriel Serbu <Vlad-Gabriel.Serbu@amd.com>
Signed-off-by: Vlad-Gabriel Serbu <Vlad-Gabriel.Serbu@amd.com>
… a non-standard socket

Signed-off-by: Vlad-Gabriel Serbu <Vlad-Gabriel.Serbu@amd.com>
Signed-off-by: Vlad-Gabriel Serbu <Vlad-Gabriel.Serbu@amd.com>
Signed-off-by: Vlad-Gabriel Serbu <Vlad-Gabriel.Serbu@amd.com>
Signed-off-by: Vlad-Gabriel Serbu <Vlad-Gabriel.Serbu@amd.com>
Signed-off-by: Vlad-Gabriel Serbu <Vlad-Gabriel.Serbu@amd.com>
Signed-off-by: Vlad-Gabriel Serbu <Vlad-Gabriel.Serbu@amd.com>
Signed-off-by: Vlad-Gabriel Serbu <Vlad-Gabriel.Serbu@amd.com>
Signed-off-by: Vlad-Gabriel Serbu <Vlad-Gabriel.Serbu@amd.com>
@amd-vserbu amd-vserbu changed the title Feature/branch test Testing script Jul 17, 2026
@amd-vserbu amd-vserbu changed the title Testing script Integration testing script and supporting changes Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant