Commit Graph

590 Commits

Author SHA1 Message Date
Eric Engestrom
e6b9543668 meson: only run symbols-check if nm is available
And drop the redundant check from symbols-check.py, which was actually
masking all kinds of issues.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35891>
(cherry picked from commit 4be493862d)
2025-07-15 16:19:54 +02:00
Eric Engestrom
313130c431 bin/symbols-check: document new platform symbols exported since symbols-check was broken
The `pthread_mutexattr_*` symbols probably shouldn't be exported, but
let's fix that later so that we can at least get symbols-check to run
again ASAP.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35891>
(cherry picked from commit f350803fb3)
2025-07-15 16:19:54 +02:00
Eric Engestrom
a2bc0d2079 bin/symbols-check: sort platform symbols
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35891>
(cherry picked from commit f06fff8148)
2025-07-15 16:19:54 +02:00
Eric Engestrom
21c1e4f371 bin/symbols-check: ignore version of platform symbols
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35891>
(cherry picked from commit 3d9b76db8e)
2025-07-15 16:19:54 +02:00
Eric Engestrom
fc37fbb555 bin/symbols-check: ignore nm lines that don't have a symbol name
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35891>
(cherry picked from commit 5672230c19)
2025-07-15 16:19:54 +02:00
Eric Engestrom
643d542143 bin/symbols-check: fix fields length condition before accessing fields
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35891>
(cherry picked from commit e626636e90)
2025-07-15 16:19:54 +02:00
Eric Engestrom
0693f55fe3 pick-ui: add missing dependency
Somehow I forgot to commit this line 🤦

Fixes: c37a468a8a ("pick-ui: make `Backport-to: 25.0` backport to 25.0 *and more recent release branches*")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34657>
(cherry picked from commit 0a41200f82)
2025-04-23 12:21:56 +02:00
Eric Engestrom
94628a8fbf pick-ui: make Backport-to: 25.0 backport to 25.0 *and more recent release branches*
It is what developers expect, so make the code match it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34580>
(cherry picked from commit c37a468a8a)
2025-04-22 18:38:51 +02:00
Guilherme Gallo
e5105a8852 ci: Add some unit tests for the duration field
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34478>
2025-04-15 13:04:11 +00:00
Juan A. Suarez Romero
dd3cad2201 ci: include duration in the CustomLogger
Include the difference between start and end times, so it is easy to
check how much time it took.

This can be used for things like ensuring the test phase is under 10
minutes, as suggested in the documentation.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Vignesh Raman <vignesh.raman@collabora.com>
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34478>
2025-04-15 13:04:11 +00:00
Alyssa Rosenzweig
3e82395306 bin: add rebase mode
when we need to apply trailers to a whole MR at once, it's convenient to
do something like `git rebase --exec "rb faith" origin/main`. This adds that
operation into the script itself, so that can be done with simply
`rb -r origin/main faith`.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34409>
2025-04-08 17:05:58 -04:00
Konstantin
e7a44de184 nir/tests: Do not rely on __LINE__
__LINE__ can be inconsistent when using different compilers. This patch
changes the test runner to do a simple string find/replace of the test
source file instead of looking for the line where the reference string
starts.

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33980>
2025-04-04 19:01:01 +00:00
Eric Engestrom
e7b2eda39d pick-ui: fix parsing of multiple backport-to: lines
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34117>
2025-03-25 09:08:46 +00:00
Eric Engestrom
f8d07396fa pick-ui: rename s/out/commit_message/ variable to make its contents clearer
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34117>
2025-03-25 09:08:46 +00:00
Eric Engestrom
2c9ae634ef pick-ui: add missing field in test expectation
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34117>
2025-03-25 09:08:46 +00:00
Eric Engestrom
70665e2df7 pick-ui: fix enum value in test expectation
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34117>
2025-03-25 09:08:46 +00:00
Eric Engestrom
9d9e0c9c1b pick-ui: clean up formatting
Makes it easier to see what's what, especially once we have to change
things in the next commits.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34117>
2025-03-25 09:08:46 +00:00
Guilherme Gallo
b3b1e120a1 ci/update_tag: fix linter errors
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33863>
2025-03-12 20:04:20 +00:00
Guilherme Gallo
82073f7be3 ci/bin: update_tag: improve tag load
Replace global path variables with ProjectPaths dataclass
- Add explicit file existence check before loading YAML
- Enhance tag retrieval by checking environment variables first
- Add logging for better debugging of tag selection process
- Remove redundant file existence check in main function
- Improve error handling for missing conditional tags file

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33863>
2025-03-12 20:04:20 +00:00
Guilherme Gallo
5798f5d05f Revert "ci: setup-test-env: Prefer functions over aliases"
This reverts commit 1cc2c738bb

We originally changed some aliases into functions so scripts could use
them without needing to be sourced, keeping the environment cleaner.

However, this broke `x_off`, which is supposed to stop debug logs
(xtrace output) from showing in the console. The function version still
triggered xtrace before disabling it, while the alias correctly
redirected the logs to `/dev/null`.

It also fixes the `bin/ci/update_tag.py` script to be able to reuse the
aliases via double sourcing the setup-test-env.sh and the respective
build script.

Reported-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33863>
2025-03-12 20:04:20 +00:00
Alyssa Rosenzweig
76da759635 bin: add list of Mesa contributors
to make it easier for people (especially newcomers to the project) to add review
tags, we need a database mapping gitlab usernames to author names & emails. that
way, if someone just comments "rb" or whatever, there's a direct way to look
that up. this comimt adds a list of current contributors with the following
methodology:

1. first, I grabbed all names + emails of recent authors, with mailmap applied,
   as proxy for active contributors:

   $ git log --since=2025-01-01 --pretty='%aN,%aE,'|sort | uniq

2. then, I scraped usernames via the gitlab api attempting to match by name. I
   don't want to hammer the gitlab api too much which is why I tried to keep the
   list in #1 as small as possible.

   import gitlab
   import subprocess
   import tempfile
   import sys
   import urllib.request
   import csv

   gl = gitlab.Gitlab('https://gitlab.freedesktop.org', private_token=...)
   names = {}
   with open('dump.csv') as csvfile:
       spamreader = csv.reader(csvfile)
       for row in spamreader:
           if len(row) == 3:
               names[row[0]] = row[1]
   for name in names:
       users = gl.users.list(search=name)
       print(', '.join([name, names[name]] + [u.username for u in users]))

3. finally, I fixed up various data issues by hand. there were cases of both
   people with multiple usernames (I tried to pick the one that's actually in
   use), and people whose name on their profile does not match the name in their
   commits (I tried to determine the username from searching gitlab manually,
   but dropped a number of such authors when it was nontrivial to figure out. I
   am a regular reviewer across the tree so if I don't recognize your name
   you're probably not that active, sorry.)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33896>
2025-03-10 20:09:40 +00:00
Alyssa Rosenzweig
f365c2d33b bin: add script for applying review trailers
..or "the one where Alyssa gets jealous by b4".

Those of us who have stuck around a while have a habit of just commenting "rb"
or "ab" on MRs. which raises the question for everyone else of what name/email
to use. I've personally built up a collection of 36 (!!) different
shell aliases to apply different people's trailers. I think other people do
similarly.

This calls for better tooling. This patch adds a little script for applying
review trailers given a fuzzy match on the reviewer's name. I recommend
contributors alias it to something like `mrb`, then you can do things like:

   mrb alyssa
   mrb -a faith

to add a review tag for me or an acked-by tag for Faith.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33896>
2025-03-10 20:09:40 +00:00
Guilherme Gallo
47659ddf70 ci: Simplify LAVA farm detection
Refactor the LAVA farm detection to use a simpler environment
variable-based approach:
- Remove the complex regex-based farm detection
- Replace LavaFarm enum with a simple string-based farm identification
- Update related tests and job definition logic
- Remove hypothesis testing dependency

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33888>
2025-03-08 02:45:02 +00:00
Marek Olšák
027ccd963b Remove osmesa
It's redundant with EGL surfaceless and it doesn't have much use.

It's also available from the amber branch, so distros should get it from
there if they want to continue packaging it.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33836>
2025-03-04 00:40:39 +00:00
Guilherme Gallo
f13b95ad5c ci: add support for structural tagging
Make structural tagging functions available for both test and build
scripts.

Introduces the update_tag.sh helper for listing, checking, and updating
deterministic tags.

Also adds the ci_tag_build_time_check and ci_tag_test_time_check
functions to validate tags during build and test phases, ensuring
consistent component versioning.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33421>
2025-02-28 01:33:34 +00:00
Eric Engestrom
8364782222 docs: update gitlab docs urls
GitLab finally dropped the split between "docs for paid users" and
"docs for free users", and in the process re-shuffled some things.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33694>
2025-02-23 00:31:59 +01:00
Valentine Burley
a5765d7659 khronos-update: Update ANDROID guards in vk_android_native_buffer.h
This file was modified in commit bcc1950886 ("vulkan: fix glibc AOSP build")
without realizing it is imported code.

Update it to prevent the need to revert this modification after every
header update.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33272>
2025-02-03 10:21:23 +00:00
Konstantin Seurer
ec89f88722 spirv: Handle NonSemantic.Shader.DebugInfo.100
New versions of glslangValidator seem to emit those instructions for
debug info instead of OpLine.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33141>
2025-01-30 20:14:01 +00:00
Leonard Göhrs
db2a10150f ci/lava: update lavacli from version 1.5.2 to 2.2.0
The lavacli version 1.5.2 has been released in December 2022.
Use the most recent version 2.2.0, released in October 2023, instead.

Notable changes since 1.5.2:

  - Authentication tokens are now stripped from exceptions when HTTP
    requests fail. (1.6)

Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33266>
2025-01-29 22:45:53 +00:00
Konstantin Seurer
6ddd791d6b nir: Add a test runner
The test runner can automatically update reference shaders when the
result changes.

Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32644>
2025-01-18 11:02:25 +00:00
Valentine Burley
a0de5e7d02 ci: Fix trace update script reading GitLab token from default location
Update the trace update script to use get_token_from_default_dir for
reading the GitLab token from the default location (~/.config/gitlab-token),
fixing the script and aligning it with our other tools.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33061>
2025-01-17 02:13:05 +00:00
Deborah Brouwer
3c441191d9 ci: pipeline_message: reset empty errors
Currently marge will ignore an error message if it is just the word
"error" without any further information. However, if she never finds a
more informative message, then she will just print that meaningless
error message.

Instead of an empty error message, just leave the message blank.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32773>
2025-01-07 05:08:10 +00:00
Deborah Brouwer
011a867fbe ci: pipeline_message: parse fatal messages
Currently marge only parses a failed job log for error messages, which can
cause her to miss fatal messages.

Example:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32557#note_2696196
https://gitlab.freedesktop.org/mesa/mesa/-/pipelines/1327177

If a `fatal` message is in the error log, add it to the pipeline message.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32773>
2025-01-07 05:08:09 +00:00
Deborah Brouwer
3bcb29cfcc ci: pipeline_message: ignore generated errors
Currently marge does not ignore the word `generated` when she is searching
the logs for a relevant error message. So, marge's comments on a failed
pipeline say something unhelpful like "errors generated"

Example:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32687#note_2706792
https://gitlab.freedesktop.org/mesa/mesa/-/pipelines/1332129

Ignore the word `generated` so marge will provide more useful comments.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32773>
2025-01-07 05:08:09 +00:00
Deborah Brouwer
6dc094decd ci: pipeline_message: ignore harmless build logs
Currently marge gets confused when parsing a build log and mistakes
innocuous lines that have the word "error" in them as actual issues.

Example:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31093#note_2705442
https://gitlab.freedesktop.org/mesa/mesa/-/pipelines/1331453

Ignore lines with the word `error` in them that are not actual issues,
so that marge can provide more useful comments.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32773>
2025-01-07 05:08:09 +00:00
Deborah Brouwer
2a477f7df2 ci: pipeline_message: ignore error_type errors
Currently marge only ignores `error_type` when the type is None.
But other error_types are equally uninteresting e.g. `error_type: Jobs`.

Example:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32677#note_2711470
https://gitlab.freedesktop.org/mesa/mesa/-/pipelines/1333563

Ignore the phrase `error_type` so marge will provide more useful comments.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32773>
2025-01-07 05:08:09 +00:00
Deborah Brouwer
6ad2abc661 ci: pipeline_message: add test to parse error logs
If marge doesn't find deqp-runner results or trace errors, she will parse
a failed job log for error messages. The parsing ignores certain phrases
in an attempt to find more relevant errors.

Add a test to check marge's error log parsing to make sure that we don't
create regressions when adding new phrases to ignore.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32773>
2025-01-07 05:08:09 +00:00
Deborah Brouwer
5707083c8c ci: update_traces_checksum: fix E501 line too long
Currently the update_traces_checksum script prints a label verification
request with a line that is 167 characters long.

Split the long line to make it more readable. Update the flake8
configuration to enforce a maximum line length of 159 characters to ensure
consistency.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32602>
2024-12-23 20:47:16 +00:00
Deborah Brouwer
7994a3b17a ci: add .flake8 linting to ci scripts and tests
Currently the ci scripts and tests don't have any linting checks. Add
.flake8 linting to start adding some consistency to the scripts. Ignore
most of the existing errors until they can be addressed on an individual
basis.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32602>
2024-12-23 20:47:16 +00:00
Deborah Brouwer
6331de400b ci: update token retrieval method for gantt charts
When the gantt chart service was first implemented, the read_token()
function would attempt to read from the default token file if the token
argument was missing.

Now it's necessary to call a separate function to look in the default
token file, so if the token argument is not provided, expressly call
get_token_from_default_dir().

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32637>
2024-12-19 16:56:30 -08:00
Deborah Brouwer
0366eebe3e ci: add pytests for the gantt chart scripts
Add some initial pytests to test new options and to prevent future
regressions.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32637>
2024-12-19 16:56:30 -08:00
Deborah Brouwer
fd7423b38e ci: add --ci-timeout option for gantt scripts
The gantt charts have a vertical line indicating the time when marge-bot
stops waiting for CI to finish. Currently the ci-timeout is hard-coded at
60 minutes. But marge-bot's timeout is configurable, so allow this value
to be configured as well.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32637>
2024-12-19 16:56:30 -08:00
Deborah Brouwer
55f452530a ci: gantt chart: include in-progress jobs
If a job is still running when the gantt chart is generated, the job's
phases won't be represented as a bar on the chart.

To show these jobs on the gantt chart, introduce a new phase "In-Progress"
to capture the current status of these jobs.  Rename the "Running" phase
as "Time spent running" to emphasize that the running phase is complete.

This provides a more complete picture of the pipeline jobs when CI times
out.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32637>
2024-12-19 16:56:30 -08:00
Deborah Brouwer
45ef1221a3 ci: post gantt: ignore pipeline_summary message
The gantt chart script currently expect the pipeline url to be the last
line of marge-bot's comment on a failed pipeline. The pipeline summary
hook now adds additional information that was preventing the gantt chart
script from finding the pipeline url.

Change the regex for finding the pipeline url to account for pipeline
summary comments.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32637>
2024-12-19 16:56:30 -08:00
Deborah Brouwer
4ae2105fcb ci: post gantt: add pipeline-id to gantt filename
Add a pipeline-id to the gantt filename so that the filename is unique.
Reduce the additional info provided in the gantt comments since the tool
is now more familiar to developers.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32637>
2024-12-19 16:56:30 -08:00
Deborah Brouwer
127a8aa9c3 ci: post gantt: add --project-id option
Currently the gantt chart script will post a comment to any project that
uses the default marge bot user id. Although the gantt chart is flexible
enough to work for any project, restrict it to mesa/mesa by default. Add
the --project-id option to add a custom project or list of projects to
analyze.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32637>
2024-12-19 16:56:30 -08:00
Deborah Brouwer
db62fa626b ci: post gantt: add --marge-user-id option
The gantt chart currently hard-codes the marge user id, but since the
script can be used for any marge-bot user, add an option to specify the
marge-bot user id. If no option is specified, the default marge-bot user
id is still used.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32637>
2024-12-19 16:56:30 -08:00
Deborah Brouwer
1404fb5481 ci: make the gantt scripts available as modules
Instead of running the gantt scripts only from the command line, make
them available as modules also. This allows the scripts to be imported for
testing.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32637>
2024-12-19 16:56:30 -08:00
Deborah Brouwer
cb74034517 ci: add some static typing to the gantt scripts
Add some static typing where possible so that tools like mypy can be used
to avoid any future code errors.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32637>
2024-12-19 16:56:30 -08:00
Deborah Brouwer
9671de71a3 ci: post gantt: use logging instead of print
Replace the print statements with logging to take advantage of the
built-in logging formatting and levels.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32637>
2024-12-19 16:56:30 -08:00