public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: passt-dev@passt.top
Subject: [PATCH 4/4] test: Add basic documentation about test suite, and cool-retro-term profile
Date: Fri, 28 Jan 2022 19:34:04 +0100	[thread overview]
Message-ID: <20220128183404.3407759-5-sbrivio@redhat.com> (raw)
In-Reply-To: <20220128183404.3407759-1-sbrivio@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 4060 bytes --]

Signed-off-by: Stefano Brivio <sbrivio(a)redhat.com>
---
 test/README.md | 104 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 104 insertions(+)
 create mode 100644 test/README.md

diff --git a/test/README.md b/test/README.md
new file mode 100644
index 0000000..647100f
--- /dev/null
+++ b/test/README.md
@@ -0,0 +1,104 @@
+<!---
+SPDX-License-Identifier: AGPL-3.0-or-later
+Copyright (c) 2021-2022 Red Hat GmbH
+Author: Stefano Brivio <sbrivio(a)redhat.com>
+-->
+
+# Scope
+
+This directory contains test cases for _passt_ and _pasta_ and a simple
+POSIX shell-based framework to define them, and run them as a suite.
+
+These tests can be run as part of a continuous integration workflow, and are
+also used to provide short usage demos, with video recording, for _passt_ and
+_pasta_ basic use cases.
+
+# Run
+
+## Dependencies
+
+### Packages
+
+The tests require some package dependencies commonly available in Linux
+distributions. If some packages are not available, the test groups that need
+them will be selectively skipped.
+
+This is a non-exhaustive list of packages that might not commonly be installed
+on a system, i.e. common utilities such as a shell are not included here.
+
+Example for Debian, and possibly most Debian-based distributions:
+
+    build-essential git jq strace iperf3 qemu-system-x86 tmux sipcalc bc
+    clang-tidy cppcheck isc-dhcp-common udhcpc psmisc linux-cpupower
+    netcat-openbsd fakeroot lz4 lm-sensors qemu-system-arm qemu-system-ppc
+    qemu-system-misc qemu-system-x86`
+
+### Other tools
+
+Test measuring request-response and connect-request-response latencies use
+`neper`, which is not commonly packaged by distributions and needs to be built
+and installed manually:
+
+    git clone https://github.com/google/neper
+    cd neper; make
+    cp tcp_crr tcp_rr udp_rr /usr/local/bin
+
+Virtual machine images are built during test executions using
+[mbuto](https://mbuto.lameexcu.se/), the shell script is sourced via _git_
+as needed, so there's no need to actually install it.
+
+### Special requirements for continuous integration and demo modes
+
+Running the test suite as continuous integration or demo modes will record a
+video of the steps being executed, and create binary packages. The demo mode
+uses _cool-retro-term_ as terminal, whereas the continuous integration mode uses
+_MATE Terminal_ by default.
+
+The following additional packages are commonly needed as well:
+
+    dbus-x11 xdotool x11-utils xvfb ffmpeg mate-terminal cool-retro-term xauth
+    dconf-cli alien linux-perf tshark sqlite3`
+
+For convenience, suitable profiles for _MATE Terminal_ and _cool-retro-term_ are
+provided under the `env` directory. To source them:
+
+    dconf load /org/mate/terminal/profiles/ < env/mate-terminal.profile
+    cp env/cool_retro_term.sqlite ~/.local/share/cool-retro-term/QML/OfflineStorage/Databases/*.sqlite
+
+## Regular test
+
+Just issue:
+
+    ./run
+
+from the `test` directory. Elevated privileges are not needed.
+
+## Continuous integration
+
+Issuing:
+
+    ./ci
+
+will run the whole test suite while recording a video of the execution, and it
+will also build JavaScript fragments used on http://passt.top/ for performance
+data tables and links to specific video offsets.
+
+## Demo mode
+
+Issuing:
+
+    ./demo
+
+will run the demo cases under `demo`, recording videos as well.
+
+# Framework
+
+The implementation of the testing framework is under `lib`, and it provides
+facilities for terminal and _tmux_ session management, interpretation of test
+directives, video recording, and suchlike. Test cases are organised in the
+remaining directories.
+
+Test cases can be implemented as POSIX shell scripts, or as a set of directives,
+which are not formally documented here, but should be clear enough from the
+existing cases. The entry point for interpretation of test directives is
+implemented in `lib/test`.
-- 
@@ -0,0 +1,104 @@
+<!---
+SPDX-License-Identifier: AGPL-3.0-or-later
+Copyright (c) 2021-2022 Red Hat GmbH
+Author: Stefano Brivio <sbrivio(a)redhat.com>
+-->
+
+# Scope
+
+This directory contains test cases for _passt_ and _pasta_ and a simple
+POSIX shell-based framework to define them, and run them as a suite.
+
+These tests can be run as part of a continuous integration workflow, and are
+also used to provide short usage demos, with video recording, for _passt_ and
+_pasta_ basic use cases.
+
+# Run
+
+## Dependencies
+
+### Packages
+
+The tests require some package dependencies commonly available in Linux
+distributions. If some packages are not available, the test groups that need
+them will be selectively skipped.
+
+This is a non-exhaustive list of packages that might not commonly be installed
+on a system, i.e. common utilities such as a shell are not included here.
+
+Example for Debian, and possibly most Debian-based distributions:
+
+    build-essential git jq strace iperf3 qemu-system-x86 tmux sipcalc bc
+    clang-tidy cppcheck isc-dhcp-common udhcpc psmisc linux-cpupower
+    netcat-openbsd fakeroot lz4 lm-sensors qemu-system-arm qemu-system-ppc
+    qemu-system-misc qemu-system-x86`
+
+### Other tools
+
+Test measuring request-response and connect-request-response latencies use
+`neper`, which is not commonly packaged by distributions and needs to be built
+and installed manually:
+
+    git clone https://github.com/google/neper
+    cd neper; make
+    cp tcp_crr tcp_rr udp_rr /usr/local/bin
+
+Virtual machine images are built during test executions using
+[mbuto](https://mbuto.lameexcu.se/), the shell script is sourced via _git_
+as needed, so there's no need to actually install it.
+
+### Special requirements for continuous integration and demo modes
+
+Running the test suite as continuous integration or demo modes will record a
+video of the steps being executed, and create binary packages. The demo mode
+uses _cool-retro-term_ as terminal, whereas the continuous integration mode uses
+_MATE Terminal_ by default.
+
+The following additional packages are commonly needed as well:
+
+    dbus-x11 xdotool x11-utils xvfb ffmpeg mate-terminal cool-retro-term xauth
+    dconf-cli alien linux-perf tshark sqlite3`
+
+For convenience, suitable profiles for _MATE Terminal_ and _cool-retro-term_ are
+provided under the `env` directory. To source them:
+
+    dconf load /org/mate/terminal/profiles/ < env/mate-terminal.profile
+    cp env/cool_retro_term.sqlite ~/.local/share/cool-retro-term/QML/OfflineStorage/Databases/*.sqlite
+
+## Regular test
+
+Just issue:
+
+    ./run
+
+from the `test` directory. Elevated privileges are not needed.
+
+## Continuous integration
+
+Issuing:
+
+    ./ci
+
+will run the whole test suite while recording a video of the execution, and it
+will also build JavaScript fragments used on http://passt.top/ for performance
+data tables and links to specific video offsets.
+
+## Demo mode
+
+Issuing:
+
+    ./demo
+
+will run the demo cases under `demo`, recording videos as well.
+
+# Framework
+
+The implementation of the testing framework is under `lib`, and it provides
+facilities for terminal and _tmux_ session management, interpretation of test
+directives, video recording, and suchlike. Test cases are organised in the
+remaining directories.
+
+Test cases can be implemented as POSIX shell scripts, or as a set of directives,
+which are not formally documented here, but should be clear enough from the
+existing cases. The entry point for interpretation of test directives is
+implemented in `lib/test`.
-- 
2.33.0


      parent reply	other threads:[~2022-01-28 18:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-28 18:34 [PATCH 0/4] Tests for multiple architectures and distributions Stefano Brivio
2022-01-28 18:34 ` [PATCH 1/4] test/lib/term: Allow for a wider variety of prompt characters in pane_wait() Stefano Brivio
2022-01-28 18:34 ` [PATCH 2/4] test/lib/test: Introduce 'def' directive for frequently used patterns Stefano Brivio
2022-01-28 18:34 ` [PATCH 3/4] test: Add distribution tests for several architectures and kernel versions Stefano Brivio
2022-01-28 18:34 ` Stefano Brivio [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220128183404.3407759-5-sbrivio@redhat.com \
    --to=sbrivio@redhat.com \
    --cc=passt-dev@passt.top \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).