[LTP] [PATCH v7 0/4] Support for Patchwork CI

Andrea Cervesato andrea.cervesato@suse.com
Tue Apr 15 18:53:49 CEST 2025


Hi,

I temporarily disabled the schedule on my personal master branch, since 
this patch-set is going to be merged soon. FYI:

- we need a patchwork user to test new ML patches, so we can use its token
- we need to setup this token into the LTP settings, so we are able to 
communicate with patchwork

Kind regards,
Andrea Cervesato

On 4/15/25 18:39, Andrea Cervesato wrote:
> Add support for patch-series validation in the patchwork ML.
> We use Github to schedule a trigger every 30 minutes, checking for new
> patche-series in parchwork which has not been tested yet.
>
> The way we decide if a patch-series has been tested in patchwork, is
> by looking at its status (in particular, if it's "Needs Review / ACK"),
> as well as checking if test report has been uploaded to any of the
> series patches.
>
> All communication to Patchwrok is done via REST API, using curl and js
> tools.
>
> First, we create a script called patchwork-ci.sh that provides all the
> commands to read new untested patch-series, set their status and testing
> report. Then, we create a scheduled workflow in Gitlab, checking every
> 30 minutes if there are new untested patch-series. At the end, we
> trigger the main build workflow, used to validate LTP commits in our
> Github mainline. All the times we trigger the build workflow, we also
> provide the patch-series ID, that will be fetched and applied on the
> current branch before running the tests.
>
> Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
> ---
> Changes in v7:
> - patchwork.sh: fix bashism ==
> - patchwork.sh: fix return code check for curl
> - patchwork.sh: remove IFS= from loops
> - patchwork.sh: local cmd in command_exists
> - fix message for trigger scripts commit
> - Link to v6: https://lore.kernel.org/r/20250415-patchwork_ci-v6-0-81e6d4184af5@suse.com
>
> Changes in v6:
> - patchwork.sh: use more "[ $stuff ] || do_something" syntax
> - patchwork.sh: remove set -ex
> - patchwork.sh: variables default setup
> - patchwork.sh: move file creation in tmp folder
> - patchwork.sh: check multiple commands exist in once
> - trigger workflow now triggers only on linux-test-project/ltp repo
> - Link to v5: https://patchwork.ozlabs.org/project/ltp/list/?series=452320
>
> Changes in v5:
> - patchwork is now a utility that can be used separately
> - Link to v4: https://lore.kernel.org/r/20250411-patchwork_ci-v4-0-7f3c5ba298a1@suse.com
>
> Changes in v4:
> - make use of secrets to apply patches in order to set state to
>    needs-review-ack
> - check for curl failures and eventually exit 1
> - use a different format for stored file in 'patchwork-ci.sh verify'
>    command
> - define PATCHWORK_CI_FILE
> - some symbols like . are not supported by patchwork checks, so slurmify
>    the string before sending checks context
> - Link to v3: https://lore.kernel.org/r/20250411-patchwork_ci-v3-0-c9bb90c6961b@suse.com
>
> Changes in v3:
> - secrets are not supported by if: statement, so we remove it
> - Link to v2: https://lore.kernel.org/r/20250410-patchwork_ci-v2-0-288f4be835ff@suse.com
>
> Changes in v2:
> - check for secrets.PATCHWORK_TOKEN before sending tests results
> - v2 to re-trigger lore after missing 3/4 patch
> - Link to v1: https://lore.kernel.org/r/20250410-patchwork_ci-v1-0-def85825f46a@suse.com
>
> ---
> Andrea Cervesato (4):
>        ci: install dependences for patchwork-ci script
>        ci: add patchwork communication script
>        ci: add ci-patchwork-trigger workflow
>        ci: apply patchwork series in ci-docker-build workflow
>
>   .github/workflows/ci-docker-build.yml      |  39 ++++++-
>   .github/workflows/ci-patchwork-trigger.yml |  65 +++++++++++
>   ci/alpine-runtime.sh                       |   2 +
>   ci/alpine.sh                               |   2 +
>   ci/debian.i386.sh                          |   2 +
>   ci/debian.sh                               |   2 +
>   ci/fedora.sh                               |   2 +
>   ci/tools/patchwork.sh                      | 173 +++++++++++++++++++++++++++++
>   ci/tumbleweed.sh                           |   2 +
>   9 files changed, 288 insertions(+), 1 deletion(-)
> ---
> base-commit: 40c559787d15b2167ba657b3ba431e3299969d98
> change-id: 20250410-patchwork_ci-7dc4ae02c40d
>
> Best regards,


More information about the ltp mailing list