Commit Graph

85 Commits

Author SHA1 Message Date
David Heidelberg fb3632d24f ci: distribute XDG_RUNTIME_DIR with setup-test-env script
Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8615
Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8646

Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Martin Roukala <martin.roukala@mupuf.org>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22004>
2023-03-19 15:39:12 +01:00
Eric Engestrom 7176e0c160 ci: group RESULT logic in a single place
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21884>
2023-03-14 18:53:51 +00:00
Martin Roukala (né Peres) a0d8ed757e ci/init-stage2: always set XDG_RUNTIME_DIR
This seems to be needed now that we compile mesa with wayland support.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21872>
2023-03-14 17:22:07 +00:00
Martin Roukala (né Peres) 226c247945 ci/init-stage2: allow sourcing the job env vars from the CWD
This will make it easier for the b2c jobs to use this script, as I
don't think I should extract the job folder to /.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21872>
2023-03-14 17:22:07 +00:00
Mike Blumenkrantz 8c51c8697a ci: fix LVP_POISON_MEMORY usage
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21847>
2023-03-14 14:52:25 +00:00
Eric Engestrom d57a4b57df ci: disable weston session timeout
-iN, --idle-time=N
           Set  the idle timeout to N seconds. The default timeout is
           300 seconds. When there has not been any user input for the idle
           timeout, Weston enters an inactive mode. The screen fades to black,
           monitors may switch off, and the shell may lock the session.
           A value of 0 effectively disables the timeout.

We don't want the session to get locked and monitors to switch off while tests
are running, as many of them depend on swapping buffers.

Cc: mesa-stable
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21877>
2023-03-14 01:31:19 +00:00
David Heidelberg 6a1be0fb95 ci/weston: add background PID
Needed for process tracking for LAVA.

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21711>
2023-03-09 21:06:16 +00:00
David Heidelberg 5052185039 ci/weston: before testing, verify that XWayland is really running
When Xorg already running, Weston XWayland should pick DISPLAY=:1

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21711>
2023-03-09 21:06:16 +00:00
David Heidelberg 4cc0cec473 ci: implement unified sections
in after_script, variable $SCRIPTS_DIR is lost

Acked-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20272>
2023-03-01 12:02:24 +00:00
Mike Blumenkrantz a10529080b zink: set ZINK_DESCRIPTORS=db for radv jobs
there's no testing for this in ci, and radv has a unique heap/memory
setup which catches allocation regressions

Reviewed-by: Martin Roukala <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20968>
2023-02-14 12:14:49 +00:00
David Heidelberg 796686af1b ci: migrate from wget to curl
Better error handling is more reliable.

Options:
 -L, follow location
 --retry, number of retries
 --retry-all-errors, does not fail on ALL errors, that's why there is -f
 -f, fail fast with no output at all on server errors
 --retry-delay, make curl sleep this amount of time before each retry

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20788>
2023-01-19 23:46:44 +00:00
Erico Nunes 9b29876a02 ci: Start weston with Xwayland
This can be used instead of HWCI_START_XORG to provide X in CI.
It will only be actually used if HWCI_START_XORG is not set in the same
job.
It is particularly useful as weston has the explicit headless backend
which is more straightforward to use in the headless systems in CI.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20393>
2023-01-08 17:36:13 +01:00
Emma Anholt 03a26ae3d9 ci: Fix VK driver setup for HWCI_START_*.
Review feedback requested a change that was incorrect, causing Xorg to
start to fail, but I forgot to retest the manual -full jobs that relied on
it.

Fixes: 99a6f2a186 ("ci: Set the path to the VK drivers during HWCI_START_XORG/WESTON.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20523>
2023-01-06 19:00:17 +00:00
Emma Anholt 99a6f2a186 ci: Set the path to the VK drivers during HWCI_START_XORG/WESTON.
If the test is running with zink, we want zink to be able to find the
vulkan driver.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20503>
2023-01-04 21:18:08 +00:00
Erico Nunes 4bd1829a5a ci: Enable gl-renderer in weston for wayland testing
The weston headless backend defaults to gl-renderer disabled, which
exposes a different set of globals and clients may fall back to software
rendering.
Enable gl-renderer so that clients use the hardware drivers.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20391>
2022-12-28 23:18:15 +01:00
David Heidelberg 3e80c5f1ec ci/kernel: enable ZRAM on all archs
Let's enable ZRAM with 2G. Should help prevent peak OOM scenarios.

For more info see: https://www.kernel.org/doc/html/latest/admin-guide/blockdev/zram.html

Reviewed-by: Eric Engestrom <eric@igalia.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19535>
2022-12-02 13:51:15 +00:00
Emma Anholt 6af1fbc251 ci/deqp-runner: Drop dead code for DEQP_CASELIST_FILTER.
The last user is now gone.

Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19912>
2022-11-22 21:28:02 +00:00
Emma Anholt ac2b84b8c2 ci: Add weston to our rootfses for wayland testing.
We want to be able to test the wayland EGL platform code in Mesa, which
has had no coverage yet.

Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19912>
2022-11-22 21:28:02 +00:00
Benjamin Tissoires 67cee534a8 CI: convert to use the new S3 server instead of the legacy minio
We don't need to login anymore, but we can't use plain minio commands
now. `ci-fairy` got a helper as `s3cp` to keep an almost identical
API.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19076>
2022-11-04 11:41:42 +00:00
Emma Anholt 126e83d970 ci/zink: Re-enable a630 zink-on-turnip traces job using gbm as the backend.
This is a workaround for #6753, without having to build and install a
custom xlib in our containers.  Maybe some day debian will have a
backport?

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17549>
2022-08-05 00:23:16 +00:00
David Heidelberg 95a7b65c14 ci: replace gzip usage with zstd where posible
v2: added missing zstd to arm_build.sh

Reviewed-by: Emma Anholt <emma@anholt.net>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17776>
2022-08-04 11:21:45 +00:00
Martin Roukala (né Peres) c0fbc31737 radv/ci: test the llvm backend on navi21
The LLVM backend is not officially supported by the RADV developers,
but it has been useful early during bring-up, or later when users are
experiencing what looks like a compiler bug. It is thus beneficial to
keep it working.

However, maintaining the vkcts expectations for every platform requires
more work and machine time than what we would like to commit to. This
is why we agreed that we would only keep LLVM tested on the latest
family of Radeon GPUs.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16841>
2022-07-02 12:35:51 +03:00
Guilherme Gallo 3b8d10d270 ci/lava: Improve result parsing regex
LAVA job logs have an ongoing problem of message interleaving with kmsg.
So any kernel dumps and LAVA signals (which are being printed in kmsg)
will have a chance to clutter the pattern matching for `hwci: mesa:
(pass|fail)` line.

v2:
- Add an 1 second sleep before exiting the test script, to give enough
  time to print the result message without conflicting with LAVA ENDTC
  signal from kmsg

Closes: #6714

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17175>
2022-06-28 22:51:45 +00:00
Emma Anholt d4c664a670 ci: Terminate capture-devcoredump before tarring up artifacts.
Every few weeks we'd get a flake where the script noticed the devcore
right as we were wrapping up, and then tar would exit because the file it
was tarring changed underneath it.  Just kill devcores before we do that
-- even if we kill it while it's working, it's so rare that it probably
won't bother anyone.

Fixes: #5867
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16820>
2022-06-21 17:46:05 +00:00
Samuel Pitoiset 5878eca643 ci: add VKD3D_PROTON_RESULTS to the list of variables to pass down for testing
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Martin Roukala <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17050>
2022-06-16 06:36:36 +00:00
Samuel Pitoiset aaf6eb6c46 ci: fix passing down MESA_LOADER_DRIVER_OVERRIDE for zink-anv-tgl
zink-anv-tgl wasn't using Zink at all because this variable was missing
and then not passed to the runners...

This introduces a list of failures for Zink/Anv and also few tests
are skipped because they take too long (> 60s).

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Martin Roukala <martin.roukala@mupuf.org>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17031>
2022-06-15 08:32:44 +00:00
Martin Roukala (né Peres) 5fc99a1536 radv/ci: enable the experimental support for mesh shaders
The experimental support has been merged for months already, but has
been left unexercised in CI even though dEQP has a mesh_shader.nv
category.

This commit enables the experimental support, which should bring
additional testing \o/.

Suggested-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16550>
2022-05-18 06:48:05 +00:00
Martin Roukala (né Peres) 3fe3dbea69 ci: add ACO_DEBUG to the list of variables to pass down for testing
This parameter is used by radv-ci to perform extra validation while
running VKCTS.

This change catches more issues, which are will be addressed in !16248:
 - dEQP-VK.subgroups.ballot_broadcast.compute.subgroupbroadcast_i8vec2,Crash
 - dEQP-VK.subgroups.ballot_broadcast.compute.subgroupbroadcast_u8vec2,Crash

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Suggested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16277>
2022-05-10 10:17:19 +00:00
Guilherme Gallo ea85f6cfda ci: Fix init-stage2 exit code
After a LAVA job submitter rework, the init-stage2.sh was changed to be
compatible with new LAVA job definitions, but the result from the script
represented by `HWCI_TEST_SCRIPT` variable is obfuscated by the `set -e`
command. So when the test script fails, `set` will override the exit
code and the jobs will pass when they should fail.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16325>
2022-05-04 23:39:15 +00:00
Guilherme Gallo e9aef19e2b ci/lava: Trap init-stage2.sh background processes
Any daemon executed in init-stage2.sh may interfere with LAVA signals,
since any threaded output to console may clutter the signals, which are
based on the log output.
E.g: This job
https://gitlab.freedesktop.org/gallo/mesa/-/jobs/20779120#L2102
has failed because capture-devcoredump.sh was alive and emitting kernel
messages to the console during the LAVA signal handling, mangling the
output and making the LAVA to fail to check the results of the job.

Another problem is that CONFIG_DEBUG_STACK_USAGE Kconfig is enabled.
This causes process exit to dump a `RESULT=[  246.756067] lava-test-case
(156) used greatest stack depth: ... bytes left` kernel message to the
logs corrupting LAVA signal message. Empirically, it happens one in
every 280 jobs. To solve that, compose the lava-test-case custom script
with a short sleep to give time for kernel to dump the message clearly
and a exit command to keep the return code from init-stage2.sh script.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15938>
2022-04-28 06:33:46 +00:00
Guilherme Gallo 6a3ee3ea32 ci/lava: Return test-suite result as exit code
Makes it easier for external observers.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15938>
2022-04-28 06:33:46 +00:00
Cristian Ciocaltea d89b95b247 ci: Limit Intel CPU scaling frequency for performance tests
As an additional measure to mitigate thermal throttling, set the upper
limit for the CPU scaling frequency to 65% of maximum allowed by the
hardware.

The impact on the overall tests duration should be minimal since the
performance tests do not really put high load on the CPU.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Acked-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16164>
2022-04-27 18:46:05 +03:00
Cristian Ciocaltea 99b04cbb73 ci: Add CPU frequency adjustment capability
Update intel-gpu-freq.sh script to offer the possibility to adjust CPU
operating frequencies in addition to GPU.

Note this is currently limited to just setting the maximum scaling
frequency as percentage of the maximum frequency allowed by the
hardware.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Acked-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16164>
2022-04-27 18:46:05 +03:00
Cristian Ciocaltea 0e14b674f1 ci: Lock Intel GPU frequency for performance tests
In order to ensure consistent results when running performance tests,
lock the frequency for Intel GPUs to ~70% of the maximum allowed by
hardware.

This seems to offer a good balance between execution speed and results
consistency.

An increase of the frequency will also increase the rate of throttling
events, with a negative impact on consistency. Such events are logged,
as in the following example:

  GPU throttling detected: act=200 min=850 cur=850 RPn=100

This shows the actual GPU frequency (200 MHz) dropped below the minimum
requested (850 MHz).

For more details about the various frequency information sources, please
see the script header comments in ".gitlab-ci/common/intel-gpu-freq.sh".

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Acked-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15662>
2022-04-06 13:11:05 +00:00
Cristian Ciocaltea 5d5af8bffb ci: Add Intel GPU frequency utility
Add script to manage Intel GPU frequencies.

It can be used for debugging performance problems or to lock a stable
frequency while executing benchmark tests.

Typical use cases:

- Get all available GPU frequency information
$ ./intel-gpu-freq.sh -g all

* Hardware capabilities
   RP0: 1350 MHz
   RPn:  100 MHz
   RP1:  400 MHz

* Enforcements
   max: 1350 MHz
   min:  100 MHz
 boost: 1350 MHz

* Actual
   act:  100 MHz
   cur:  400 MHz

- Lock frequency to 80% of the maximum allowed by hardware and enable
  throttling detection
$ ./intel-gpu-freq.sh -s 80% -d

GPU throttling detected: act=1050 min=1350 cur=1350 RPn=100
GPU throttling detected: act=1100 min=1350 cur=1350 RPn=100

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Acked-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15662>
2022-04-06 13:11:05 +00:00
Emma Anholt ad0fcaf1ee ci/lava: Simplify passthrough of the request to upload results/ to minio.
We already have a way to pass env vars around, just use that instead of
packing/unpacking it on the kernel command line.

Cleans up HW runner job log output some more.

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15332>
2022-04-05 21:37:46 +00:00
Cristian Ciocaltea 18111c3787 Revert "ci: Convert generate-env.sh to a POSIX compliant script"
This reverts commit 9904ea2c76 since it is
not able to properly escape all special characters (i.e. [']).

The POSIX conversion is not needed anymore, as we have made 'bash'
available in LAVA rootfs.

Reported-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15524>
2022-03-23 20:31:06 +00:00
Cristian Ciocaltea 356c9c25c3 ci: Allow specifying any shell command via HWCI_TEST_SCRIPT
Interpret the value of HWCI_TEST_SCRIPT environment variable as a shell
command. This allows, for example, to provide additional environment
variables: HWCI_TEST_SCRIPT="VAR1=VAL1 VAR2=VAL2 /path/to/script"

Additionally, add the missing execute permission flags to
gtest-runner.sh script.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15208>
2022-03-22 17:01:09 +00:00
Cristian Ciocaltea fb2ffc2f67 ci: Provide consistent results location in LAVA
There is an out-of-sync approach regarding the location of the results
folder: some scripts refer to it via $CI_PROJECT_DIR/results, while
others just assume it is located in the current working directory.

Usually $PWD points to $CI_PROJECT_DIR, but in some cases this is not
the case, hence let's ensure the 'results' folder can always be found
in the current working directory.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15208>
2022-03-22 17:01:09 +00:00
Cristian Ciocaltea 3e01cea1bd ci: Remove obsolete CROSVM_TEST_SCRIPT env var
This was used in the past for passing the path to a script to be
executed inside a crosvm instance. Currently, setting this variable
has no effect, hence remove it from generate-env.sh.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15208>
2022-03-22 17:01:09 +00:00
Cristian Ciocaltea 040fb521b3 ci: Add PIGLIT_REPLAY_LOOP_TIMES to generate-env.sh
PIGLIT_REPLAY_LOOP_TIMES is currently used to override the default
configuration when running virgl trace performance tests in LAVA.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15208>
2022-03-22 17:01:09 +00:00
Cristian Ciocaltea fdc55725a0 ci: Make kernel image available in LAVA for KVM use cases
In order to run a VM (e.g. crosvm) through HWCI_TEST_SCRIPT on a LAVA
target, it's necessary to download a kernel image on the target device.

When HWCI_KVM is set to 'true', we can safely assume HWCI_TEST_SCRIPT
contains a command or the path to a script which expects the kernel
image to be available under /lava-files/${KERNEL_IMAGE_NAME}.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15208>
2022-03-22 17:01:09 +00:00
Cristian Ciocaltea 86ce26f1fc ci: Load KVM kernel module for LAVA runners
If 'HWCI_KVM' enviroment variable is set, load the KVM kernel module
specific to the detected CPU virtualisation extensions: vmx for Intel
VT and svm for AMD-V.

As an additional optimization, handle HWCI_KERNEL_MODULES probing in the
main shell process instead of creating an unnecessary subshell.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15208>
2022-03-22 17:01:09 +00:00
Cristian Ciocaltea 9904ea2c76 ci: Convert generate-env.sh to a POSIX compliant script
This shell script will be used in environments (e.g. LAVA) where bash
is not available, hence let's make sure it is POSIX compliant in order
to be able to execute on any modern shell interpreter.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15208>
2022-03-22 17:01:09 +00:00
Emma Anholt f831ba238f ci/turnip: Increase the hangcheck timer to 2 seconds.
We get a lot of useful coverage from running graphicsfuzz with spilling
enabled, but it's also pretty slow and can cause intermittent hangcheck
failures.  I thought I'd categorized them when merging !14839 (device loss
on reset), but it looks like not all of them and we're now more likely to
have flakes take out the whole test run when a single flake makes the rest
of the caselist a flake.

This is a little unfortunate in that it means our test environment is not
the same as a stock system you would want to run deqp on to submit
conformance, but I think it's an improvement in the test maintenance work
vs needing to fix things up later.

We have some other tests besides turnip that can trigger hangchecks which
we might also like this increase for (some disabled traces, for example).
However, freedreno GL has a 5-second timeout waiting for idle when
mapping, and a couple of 2-second timeouts in a row can result in spurious
failures in other tests!

Fixes: #6163
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15435>
2022-03-18 19:07:24 +00:00
Charlie Turner 58186df32c amd, ci: Drop log level in SPIRV -> NIR code generator.
See 786fa3435c for the rationale of this variable, but the point is to
avoid many error reports for conformance conformance issues within the
VK-CTS shaders.

Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Martin Roukala <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14660>
2022-03-01 13:04:14 +00:00
Guilherme Gallo 2d75fd1e0a virgl/ci: make crosvm-runner pass variables in a secure way
crosvm-runner.sh was using `export -p` to create an environment script
for the virtualized system, but this command will dump every declared
environment variable in the system, which includes Gitlab's CI variables
with sensitive data, such as passwords and auth tokens.

Replacing `export -p` to `generate-env.sh`, which only exports the
necessary variables for Mesa CI jobs.

Extra changes:

* Stop changing ${PWD} variable programmatically in scripts. ${PWD} is a
variable used by most prolific coreutils and bash commands, such as `cd`
and `pwd`, besides it is set by subshells [1]; changing this variable
may lead to complex situations.
As drop-in replacement for ${PWD}, use ${DEQP_BIN_DIR} to flag that
there is a special folder where dEQP should be run.
* Double quote path and array variables. See: https://github.com/koalaman/shellcheck/wiki/SC2086
* Do not export variables directly from commands output. See: https://github.com/koalaman/shellcheck/wiki/SC2155

[1]
```
$ cd /tmp
$ export PWD=test; bash -c 'echo $PWD'
/tmp
```

v2:
- Revert $DEQP_BIN_DIR quoting in crosvm-runner.sh and crosvm-init.sh
- Log all the passed variables to stdout, to help with debugging when
  new variable are needed to be put in `generate-env.sh`

v3:
- Revert $DEQP_BIN_DIR quoting leftovers

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14626>
2022-01-27 18:28:48 +00:00
Emma Anholt af957d4a17 ci/traces: Always generate the junit XML.
While it's not the primary interface to interpreting trace job failures,
it was set in all the traces jobs it looks like and it's low cost anyway.

Reviewed-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14604>
2022-01-27 04:37:16 +00:00
Emma Anholt 60f7bd3c09 ci/traces: Drop PIGLIT_REPLAY_UPLOAD_TO_MINIO.
You have to do this as part of the traces workflow, otherwise there are no
baseline images for your driver to compare to in the HTML summary.

Reviewed-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14604>
2022-01-27 04:37:16 +00:00
Guilherme Gallo 8992cf5ab8 ci: Build skqp on ARM64 images
This commit makes `kernel+rootfs_arm64` job build and install skqp on
ARM64 devices rootfs.

Skia repository has a tool to prepare skqp models located at
`tools/skqp/cut-release`, which get files from [Skia
Gold](https://skia.org/docs/dev/testing/skiagold/), generate
files.checksum, rendertests.txt and unittests.txt. One gives a range of
commits to let `cut-release` find the right resources to prepare skqp
for the user. However, it is failing, since it fails when trying to get
image packages from a range of commits via HTTPS from the host
https://public-gold.skia.org but it responds with error 404 every time.
I tried a range a thousand of commits, yet it still does not give
results. The workaround employed was to recover the most recent
`files.checksum` and `rendertests.txt` files from the git history and
generate `unittests.txt` from `list_gpu_unit_tests` binary.

`skqp` runs two lists of tests, `rendertests.txt` and `unittests.txt`.
Both must be located inside the `skqp` assets folder.  The first list
uses GL and GLES to test rendering scenarios. The second runs some unit
tests that do not render an image per se.

In order to make the first `a630_skqp` to be green, the crashing tests
were removed from the test lists and the expectations of the failing
ones were updated.

It is worth noting that `rendertests.txt` can bring some detail about
each test expectation, so each test can have a max pixel error count, to
tell `skqp` that it is OK to have at most that number of errors for that
test. See also:
https://github.com/google/skia/blob/main/tools/skqp/README_ALGORITHM.md

As each render backend has a different error count, two different
`rendertests.txt` files were created,
`src/freedreno/ci/freedreno-a630-skqp-gl_rendertests.txt`,
`src/freedreno/ci/freedreno-a630-skqp-gles_rendertests.txt` and
, which one refers to GL and GLES tests respectfully.
The unit tests file for a630 is located at
`src/freedreno/ci/freedreno-a630-skqp_unittests.txt`

```
aaclip
domain
formats
highcontrastfilter
rectangle_texture
yuv_make_color_space
```

```
ProcessorOptimizationValidationTest
VkProtectedContext_CreateNonprotectedContext
VkYCbcrSampler_DrawImageWithYcbcrSampler
VkYCbcrSampler_NoYcbcrSurface
```

Each test was updated with the max_error count equal to the first run result.

```
analytic_antialias_inverse
async_rescale_and_read_dog_down
async_rescale_and_read_dog_up
async_rescale_and_read_rose
async_rescale_and_read_text_down
async_rescale_and_read_text_up
async_rescale_and_read_text_up_large
async_rescale_and_read_yuv420_rose
complexclip2_path_bw
encode-platform
imageblur_large
lcdtextsize
onebadarc
onefailarc
scale-pixels
surfaceprops
textfilter_color
textfilter_image
```

Considering all the following tests results as wrong.

```
async_rescale_and_read_no_bleed
backdrop_imagefilter_croprect_persp
complexclip2
imageblurrepeatmode
mixerCF
overdrawcolorfilter
patch_alpha
patch_primitive
rrect_clip_bw
scaledemoji_rendering
yuv_splitter
```

v2:
  a) add link to HTML report on job log
  b) remove extraneous spaces diff
  c) remove unnecessary conditions from build-skqp.sh
  d) use fixed skqp source commit SHA

v3:
  a) Use only main skia repository to fetch models and build skqp
  b) Use list_gpu_unit_tests binary to create a base unittests.txt file
  c) Remove crashing tests
  d) Set failing tests expectations for the first skqp run

v4:
  a) Remove clang dependency
  b) Separate each skqp backend result into its folder
  c) Regroup a630_skqp in one job

v5:
  a) Separate tests files per driver

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5580
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14146>
2022-01-05 20:15:04 +00:00