Skip to content

test(negative_stat_cache): add integration tests for implicit directory negative stat cache - #4918

Open
alleaditya wants to merge 3 commits into
GoogleCloudPlatform:masterfrom
alleaditya:add_implicit_dir_cache_tests
Open

test(negative_stat_cache): add integration tests for implicit directory negative stat cache#4918
alleaditya wants to merge 3 commits into
GoogleCloudPlatform:masterfrom
alleaditya:add_implicit_dir_cache_tests

Conversation

@alleaditya

@alleaditya alleaditya commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Description

This PR adds comprehensive integration test coverage for implicit directory negative stat cache behavior across disabled, finite, and infinite negative stat cache TTL configurations in GCSFuse.

Key Updates:

  • Extended tools/integration_tests/negative_stat_cache with implicit directory negative stat cache tests.
  • Fixed file path targets under --implicit-dirs=false to test negative file stat caching directly under testDirPath.
  • Verified implicit directory listing, stat, and file open operations under various cache TTL settings.

Link to the issue in case of a bug fix.

https://b.corp.google.com/issues/539425086

Testing details

  1. Manual - Executed go vet ./tools/integration_tests/negative_stat_cache/... and gofmt -s -w tools/integration_tests/negative_stat_cache/ to ensure clean code formatting and linting.
  2. Unit tests - N/A
  3. Integration tests - Executed full implicit_dir and negative_stat_cache integration test packages against GCS bucket gs://gcsfuse-e2e-m2-worker1-1784797719:
    • implicit_dir package: PASS (48/48 tests passed, 373.990s execution time)
    • negative_stat_cache package: PASS (all tests passed across disabled, finite, and infinite cache configs, 355.666s execution time)

Any backward incompatible change? If so, please explain.

N/A

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces integration tests for negative stat cache behaviors (disabled, finite, and infinite) under various scenarios, including implicit directories, flat buckets with implicit directories disabled, and HNS folders. It also updates test_config.yaml to include test runs with the --implicit-dirs flag. The feedback recommends replacing assert.NoError with require.NoError before dereferencing returned pointers to avoid nil pointer dereference panics if a call fails. Additionally, it suggests refining the isImplicitDirsEnabled helper to correctly handle cases where --implicit-dirs=false is passed.

Comment thread tools/integration_tests/negative_stat_cache/setup_test.go
@alleaditya
alleaditya force-pushed the add_implicit_dir_cache_tests branch 2 times, most recently from b8298ac to 654fe80 Compare July 27, 2026 08:55
@alleaditya
alleaditya force-pushed the add_implicit_dir_cache_tests branch from 654fe80 to b643cdc Compare July 27, 2026 09:02
@alleaditya alleaditya added execute-perf-test Execute performance test in PR execute-integration-tests Run only integration tests labels Jul 27, 2026
@alleaditya
alleaditya requested a review from raj-prince July 27, 2026 11:35
@alleaditya
alleaditya marked this pull request as ready for review July 27, 2026 12:37
@alleaditya
alleaditya requested review from a team and meet2mky as code owners July 27, 2026 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

execute-integration-tests Run only integration tests execute-perf-test Execute performance test in PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant