ci: add clang-tidy and ThreadSanitizer#357
Draft
abhinavagarwal07 wants to merge 1 commit into
Draft
Conversation
f0be7c1 to
e841da8
Compare
- 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
e841da8 to
bdadfd3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New
static-analysis.ymlwith 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-*) withcontinue-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 withcontinue-on-error: true. TSan logs written to workspace-locallog_pathfiles 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:
continue-on-error: truebecause it is finding real data races:get_connreads connection counters whilesftp_request_sendwritesreq_count, and debug RTT accounting inprocess_one_requestraces across processing threads. Promote to required once races are fixed.continue-on-error: truebecause 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.