diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6cd5d7f..234dcb0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,8 +2,9 @@ name: CI on: push: - branches: ["master","main"] + branches: ["master", "main"] pull_request: + workflow_dispatch: jobs: test: @@ -13,12 +14,10 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: "3.12" + - uses: astral-sh/setup-uv@v10.1.0 - - name: Install Meson and Ninja - run: python -m pip install --upgrade meson ninja + - name: Install meson and ninja + run: uv tool install meson && uv tool install ninja - name: Configure (debug + tests) run: meson setup build --buildtype=debug -Dbuild_tests=true -Db_sanitize=address,undefined @@ -36,12 +35,10 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: "3.12" + - uses: astral-sh/setup-uv@v10.1.0 - - name: Install Meson and Ninja - run: python -m pip install --upgrade meson ninja + - name: Install meson and ninja + run: uv tool install meson && uv tool install ninja # TSAN and ASAN are mutually exclusive, so this is a dedicated job with # only the thread sanitizer. It exercises the concurrent torn-read test @@ -63,12 +60,10 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: "3.12" + - uses: astral-sh/setup-uv@v10.1.0 - - name: Install Meson, Ninja, and gcovr - run: python -m pip install --upgrade meson ninja gcovr + - name: Install meson, ninja and gcovr + run: uv tool install meson && uv tool install ninja && uv tool install gcovr # -fprofile-update=atomic makes gcov's counter increments atomic. The # concurrent tests exercise the same instrumented lines from multiple @@ -101,15 +96,139 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: "3.12" + - uses: astral-sh/setup-uv@v10.1.0 - - name: Install Meson and Ninja - run: python -m pip install --upgrade meson ninja + - name: Install meson and ninja + run: uv tool install meson && uv tool install ninja - name: Configure (release) run: meson setup build --buildtype=release -Dbuild_tests=false - name: Build run: meson compile -C build + + # --------------------------------------------------------------------------- + # Cross-compile the library with TI's C2000 code generation tools, a target + # with CHAR_BIT == 16 and a 16-bit int, under both object ABIs. The compiler + # defines __STDC_NO_ATOMICS__ and not __GNUC__, so this builds the + # uniprocessor backend. The installer is checksum-pinned and the toolchain + # is cached. + # --------------------------------------------------------------------------- + c2000: + name: "TI C2000 (CGT ${{ matrix.cgt }})" + runs-on: ubuntu-latest + needs: test + strategy: + fail-fast: false + matrix: + include: + - cgt: "22.6.2" + sha256: "9773f338df7b7314bc459be2cd9d9bf329786da8de6531f8f2d3d38c1e9f5750" + - cgt: "25.11.1" + sha256: "2f3a978e24a53279c9796ad374c32b530fc58fd085fd71288597846fe169c821" + + steps: + - uses: actions/checkout@v4 + + - uses: astral-sh/setup-uv@v10.1.0 + + - name: Install meson and ninja + run: uv tool install meson && uv tool install ninja + + - name: Cache TI C2000 CGT + id: cache-cgt + uses: actions/cache@v4 + with: + path: ~/ti + key: ti-cgt-c2000-${{ matrix.cgt }} + + - name: Install TI C2000 CGT + if: steps.cache-cgt.outputs.cache-hit != 'true' + run: | + bin="ti_cgt_c2000_${{ matrix.cgt }}.LTS_linux-x64_installer.bin" + curl -sSfL --retry 3 -o "$RUNNER_TEMP/$bin" \ + "https://dr-download.ti.com/software-development/ide-configuration-compiler-or-debugger/MD-xqxJ05PLfM/${{ matrix.cgt }}.LTS/$bin" + echo "${{ matrix.sha256 }} $RUNNER_TEMP/$bin" | sha256sum -c - + chmod +x "$RUNNER_TEMP/$bin" + "$RUNNER_TEMP/$bin" --mode unattended --prefix "$HOME/ti" + + - name: Configure and build (COFF and EABI) + run: | + CGT="$HOME/ti/ti-cgt-c2000_${{ matrix.cgt }}.LTS" + for abi in coffabi eabi; do + cat > "c2000-$abi.ini" <> "$GITHUB_PATH" + cppcheck --version + + - name: Install meson, ninja and misch + run: uv tool install meson && uv tool install ninja && uv tool install misch + + - name: Configure (compile database) + run: meson setup build --buildtype=debug -Dbuild_tests=true + + - name: Analyse (__atomic backend) + run: misch run --baseline -v + + - name: Analyse (C11 backend) + run: misch run --baseline --profile c11 -v + + - name: Analyse (uniprocessor backend) + run: misch run --baseline --profile no_atomics -v + + - name: Deviation record + run: misch deviations diff --git a/CHANGELOG.md b/CHANGELOG.md index d9333b1..2b54f68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,8 +6,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ## [Unreleased] +### Added + +- `scripts/format.sh`, which pins the clang-format release and runs it with `uvx`. CI checks formatting through it. +- CI runs the MISRA C:2023 analysis with `misch` for each atomic backend, fails on any finding outside that backend's recorded baseline, and prints the deviation record. +- CI compiles the library with warnings as errors using two releases of a vendor C11 compiler for a 16-bit-MAU DSP target, under both of its object formats. That compiler selects the uniprocessor backend. + ### Changed +- The build produces and installs only the static library. The shared library, which neither `seqlock_dep` nor `seqlock.pc` linked, is no longer built. +- CI installs Meson, Ninja and gcovr with `uv` instead of `pip`. - CI gates on 100% branch coverage as well as line coverage. The reader retry branches are reached deterministically by a single-threaded test, and the no-atomics backend is built and tested alongside the C11 backend. - Added security policy, SPDX headers, and cleaned ignore rules while leaving the existing special coverage/concurrency handling unchanged. diff --git a/analysis/README.md b/analysis/README.md new file mode 100644 index 0000000..7de51f9 --- /dev/null +++ b/analysis/README.md @@ -0,0 +1,17 @@ +# MISRA analysis assets + +This directory was created by `misch init --scaffold`. Its configured paths are resolved relative to the project-root `misra.toml`. + +- `rules/` explains how to supply licensed MISRA rule headlines. +- `deviations/` contains reviewed project-level cppcheck suppressions. +- `baseline/` is the configured destination for accepted finding counts. + +## Recommended workflow + +1. Review `misra.toml`, especially the scope, exclusions, and compilation-database source. +2. Supply rule texts as described in `rules/README.md` when headlines and categories are needed. +3. Run `misch run`, then fix findings or document justified deviations. +4. Run `misch baseline` only after explicitly accepting the current finding counts. +5. Commit reviewed project deviations and the generated baseline so CI can enforce them. + +Do not commit MISRA guideline text unless its licence and the repository's access controls permit that distribution. diff --git a/analysis/baseline/README.md b/analysis/baseline/README.md new file mode 100644 index 0000000..027fd6d --- /dev/null +++ b/analysis/baseline/README.md @@ -0,0 +1,9 @@ +# MISRA baseline + +Each atomic backend has its own baseline, because the findings differ between them: + +- `misra-baseline.json` — the GCC/Clang `__atomic` backend (base configuration). +- `misra-baseline.c11.json` — the C11 `` backend (`--profile c11`). +- `misra-baseline.no_atomics.json` — the uniprocessor `volatile` backend (`--profile no_atomics`). + +CI runs `misch run --baseline` for each, and fails on any finding not recorded in that backend's baseline. Regenerate a baseline only after a deliberate review, with `misch baseline` and the same `--profile`; do not edit it by hand. diff --git a/analysis/baseline/misra-baseline.c11.json b/analysis/baseline/misra-baseline.c11.json new file mode 100644 index 0000000..4116397 --- /dev/null +++ b/analysis/baseline/misra-baseline.c11.json @@ -0,0 +1,53 @@ +{ + "schema": "misch/baseline@2", + "fingerprints": { + "2553c4e512ab": { + "rule_id": "misra-c2012-8.7", + "file": "src/seqlock.c", + "message": "misra violation (use --rule-texts= to get proper output)", + "count": 4 + }, + "370d2dc0f26b": { + "rule_id": "misra-c2012-20.10", + "file": "include/seqlock.h", + "message": "misra violation (use --rule-texts= to get proper output)", + "count": 1 + }, + "60d7de2693da": { + "rule_id": "misra-c2012-2.5", + "file": "include/seqlock_conf.h", + "message": "misra violation (use --rule-texts= to get proper output)", + "count": 3 + }, + "63ee1dea83af": { + "rule_id": "misra-c2012-10.4", + "file": "include/seqlock.h", + "message": "misra violation (use --rule-texts= to get proper output)", + "count": 1 + }, + "6432a4e45231": { + "rule_id": "misra-c2012-15.5", + "file": "src/seqlock.c", + "message": "misra violation (use --rule-texts= to get proper output)", + "count": 6 + }, + "a3f09014320e": { + "rule_id": "misra-c2012-12.1", + "file": "include/seqlock.h", + "message": "misra violation (use --rule-texts= to get proper output)", + "count": 6 + }, + "c0c606393b08": { + "rule_id": "misra-c2012-12.1", + "file": "src/seqlock.c", + "message": "misra violation (use --rule-texts= to get proper output)", + "count": 12 + }, + "e4c3053cf18a": { + "rule_id": "misra-c2012-2.5", + "file": "include/seqlock.h", + "message": "misra violation (use --rule-texts= to get proper output)", + "count": 3 + } + } +} diff --git a/analysis/baseline/misra-baseline.json b/analysis/baseline/misra-baseline.json new file mode 100644 index 0000000..e2d5e70 --- /dev/null +++ b/analysis/baseline/misra-baseline.json @@ -0,0 +1,59 @@ +{ + "schema": "misch/baseline@2", + "fingerprints": { + "055c7abe9a38": { + "rule_id": "misra-c2012-17.3", + "file": "include/seqlock.h", + "message": "misra violation (use --rule-texts= to get proper output)", + "count": 1 + }, + "2553c4e512ab": { + "rule_id": "misra-c2012-8.7", + "file": "src/seqlock.c", + "message": "misra violation (use --rule-texts= to get proper output)", + "count": 4 + }, + "370d2dc0f26b": { + "rule_id": "misra-c2012-20.10", + "file": "include/seqlock.h", + "message": "misra violation (use --rule-texts= to get proper output)", + "count": 1 + }, + "60d7de2693da": { + "rule_id": "misra-c2012-2.5", + "file": "include/seqlock_conf.h", + "message": "misra violation (use --rule-texts= to get proper output)", + "count": 3 + }, + "6432a4e45231": { + "rule_id": "misra-c2012-15.5", + "file": "src/seqlock.c", + "message": "misra violation (use --rule-texts= to get proper output)", + "count": 6 + }, + "a3f09014320e": { + "rule_id": "misra-c2012-12.1", + "file": "include/seqlock.h", + "message": "misra violation (use --rule-texts= to get proper output)", + "count": 1 + }, + "c0c606393b08": { + "rule_id": "misra-c2012-12.1", + "file": "src/seqlock.c", + "message": "misra violation (use --rule-texts= to get proper output)", + "count": 12 + }, + "d63ad8bce9c3": { + "rule_id": "misra-c2012-17.3", + "file": "src/seqlock.c", + "message": "misra violation (use --rule-texts= to get proper output)", + "count": 11 + }, + "e4c3053cf18a": { + "rule_id": "misra-c2012-2.5", + "file": "include/seqlock.h", + "message": "misra violation (use --rule-texts= to get proper output)", + "count": 3 + } + } +} diff --git a/analysis/baseline/misra-baseline.no_atomics.json b/analysis/baseline/misra-baseline.no_atomics.json new file mode 100644 index 0000000..a38474c --- /dev/null +++ b/analysis/baseline/misra-baseline.no_atomics.json @@ -0,0 +1,59 @@ +{ + "schema": "misch/baseline@2", + "fingerprints": { + "2553c4e512ab": { + "rule_id": "misra-c2012-8.7", + "file": "src/seqlock.c", + "message": "misra violation (use --rule-texts= to get proper output)", + "count": 4 + }, + "370d2dc0f26b": { + "rule_id": "misra-c2012-20.10", + "file": "include/seqlock.h", + "message": "misra violation (use --rule-texts= to get proper output)", + "count": 1 + }, + "60d7de2693da": { + "rule_id": "misra-c2012-2.5", + "file": "include/seqlock_conf.h", + "message": "misra violation (use --rule-texts= to get proper output)", + "count": 3 + }, + "6432a4e45231": { + "rule_id": "misra-c2012-15.5", + "file": "src/seqlock.c", + "message": "misra violation (use --rule-texts= to get proper output)", + "count": 6 + }, + "7daffbd5d542": { + "rule_id": "misra-c2012-13.4", + "file": "src/seqlock.c", + "message": "misra violation (use --rule-texts= to get proper output)", + "count": 3 + }, + "a3f09014320e": { + "rule_id": "misra-c2012-12.1", + "file": "include/seqlock.h", + "message": "misra violation (use --rule-texts= to get proper output)", + "count": 1 + }, + "c0c606393b08": { + "rule_id": "misra-c2012-12.1", + "file": "src/seqlock.c", + "message": "misra violation (use --rule-texts= to get proper output)", + "count": 12 + }, + "d2a47b1788b5": { + "rule_id": "misra-c2012-12.3", + "file": "src/seqlock.c", + "message": "misra violation (use --rule-texts= to get proper output)", + "count": 2 + }, + "e4c3053cf18a": { + "rule_id": "misra-c2012-2.5", + "file": "include/seqlock.h", + "message": "misra violation (use --rule-texts= to get proper output)", + "count": 3 + } + } +} diff --git a/analysis/deviations/misra-deviations.txt b/analysis/deviations/misra-deviations.txt new file mode 100644 index 0000000..88d2990 --- /dev/null +++ b/analysis/deviations/misra-deviations.txt @@ -0,0 +1,13 @@ +# Project-level MISRA deviations (cppcheck suppressions). +# +# Prefer a justified inline cppcheck-suppress for a single source location. +# Every active entry in this file must have a preceding comment that explains +# why the deviation is necessary. Use :file or :file:line to keep its scope as +# narrow as practical. +# +# Example (leave commented until deliberately adopted): +# External code is maintained upstream and is outside the remediation boundary. +# *:*/vendor/* +# +# Audit this file and inline deviations with: +# misch deviations --check-stale diff --git a/analysis/rules/README.md b/analysis/rules/README.md new file mode 100644 index 0000000..e53d96c --- /dev/null +++ b/analysis/rules/README.md @@ -0,0 +1,7 @@ +# MISRA rule texts + +`misch` does not ship MISRA guideline text. To add headlines and categories to reports, create a cppcheck-format file from a copy you are licensed to use and set `[rules].texts` in `misra.toml` or the `MISRA_RULE_TEXTS` environment variable. The environment variable is checked first. + +The file must contain an `Appendix A Summary of guidelines` heading followed by rule or directive entries in cppcheck's expected format. See the [misch rule-text guide](https://github.com/aajll/misch/blob/master/docs/rule-texts.md) for format and CI guidance. + +Do not place licensed text in a public repository. Whether it may be stored in a private repository or secret store depends on the applicable licence and access controls. diff --git a/meson.build b/meson.build index 44d0bd7..8db8a89 100644 --- a/meson.build +++ b/meson.build @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: MIT + project( 'seqlock', 'c', @@ -35,12 +37,10 @@ generated_headers = include_directories('.') library_sources = files('src/seqlock.c') -seqlock_lib = both_libraries( +seqlock_lib = static_library( 'seqlock', library_sources, include_directories: [public_headers, generated_headers], - version: meson.project_version(), - soversion: major, install: true, ) @@ -48,7 +48,7 @@ install_headers('include/seqlock.h', 'include/seqlock_conf.h', subdir: 'seqlock' seqlock_dep = declare_dependency( include_directories: [public_headers, generated_headers], - link_with: seqlock_lib.get_static_lib(), + link_with: seqlock_lib, sources: generated_version_header, ) @@ -56,7 +56,7 @@ meson.override_dependency('seqlock', seqlock_dep) pkg = import('pkgconfig') pkg.generate( - seqlock_lib.get_static_lib(), + seqlock_lib, description: project_description, filebase: 'seqlock', name: 'seqlock', diff --git a/meson_options.txt b/meson_options.txt index 8d8f52c..c57772a 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: MIT + option( 'build_tests', type: 'boolean', diff --git a/misra.toml b/misra.toml new file mode 100644 index 0000000..b9aeab8 --- /dev/null +++ b/misra.toml @@ -0,0 +1,65 @@ +# misch configuration. See the project configuration reference: +# https://github.com/aajll/misch/blob/master/docs/configuration.md + +[project] +# Analysed source roots. Directory-style entries match everything beneath +# them; globs (e.g. "*.c") are also honoured. +scope = ["include/", "src/"] +# Explicitly excluded. Every compile-DB file must match scope OR exclude; +# an unclassified file is a hard error (no silent scope creep). +exclude = ["tests/", "subprojects/"] + +[db] +# Where compile_commands.json comes from: meson | cmake | existing. +# Plain-Make projects: generate one (e.g. `bear -- make`) and use "existing". +source = "meson" +# path = "build/compile_commands.json" # source = "existing" only + +[platform] +# A cppcheck built-in (unix64, unix32, ...) or set [platform].xml to a +# custom platform description for exotic targets. +preset = "unix64" + +[toolchain] +# Extra -D defines cppcheck should see (e.g. neutralising compiler +# keywords on a cross target: "__interrupt="). +defines = ["SEQLOCK_USE_GNU_ATOMICS=1"] + +[rules] +# Bring your own licensed rule texts; see analysis/rules/README.md. +# Precedence: $MISRA_RULE_TEXTS > this value. Absent => category: unknown. +texts = "${MISRA_RULE_TEXTS}" + +[report] +# Default output is the terminal. Add file outputs as needed, e.g.: +# outputs = ["terminal", {format = "json", path = "misra.json"}] +outputs = ["terminal"] + +[deviations] +# Project-level deviations; prefer justified inline suppressions. +suppressions = "analysis/deviations/misra-deviations.txt" + +[baseline] +# Created only when `misch baseline` explicitly accepts findings. +path = "analysis/baseline/misra-baseline.json" + +# Multi-platform profiles overlay the base config. Select one with +# `misch run --profile `. Scalars replace; lists replace by default +# or extend with the append_ prefix; the [platform] table replaces whole. +# Give each ratcheted profile its own baseline.path, since findings differ +# between platforms. cppcheck has no arm preset; target Arm with an XML. +# [profiles.aarch64] +# platform.xml = "analysis/aarch64_platform.xml" +# baseline.path = "analysis/baseline/misra-baseline.aarch64.json" +# toolchain.append_defines = ["ARCH_ARM64"] + +# One profile per remaining atomic backend. The base analysis covers the +# GCC/Clang __atomic backend; each profile forces another rung of the ladder in +# seqlock_conf.h and keeps its own baseline, since the findings differ. +[profiles.c11] +toolchain.defines = ["SEQLOCK_USE_C11_ATOMICS=1"] +baseline.path = "analysis/baseline/misra-baseline.c11.json" + +[profiles.no_atomics] +toolchain.defines = ["SEQLOCK_USE_NO_ATOMICS=1"] +baseline.path = "analysis/baseline/misra-baseline.no_atomics.json" diff --git a/scripts/format.sh b/scripts/format.sh new file mode 100755 index 0000000..010b5bf --- /dev/null +++ b/scripts/format.sh @@ -0,0 +1,59 @@ +#!/bin/sh +# SPDX-License-Identifier: MIT +# +# Checks or applies the project's C and C++ formatting with a pinned +# clang-format. uvx fetches that exact release from PyPI and caches it, so the +# result does not depend on a system or editor install. CI runs the check. +# +# Usage: scripts/format.sh check tracked and new sources +# scripts/format.sh --fix rewrite them in place + +set -eu + +# Raise this to adopt a new release, then run --fix and commit the result. +CLANG_FORMAT_VERSION=23.1.1 + +usage="usage: scripts/format.sh [--fix]" + +if [ "$#" -gt 1 ]; then + echo "$usage" >&2 + exit 2 +fi + +case "${1:-}" in + "") mode=check ;; + --fix) mode=fix ;; + -h | --help) echo "$usage"; exit 0 ;; + *) echo "$usage" >&2; exit 2 ;; +esac + +if ! command -v uvx >/dev/null 2>&1; then + echo "error: uvx not found. Install uv: https://docs.astral.sh/uv/" >&2 + exit 1 +fi + +cd "$(dirname "$0")/.." + +# Tracked sources plus new, unignored ones, so --fix also covers files that +# are not added yet. Paths deleted from the working tree are skipped. +set -- +for file in $(git ls-files --cached --others --exclude-standard \ + -- '*.c' '*.h' '*.cpp'); do + if [ -f "$file" ]; then + set -- "$@" "$file" + fi +done + +if [ "$#" -eq 0 ]; then + echo "no C or C++ sources found" + exit 0 +fi + +clang_format="clang-format@$CLANG_FORMAT_VERSION" +if [ "$mode" = fix ]; then + uvx --quiet "$clang_format" -i "$@" + echo "formatted $# files with $clang_format" +else + uvx --quiet "$clang_format" --dry-run --Werror "$@" + echo "$# files match $clang_format" +fi diff --git a/tests/meson.build b/tests/meson.build index 1781bb3..312525c 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: MIT + thread_dep = dependency('threads') # Single-threaded behavioural tests: round-trip, repeated stores, init/zero diff --git a/tests/seqlock_test.h b/tests/seqlock_test.h index e8ba177..a8ef1d5 100644 --- a/tests/seqlock_test.h +++ b/tests/seqlock_test.h @@ -1,4 +1,6 @@ /* + * SPDX-License-Identifier: MIT + * * @file seqlock_test.h * @brief Minimal assert-based test harness shared by the seqlock tests. */ diff --git a/tests/test_seqlock.c b/tests/test_seqlock.c index 636287b..f294b43 100644 --- a/tests/test_seqlock.c +++ b/tests/test_seqlock.c @@ -1,4 +1,6 @@ /* + * SPDX-License-Identifier: MIT + * * @file test_seqlock.c * @brief Single-threaded behavioural tests for the seqlock primitive. * diff --git a/tests/test_seqlock_backend.c b/tests/test_seqlock_backend.c index 4b3437c..33bfc7e 100644 --- a/tests/test_seqlock_backend.c +++ b/tests/test_seqlock_backend.c @@ -1,4 +1,6 @@ /* + * SPDX-License-Identifier: MIT + * * @file test_seqlock_backend.c * @brief Exercises a forced atomic backend. * diff --git a/tests/test_seqlock_core.c b/tests/test_seqlock_core.c index 99ef1e9..e4033d9 100644 --- a/tests/test_seqlock_core.c +++ b/tests/test_seqlock_core.c @@ -1,4 +1,6 @@ /* + * SPDX-License-Identifier: MIT + * * @file test_seqlock_core.c * @brief Direct tests of the type-erased core API (`seqlock_core_*`). * diff --git a/tests/test_seqlock_mt.c b/tests/test_seqlock_mt.c index 41830f8..86c61a8 100644 --- a/tests/test_seqlock_mt.c +++ b/tests/test_seqlock_mt.c @@ -1,4 +1,6 @@ /* + * SPDX-License-Identifier: MIT + * * @file test_seqlock_mt.c * @brief Concurrent torn-read detection + wait-free-writer liveness. * diff --git a/tests/test_seqlock_retry.c b/tests/test_seqlock_retry.c index f0d7995..cb27fba 100644 --- a/tests/test_seqlock_retry.c +++ b/tests/test_seqlock_retry.c @@ -1,4 +1,6 @@ /* + * SPDX-License-Identifier: MIT + * * @file test_seqlock_retry.c * @brief Drives every reader retry branch deterministically. * diff --git a/tests/test_seqlock_soak.c b/tests/test_seqlock_soak.c index 1ecd2bd..bb89cd4 100644 --- a/tests/test_seqlock_soak.c +++ b/tests/test_seqlock_soak.c @@ -1,4 +1,6 @@ /* + * SPDX-License-Identifier: MIT + * * @file test_seqlock_soak.c * @brief Long-running multi-reader soak. * diff --git a/tests/test_seqlock_try_load.c b/tests/test_seqlock_try_load.c index f9845fd..754e658 100644 --- a/tests/test_seqlock_try_load.c +++ b/tests/test_seqlock_try_load.c @@ -1,4 +1,6 @@ /* + * SPDX-License-Identifier: MIT + * * @file test_seqlock_try_load.c * @brief Bounded try_load() semantics. * diff --git a/tests/test_seqlock_wrap.c b/tests/test_seqlock_wrap.c index 257f715..355e068 100644 --- a/tests/test_seqlock_wrap.c +++ b/tests/test_seqlock_wrap.c @@ -1,4 +1,6 @@ /* + * SPDX-License-Identifier: MIT + * * @file test_seqlock_wrap.c * @brief Counter wrap across the counter type maximum. *