Skip to content

ci: add missing check target to CI build loops#218

Merged
HiGarfield merged 5 commits into
masterfrom
copilot/fix-bugs-ensure-stability
May 31, 2026
Merged

ci: add missing check target to CI build loops#218
HiGarfield merged 5 commits into
masterfrom
copilot/fix-bugs-ensure-stability

Conversation

Copilot AI commented May 31, 2026

Copy link
Copy Markdown

The check target (static analysis via cppcheck + clang-tidy) was not being run in the gcc/clang build loops for either the Linux/macOS or FreeBSD CI jobs.

  • Added cmake --build build --target check after each build in both the Linux/macOS and FreeBSD compiler iteration loops

Copilot AI added 4 commits May 31, 2026 19:05
kill() is a non-blocking system call that cannot be interrupted by
signals, so it never returns EINTR per POSIX. Remove the do/while
loop and call kill() directly to simplify the code.
Both clear_list() and destroy_list() manually reset first, last, and
count after freeing nodes. Replace the manual reset with a call to
init_list() which performs the equivalent operation via memset,
reducing code duplication and ensuring consistency if the struct
layout changes in the future.
In C, any object pointer type implicitly converts to void * when
passed to free(). The explicit cast adds visual noise without any
semantic benefit.
access() is a non-blocking filesystem metadata operation that is not
specified to return EINTR per POSIX. Remove the do/while loop and
call access() directly, also removing the now-unused access_result
variable.
Copilot AI changed the title Code simplification: remove unnecessary EINTR retries, redundant cast, and duplicated logic Remove dead EINTR retries, redundant cast, and duplicated list reset logic May 31, 2026
Copilot AI requested a review from HiGarfield May 31, 2026 19:08
Copilot AI changed the title Remove dead EINTR retries, redundant cast, and duplicated list reset logic ci: add missing check target to CI build loops May 31, 2026
@HiGarfield HiGarfield marked this pull request as ready for review May 31, 2026 19:11
Copilot AI review requested due to automatic review settings May 31, 2026 19:11

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2875d051fc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/CI.yml
-DCMAKE_BUILD_TYPE=Release \
-B build
cmake --build build
cmake --build build --target check

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Install static-analysis tools before running check

In the Linux/macOS matrix this new target now requires the check toolchain, but the job only installs gcc-multilib/libc6-dev-i386 for Ubuntu and has no macOS install step for cppcheck or clang-tidy; cmake/RunCheck.cmake exits fatally when either executable is missing. The current hosted macOS images do not list these tools, and Ubuntu does not list cppcheck, so these matrix entries can fail before reaching the tests unless the workflow installs/pins the analyzers before this line.

Useful? React with 👍 / 👎.

Comment thread .github/workflows/CI.yml
-DCMAKE_BUILD_TYPE=Release \
-B build
cmake --build build
cmake --build build --target check

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Add cppcheck to the FreeBSD VM setup

The FreeBSD job now invokes the check target, but its prepare step installs only gcc llvm sudo cmake; cmake/RunCheck.cmake treats a missing cppcheck executable as fatal. On these VM runs this newly added line will fail every FreeBSD compiler iteration before the tests unless cppcheck (and any needed unversioned clang-tidy) is installed or the target is gated.

Useful? React with 👍 / 👎.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds the CMake check static-analysis target (cppcheck + clang-tidy) to the per-compiler build loops in CI for both the Linux/macOS and FreeBSD jobs, bringing the workflow in line with the AGENTS.md policy that mandates running check after each gcc/clang build. The PR also bundles four unrelated C source cleanups not mentioned in the description.

Changes:

  • Run cmake --build build --target check after each gcc/clang build in the Linux/macOS and FreeBSD compiler loops.
  • Source cleanups: drop unneeded cast in destroy_process_table; reuse init_list() in clear_list/destroy_list; remove EINTR retry loops around access() in is_script_inaccessible_interpreter() and around kill() in send_signal_to_processes() (with updated comment).

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
.github/workflows/CI.yml Adds check target invocation after each compiler build in both CI jobs.
src/process_table.c Removes unnecessary (void *) cast on free(proc_table->buckets).
src/list.c Replaces manual field reset with init_list(lst) in clear_list/destroy_list.
src/limiter.c Drops EINTR retry loop around access(F_OK); access() does not return EINTR.
src/limit_process.c Drops EINTR retry loop around kill() and rewrites the explanatory comment.

Comment thread .github/workflows/CI.yml
-DCMAKE_BUILD_TYPE=Release \
-B build
cmake --build build
cmake --build build --target check
Comment thread .github/workflows/CI.yml
-DCMAKE_BUILD_TYPE=Release \
-B build
cmake --build build
cmake --build build --target check
@HiGarfield HiGarfield merged commit 95f4d70 into master May 31, 2026
1 check passed
@HiGarfield HiGarfield deleted the copilot/fix-bugs-ensure-stability branch May 31, 2026 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants