virgl/ci: Run each dEQP instance in its own VM

Currently we run deqp-runner inside a single VM, which makes very poor
use of the available CPUs because Virgl has a bottleneck in the VMM that
serializes everything.

With this change, we can run several Crosvm instances in a runner and
make full use of the CPUs. Getting the same coverage with 3 runners
instead of 6.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12828>
This commit is contained in:
Tomeu Vizoso
2021-09-08 07:52:58 +02:00
committed by Marge Bot
parent 4bfcbe3f69
commit 81f25d8f27
12 changed files with 140 additions and 181 deletions

View File

@@ -1,27 +1,29 @@
#!/bin/sh
set -ex
set -e
export DEQP_TEMP_DIR=$1
mount -t proc none /proc
mount -t sysfs none /sys
mount -t devtmpfs none /dev || echo possibly already mounted
mkdir -p /dev/pts
mount -t devpts devpts /dev/pts
mount -t tmpfs tmpfs /tmp
. /crosvm-env.sh
. $DEQP_TEMP_DIR/crosvm-env.sh
# / is ro
export PIGLIT_REPLAY_EXTRA_ARGS="$PIGLIT_REPLAY_EXTRA_ARGS --db-path /tmp/replayer-db"
cd $PWD
if sh $CROSVM_TEST_SCRIPT; then
touch /results/success
fi
dmesg --level crit,err,warn -w >> $DEQP_TEMP_DIR/stderr &
sleep 5 # Leave some time to get the last output flushed out
set +e
stdbuf -oL sh $DEQP_TEMP_DIR/crosvm-script.sh 2>> $DEQP_TEMP_DIR/stderr >> $DEQP_TEMP_DIR/stdout
echo $? > $DEQP_TEMP_DIR/exit_code
set -e
sync
sleep 1
poweroff -d -n -f || true
sleep 10 # Just in case init would exit before the kernel shuts down the VM
exit 1
sleep 1 # Just in case init would exit before the kernel shuts down the VM