Skip to content

ci: add clang-tidy and ThreadSanitizer#357

Draft
abhinavagarwal07 wants to merge 1 commit into
libfuse:masterfrom
abhinavagarwal07:ci-clang-tidy-tsan
Draft

ci: add clang-tidy and ThreadSanitizer#357
abhinavagarwal07 wants to merge 1 commit into
libfuse:masterfrom
abhinavagarwal07:ci-clang-tidy-tsan

Conversation

@abhinavagarwal07
Copy link
Copy Markdown
Collaborator

@abhinavagarwal07 abhinavagarwal07 commented May 19, 2026

New static-analysis.yml with three jobs, all running on every push/PR:

clang-tidy — runs a narrow security-focused check profile (bugprone-unsafe-functions, bugprone-signal-handler, cert-env33-c, cert-err33-c, cert-str34-c).

clang-tidy-extended — runs a broader check set (bugprone-*, cert-*, clang-analyzer-*, performance-*, portability-*) with continue-on-error: true. Provides additional signal without blocking PRs while the broader baseline is being established.

ThreadSanitizer — built with clang -Db_sanitize=thread, runs the full pytest suite with continue-on-error: true. TSan logs written to workspace-local log_path files and uploaded as artifacts.

All actions SHA-pinned to Node 24-capable versions, runner pinned to ubuntu-24.04, hard-fail FUSE preflight on TSan.

Suppressed failures:

  • TSan continue-on-error: true because it is finding real data races: get_conn reads connection counters while sftp_request_send writes req_count, and debug RTT accounting in process_one_request races across processing threads. Promote to required once races are fixed.
  • clang-tidy-extended continue-on-error: true because the broader check set hasn't been baselined yet. Promote to required once clean.

The narrow clang-tidy profile is intentional — starting with a small, clean set avoids introducing warnings that block all PRs. TSan is the only practical way to detect data races in sshfs's multithreaded SFTP handling; the races it found are real bugs. Both should be promoted to required checks as the codebase is cleaned up.

A weekly schedule trigger also runs all three jobs on master even without pushes, catching regressions from runner image updates or dependency changes.

- New static-analysis.yml with clang-tidy, clang-tidy-extended, and ThreadSanitizer jobs
- clang-tidy runs narrow security-focused checks on every push/PR
- clang-tidy-extended runs broader checks (bugprone-*, cert-*, clang-analyzer-*, performance-*, portability-*) with continue-on-error: true
- TSan runs full pytest suite with continue-on-error: true — currently finding real data races in get_conn/sftp_request_send and process_one_request
- TSan logs written to workspace-local log_path files and uploaded as artifacts
- Hard-fail FUSE preflight, all actions pinned to Node 24-capable SHAs, runner pinned to ubuntu-24.04
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.

1 participant