Skip to content
Success

Changes

Summary

  1. jobs/gerrit-lint: run in docker (details)
  2. lint/lint_diff: make use of shell functions (details)
  3. lint/lint_diff: run clang-format if config was found (details)
  4. lint/lint_diff: allow skipping with OSMO_LINT=0 (details)
  5. obs: gerrit_binpkgs: set --allow-unknown-package (details)
  6. jobs/ttcn3-testsuites: run remsim with testenv (details)
  7. *.py: fix imported but unused (details)
  8. *.py: fix variable assigned to but never used (details)
  9. *.py: ignore: E722 Do not use bare `except` (details)
  10. OBS: fix f-string without any placeholders (details)
  11. scripts/verify_log_statements: fix undefined name (details)
  12. lint: run 'ruff' on various repositories (details)
  13. jobs/osmocom-build-tags…: set seccomp profile (details)
  14. repo-install-test: ignore bladerf packages (details)
  15. jobs/ttcn3-testsuites: run sccp with testenv (details)
Commit b16268a99b2195d672f9ac29578ab847f867b04c by Oliver Smith
jobs/gerrit-lint: run in docker

Run the linting scripts in docker, so we can make use of additional
programs like clang-format without installing them on the jenkins node
directly.

Change-Id: I17d2e538f1f9fb69f298ac223bc293570db90a83
The file was modifiedlint/lint_diff.sh
The file was modifiedcontrib/known_hosts
The file was modifiedjobs/gerrit-lint.yml
Commit a42c6a56e031ff92512494cb7906655e98a9ab52 by Oliver Smith
lint/lint_diff: make use of shell functions

Prepare to add more logic to this file by first moving existing code
blocks into functions.

Change-Id: If884f51f20e794397ee0fecff0cf1f958957da05
The file was modifiedlint/lint_diff.sh
Commit 31db96c312b953afc26ae4b16b266e367a0fdcef by Oliver Smith
lint/lint_diff: run clang-format if config was found

The osmo-asf4-dfu and osmo-ccid-firmware now have clang-format configs.
Adjust the lint script to run clang-format if such a config is found in
the repository for which the lint script is running.

Change-Id: Ie210966ebfbada43dd8507b9b48218df4925820d
The file was modifiedlint/lint_diff.sh
Commit 3dffb34587dc0bba9ce46c7ef0d7e07c8167a8d4 by Oliver Smith
lint/lint_diff: allow skipping with OSMO_LINT=0

When this script is set as pre-commit hook, it can be useful to skip the
linter with this env var to make a commit that intentionally does not
pass the linter (e.g. to test if it will be caught in gerrit + jenkins).

There is also "git commit --no-verify", but with that the hook that
applies the Change-Id does not run.

Change-Id: Ia4563c13d9916a879a1e8afeacad8c541662adaa
The file was modifiedlint/lint_diff.sh
Commit 9a18ebaa78fc255a0aea42186a2743829d69162e by Oliver Smith
obs: gerrit_binpkgs: set --allow-unknown-package

The gerrit_binpkgs.sh script can be used to quickly test building of
debian packages in a container even for packages that we don't have
in the OBS osmocom repositories. For example I'm currently using it to
test-build kamailio packages. Use the --allow-unknown-package argument
so build_srcpkg.py doesn't complain if this gets called with a package
that isn't a known Osmocom package.

Change-Id: I79e89c0d7a73f8b2262fd10a0f7a118aa8351635
The file was modifiedscripts/obs/gerrit_binpkgs.sh
Commit 7d7df727072c4ce8e6983b3888a3a766994efa9b by Oliver Smith
jobs/ttcn3-testsuites: run remsim with testenv

Related: OS#6494
Change-Id: Ibaa638408c130335e5d14590111e641493cdc194
The file was modifiedjobs/ttcn3-testsuites-testenv.yml
The file was modifiedjobs/ttcn3-testsuites.yml
Commit 8dfedc315945fdf273af4a7362a3bbd2d473292a by Oliver Smith
*.py: fix imported but unused

Prepare to run "ruff check" on this repository by first fixing what it
complains about in this and following patches.

Change-Id: I89fa4a50a28f6ceab48cce939ca0c076967d43fd
The file was modifiedlint/checkpatch/checkpatch_json.py
The file was modifiedscripts/obs/lib/srcpkg.py
The file was modifiedscripts/obs/sync_obs_projects.py
The file was modifiedscripts/obs/lib/osc.py
The file was modifiedscripts/osmo-depcheck/buildstack.py
Commit e224a518c2b20a3130eac768012c90584c0efb46 by Oliver Smith
*.py: fix variable assigned to but never used

Change-Id: I6aca8f9aab10e7ee395980b53316a720ab2e2469
The file was modifiedscripts/obs/lib/debian.py
The file was modifiedscripts/obs/lib/metapkg.py
The file was modifiedscripts/verify_log_statements.py
Commit e28454ea4b120a7ab96e133589a7b7b3ee8c0846 by Oliver Smith
*.py: ignore: E722 Do not use bare `except`

Let the ruff linter not complain about the existing cases of "Do not use
bare `except`" so we get the linter to pass without changing the
existing logic here. With this we don't disable the check globally, so
we can consider making stricter excepts in new code.

Change-Id: Iaef20d47cd171aab23e516e7f7516caf98264249
The file was modifiedscripts/obs/lib/srcpkg.py
The file was modifiedscripts/verify_log_statements.py
Commit 9f2eea23f83a6bf2343e10e631e2b025c1237d22 by Oliver Smith
OBS: fix f-string without any placeholders

Change-Id: I9b7b11a41930a99819a3569f817a0da5586e30a3
The file was modifiedscripts/obs/sync_obs_projects.py
Commit c8ec5d58507718165b863c36b51e29e9afd1a4a1 by Oliver Smith
scripts/verify_log_statements: fix undefined name

Append it to "errors_found" instead of undefined variable "ignored".
This makes it work similarly to further above:

      # Skip 'LOG("bla" fmt )' strings that typically appear as #defines.
      if fmt_re.match(quoted):
        if debug:
          errors_found.append(error_found(f, log.start(), 'Skipping define', log.group(0)))
        continue

Fix the following bug:

  scripts/verify_log_statements.py:92:11: F821 Undefined name `ignored`
     |
  90 |         # hopefully eval broke because of some '## args' macro def
  91 |         if debug:
  92 |           ignored.append(error_found(f, log.start(), 'Ignoring', log.group(0)))
     |           ^^^^^^^ F821
  93 |         continue
     |

Change-Id: I4661d4677a1f0fc8d595985e73e2632b9a83b7d6
The file was modifiedscripts/verify_log_statements.py
Commit 35336da8665e2294fa8e153afc1f4bcd405b055a by Oliver Smith
lint: run 'ruff' on various repositories

Lint the python code with "ruff check" and "ruff format" where they are
known to pass.

Related: https://docs.astral.sh/ruff/
Change-Id: I5c2ede1a7b2a204ca3deb24c55008c7585c289a0
The file was modifiedlint/lint_diff.sh
Commit b97a04f431503a5aa0a0f07a68910153c13721be by Oliver Smith
jobs/osmocom-build-tags…: set seccomp profile

Set the seccomp profile to make io_uring work in docker, so the
regression test in libosmocore using io_uring does not fail. This
happened to work previously on the build4 jenkins node because of an
older docker version.

Related: OS#6718#note-2
Change-Id: I9636ce30a0515b773be0581a8018bf1f62c1341c
The file was modifiedjobs/osmocom-build-tags-against-master.yml
Commit fa551a580aa5932c7e28f8d24da05b2de38aa580 by Oliver Smith
repo-install-test: ignore bladerf packages

Fix for this error with debian 10:

  Setting up bladerf-fpga-hostedxa9 (0.2019.07) ...
  Either your FPGA bitstream is missing, or it is out-of-date.
  Downloading FPGA bitstream from https://www.nuand.com/fpga/v0.11.0/hostedxA9.rbf...
  --2025-04-07 02:41:35--  https://www.nuand.com/fpga/v0.11.0/hostedxA9.rbf
  Resolving www.nuand.com (www.nuand.com)... 172.67.69.95, 104.26.13.238, 104.26.12.238, ...
  Connecting to www.nuand.com (www.nuand.com)|172.67.69.95|:443... connected.
  HTTP request sent, awaiting response... 403 Forbidden
  2025-04-07 02:41:36 ERROR 403: Forbidden.

Change-Id: I9e40c83f44cbbcc500967a89bb9fbafe17849eae
The file was modifiedscripts/repo-install-test/run-inside.sh
Commit 298ff539f73f0fd8327e7f8b24bd493630e4953d by Oliver Smith
jobs/ttcn3-testsuites: run sccp with testenv

Related: OS#6494
Change-Id: I70a2289820c3ef50aeb3499d36245121387c0475
The file was modifiedjobs/ttcn3-testsuites-testenv.yml
The file was modifiedjobs/ttcn3-testsuites.yml