Skip to content

Pantavisor Test Framework

The Pantavisor Test Framework contains a set of scripts to permit automated testing on Pantavisor taking advantage of the App Engine init mode.


Firstly, to be able to run ARM containers on a x64 host in an apt based system:

sudo apt install binfmt-support git jq qemu qemu-user-static
sudo update-binfmts --enable qemu-arm

Now, you need to get the Pantavisor BSP source code.

repo init -u -m release.xml
repo sync -j10 -c --no-clone-bundle

If you prefer to sync by group with the -g option, remember to add the x64-appengine target:

repo init -u -m release.xml -g runtime,x64-appengine
repo sync -j10 -c --no-clone-bundle

How to Run All Tests

Now, you have to build Pantavisor for the x64-appengine target:

PANTAVISOR_DEBUG=yes ./ x64-appengine

The resulting tarball will be used by the test script. To run all tests with it:

./ run

This might take a while, but you can always stop it with CTRL-C.

How to Run a Test

Tests can be individually run too.

First, it is important to know which tests are available:

./ ls

For example, to run the test number 0 from the 'local' group of tests:

./ run local:0

To run all tests from the local group of tests:

./ run local

How to Create a New Test

To create a new test inside of the 'local' test group:

./ add local

This will create the necessary templates for a new test in tests/local/data/roles. These templates can then be edited manually to get the desired test.

How to Modify the behavior of an Existing Test

If we go to any newly created test using the previous command, we will find a directory and a JSON file:

output  resources  test.json

The test.json file contains the necessary metadata information for the execution and evaluation of a test:

        "#spec": "pv-test@1",
        "description": "ls query to mgmt and non-mgmt containers",
        "setup": {
                "cmdline": "",
                "pantavisor.config": "../../common/configs/pantavisor.config",
                "pvs": "../../common/pvs/pvs.defaultkeys.tar.gz",
                "containers": {
                        "control": "pvr-sdk",
                        "tarballs": [
                        "urls": [
                "ready-script": "resources/ready",
        "test-script": "resources/test",
        "skip": "false"



Version of the test.json. Only supported value is 'pv-test@1'.


Brief description of the test objective.


Initial Pantavisor setup for the test.


Substitutes what is read from /proc/cmdline. Can be used for configuraiton purposes.


Pantavisor configuration file that will be used for the test.


Tarball with the secureboot certs and keys. This makes possible to use tests from different manifests in our own.


Initial container setup for the test.


The name of the container that will be used by the Test Framework utilities as the management controller for things such as initialization and shutdown.

It is important to set a control container for the correct operation of the test (unless what is being tested is a device without management containers), and it is important to notice that the container must be provided either in the list of tarballs or the list of urls.


List of tarballs to be installed in the first revision for the test. Can be left empty.


List of Clone URLs to be installed in the first revision for the test. Can be left empty.


POSIX-compliant sh script to be executed before evaluating if Pantavisor status is READY. Can be used to force a READY status for any container.


The test itself. Must be a POSIX-compliant sh script. The stdout and stderr of it will form the result of the test.


Whether to skip a test or not. Possible values are 'true' or 'false'.

The test will still be executable individually or interactively.

How to Debug a Test

To interactively run a test:

./ run local:0 -i

A console will be opened with an instance of App Engine already running with the parameters that were set in test.json, except the test script will not be automatically run.

If Pantavisor is not getting to the READY status, you can use the manual option plus the interactive one:

./ run local:0 -i -m

With this, the console will be opened right before starting Pantavisor. You will be able to start it with a modified configuration, such as enabling stdoud logs for debugging.

How to Modify the Result of a Test

To create or overwrite the results of a test:

./ run local:0 -o