agentleFS
Google CloudKnown publisherGoogleCloudPlatform/gcsfuse-tools/npi/.agents/skills/conformance-testing/SKILL.md

conformance-testing

Skill10 starsChanged 4 months agoApache-2.0View on GitHub

Guides on cloning GCSFuse, executing Makefile npi-conformance target on target GCE VMs, coordinating GKE cluster E2E conformance testing via gke-e2e-testing, parsing test logs into conformance_results_<TARGET_NAME>.json, enforcing non-blocking permission error policies, and handling 5-minute log stall timeouts via pkill and umount cleanup.

  • Reads credentials
  • Deletes or force-pushes
  • Installs packages

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Verify environmental parameters on the target VM (e.g., GCSFUSE_TEST_BUCKET).

    line 64
  2. Very specific:

    Run the Ginkgo E2E test suite in gcs-fuse-csi-driver repository: make e2e-test.

    line 129
  3. Very specific:

    Ensure total_tests > 0 and passed + failed + skipped == total_tests.

    line 152
  4. Distinctive:

    Check target VM for leftover FUSE test mountpoints:

    line 154

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

GCSFuse Conformance and Integration Testing

This skill guides you through checking out the official GCSFuse repository, executing integration and POSIX conformance test suites on target platforms (GCE VMs using the standardized make npi-conformance target and GKE clusters using the gke-e2e-testing skill), parsing test output logs, and generating conformance_results_<TARGET_NAME>.json.

[!IMPORTANT] Mandatory Execution Policy: Conformance and integration testing is mandatory across all target platforms (both GCE VM and GKE cluster targets) and must ALWAYS be executed by default during NPI qualification. Conformance testing must NEVER be skipped unless the user explicitly requests to exclude or bypass conformance testing.

Prerequisites & Trigger Conditions

Prerequisites

  1. Go Language Environment: Go installed on target GCE VM matching GCSFuse go.mod (typically Go 1.22+).
  2. GCP Storage Credentials: Target GCE VM service account configured with permissions to read/write test GCS buckets (storage-rw scope or Storage Object Admin role).
  3. Active Master SSH Connection: Established SSH connection socket at ~/.ssh/sockets/<TARGET_NAME>.sock for GCE VM targets.
  4. Target GCS Bucket: Dedicated test bucket for integration test file operations.
  5. KUBECONFIG Isolation Policy: Standard policy enforcing mkdir -p ~/.kube && export KUBECONFIG=~/.kube/npi_kubeconfig for any cluster interactions, ensuring host default ~/.kube/config remains unmutated.

Trigger Conditions

  • Validating POSIX compatibility and functional correctness of GCSFuse on a target GCE VM or GKE cluster platform.
  • Executed during NPI qualification prior to or alongside performance benchmarking suites.
  • Triggered when testing new GCSFuse code releases or feature branches across all targets.

Input/Output Contract

Inputs

  • Target SSH Socket: Socket path ~/.ssh/sockets/<TARGET_NAME>.sock (for GCE VM targets).
  • Target Specs: VM Name, Zone, GCP Project ID, Cluster Name, SSH User.
  • Makefile Parameters: PROJECT=<PROJECT_ID>, BUCKET_LOCATION=<REGION>, READ_AHEAD_KB=<KB> (defaults to 128).
  • GCSFuse Version / Branch: Git commit tag or branch name (<GCSFUSE_VERSION_OR_BRANCH>, default: master).

Outputs

  • Remote Log: ~/integration_tests.log generated on target VM (for GCE) or Ginkgo E2E logs (for GKE).
  • Local Deliverable: conformance_results_<TARGET_NAME>.json containing:
    • ISO 8601 Timestamp, GCSFuse version, target name.
    • Summary metrics: total_tests, passed, failed, skipped.
    • Detailed list of individual test cases, pass/fail status, execution duration, and error strings.

Step-by-Step Procedure

For GCE VM Targets:

Step 1: System Package Self-Healing & Repository Clone on Target VM

Connect to the target VM using the master SSH socket, resolving SSH_USER="${SSH_USER:-$(gcloud config get-value account 2>/dev/null | tr '@.' '_')}", verify missing build packages (build-essential, make, docker.io), install if absent, and clone GCSFuse:

SSH_USER="${SSH_USER:-$(gcloud config get-value account 2>/dev/null | tr '@.' '_')}"
ssh -S ~/.ssh/sockets/<TARGET_NAME>.sock -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ~/.ssh/google_compute_engine ${SSH_USER}@nic0.<VM_NAME>.<ZONE>.c.<PROJECT_ID>.internal.gcpnode.com "bash -s" << 'EOF'
  if ! command -v make &>/dev/null || ! command -v gcc &>/dev/null || ! command -v docker &>/dev/null; then
    echo "Installing missing system build packages..."
    sudo apt-get update && sudo apt-get install -y build-essential make docker.io
  fi
  git clone https://github.com/GoogleCloudPlatform/gcsfuse.git ~/gcsfuse
  cd ~/gcsfuse
  git checkout master
EOF

Step 2: Prepare Test Bucket and Config

Verify environmental parameters on the target VM (e.g., GCSFUSE_TEST_BUCKET).

Step 3: Run Integration Tests via make npi-conformance

[!IMPORTANT] Makefile Integration: GCSFuse features a dedicated Makefile target npi-conformance that:

  1. Excludes emulator tests.
  2. Runs dual-configuration execution (Phase 1: Without Read-Ahead, Phase 2: With Read-Ahead).
  3. Resolves project and bucket parameters dynamically.
  4. Executes test packages sequentially to avoid resource contention.

Always invoke this Makefile target instead of running manual go test commands.

Execute the conformance test suite remotely using run_conformance.sh (which incorporates an automated log size watchdog loop that monitors ~/integration_tests.log for 5-minute inactivity stalls, terminates deadlocked processes, and cleans up FUSE mounts automatically):

ssh -S ~/.ssh/sockets/<TARGET_NAME>.sock -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ~/.ssh/google_compute_engine ${SSH_USER}@nic0.<VM_NAME>.<ZONE>.c.<PROJECT_ID>.internal.gcpnode.com "bash -s" << 'EOF'
  PROJECT=<PROJECT_ID> BUCKET_LOCATION=<REGION> READ_AHEAD_KB=128 GCSFUSE_VERSION=master bash ~/gcsfuse-tools/npi/run_conformance.sh
EOF

Step 4: Parse Log and Generate conformance_results_<TARGET_NAME>.json

Parse ~/integration_tests.log on target VM and export structured JSON:

Example JSON structure:

{
  "timestamp": "2026-06-14T15:29:19Z",
  "gcsfuse_version": "master",
  "target_vm": "<VM_NAME>",
  "summary": {
    "total_tests": 120,
    "passed": 118,
    "failed": 2,
    "skipped": 0
  },
  "tests": [
    {
      "name": "TestReadOperations/BasicRead",
      "status": "PASS",
      "duration_seconds": 1.45
    },
    {
      "name": "TestWriteOperations/AppendWrite",
      "status": "FAIL",
      "duration_seconds": 3.12,
      "error": "write error: connection reset by peer"
    }
  ]
}

Copy the generated JSON report to local machine:

scp -S ~/.ssh/sockets/<TARGET_NAME>.sock -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ~/.ssh/google_compute_engine ${SSH_USER}@nic0.<VM_NAME>.<ZONE>.c.<PROJECT_ID>.internal.gcpnode.com:~/conformance_results.json ./conformance_results_<TARGET_NAME>.json

For GKE Cluster Targets:

For GKE cluster targets, execute the GCSFuse CSI Driver end-to-end conformance test suite following the GKE E2E Testing skill:

  1. Enforce isolated KUBECONFIG: mkdir -p ~/.kube && export KUBECONFIG=~/.kube/npi_kubeconfig.
  2. Connect to the target GKE cluster and verify node and CSI driver readiness.
  3. Run the Ginkgo E2E test suite in gcs-fuse-csi-driver repository: make e2e-test.
  4. Parse Ginkgo test execution results and generate ./conformance_results_<TARGET_NAME>.json.

Failure Modes & Edge Cases

Failure ScenarioRoot CauseRemediation / Recovery Action
Target is GKE ClusterRunning conformance on GKE targetFollow gke-e2e-testing skill to execute CSI driver E2E tests under isolated KUBECONFIG and export structured results to conformance_results_<TARGET_NAME>.json. Do NOT skip conformance on GKE unless explicitly instructed by the user.
Missing System PackagesVM image lacks make, gcc, or dockerSelf-healing check auto-installs build-essential make docker.io prior to running tests.
5-Minute Log Stall / Process Hanggo test or GCSFuse daemon deadlocked during test executionCheck remote log ~/integration_tests.log size every 5 mins. If size is unchanged for >5 mins: <br> 1. Terminate processes: ssh ... "sudo pkill -9 -f 'go test' ; sudo pkill -9 gcsfuse ; sudo pkill -9 -f proxy_server" <br> 2. Force unmount leftover mounts: `ssh ... "sudo umount -f /tmp/gcsfuse_readwrite_test_*/mnttrue"<br> 3. Clean temp directories:ssh ... "sudo rm -rf /tmp/gcsfuse_*"` <br> 4. Record stall in JSON.
Permission Failure TestsTest asserts bucket operations restricted by service account permissionsNon-blocking policy. Do NOT abort pipeline. Parse and record test failures in conformance_results_<TARGET_NAME>.json and document in final report.
Go Version MismatchTarget GCE VM missing Go 1.22+ runtimeInstall Go 1.22+ on target VM or set PATH to system Go binary before running Makefile.

Verification Checks

  1. Verify Deliverable JSON File: Confirm local output file exists and contains valid JSON:
    jq .summary ./conformance_results_<TARGET_NAME>.json
  2. Verify Summary Counts: Ensure total_tests > 0 and passed + failed + skipped == total_tests.
  3. Verify Clean Exit / No Lingering Mounts: Check target VM for leftover FUSE test mountpoints:
    ssh -S ~/.ssh/sockets/<TARGET_NAME>.sock -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ~/.ssh/google_compute_engine ${SSH_USER}@nic0.<VM_NAME>.<ZONE>.c.<PROJECT_ID>.internal.gcpnode.com "mount | grep gcsfuse_readwrite_test || echo 'NO_LEFTOVER_MOUNTS'"

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.