Skip to content

Support for Patchwork CI

Andrea Cervesato ltp 8 versions – In review

Get series with b4
b4 am [email protected] change-id 20250410-patchwork_ci-7dc4ae02c40d

Versions newest first

  1. v8 Latest4 patches 1 replyIn review
  2. v74 patches 10 repliesSuperseded
  3. v64 patches 9 repliesSuperseded
Earlier versions · 5
VersionPostedPatchesRepliesStatus
v53 of 4 patches13 repliesSuperseded inferred link
v43 of 4 patches0 repliesSuperseded
v33 of 4 patches0 repliesSuperseded
v23 of 4 patches0 repliesSuperseded
v13 of 4 patches4 repliesSuperseded

Changes in v8 from the cover letter

- patchwork.sh: avoid masking curl stdout with local
- Link to v7: https://lore.kernel.org/r/[email protected]

Patches in v8 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4ci: install dependences for patchwork-ci scriptci/alpine-runtime.sh ci/alpine.sh ci/debian.i386.sh +3 more+12 -00 replies
2/4ci: add patchwork communication scriptci/tools/patchwork.sh+179 -00 replies
3/4ci: add ci-patchwork-trigger workflow.github/workflows/ci-patchwork-trigger.yml+65 -00 replies
4/4ci: apply patchwork series in ci-docker-build workflow.github/workflows/ci-docker-build.yml+38 -10 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchPetr VorelCyril Hrubis
1/4R-b R-b
2/4R-b R-b
3/4R-b A-b
4/4R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v8 thread

Cover letter [LTP] [PATCH v8 0/4] Support for Patchwork CI

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.

---
Changes in v8:
- patchwork.sh: avoid masking curl stdout with local
- Link to v7: https://lore.kernel.org/r/[email protected]

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/[email protected]

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/[email protected]

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/[email protected]

Changes in v3:
- secrets are not supported by if: statement, so we remove it
- Link to v2: https://lore.kernel.org/r/[email protected]

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/[email protected]

---
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                      | 179 +++++++++++++++++++++++++++++
 ci/tumbleweed.sh                           |   2 +
 9 files changed, 294 insertions(+), 1 deletion(-)

---
base-commit: 40c559787d15b2167ba657b3ba431e3299969d98
change-id: 20250410-patchwork_ci-7dc4ae02c40d

Best regards,

Signature · 5 lines
Andrea Cervesato <[email protected]>


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp