Skip to content

test_drop_file_cache: posix_fadvise cache-drop proof fails when /tmp is tmpfs #3157

Description

@joral

Row: -

python3 -m unittest tests.tools.test_drop_file_cache fails on a clean,
unmodified main (bcade48d6) on this box:

ERROR: test_posix_fadvise_evicts_all_inventoried_resident_pages
tools.bench.drop_file_cache.CacheDropError: cache-drop proof retained 6291456 resident bytes

Reproduced with no other change in the tree; not caused by any pending work.
This box's /tmp is a 32G tmpfs mount (df -h /tmp). posix_fadvise(..., POSIX_FADV_DONTNEED) on a tmpfs-backed file cannot evict pages the way it
does on a real block-device-backed file, because tmpfs pages are the storage,
not a cache of it -- so the eviction proof this test asserts on can never
succeed there. Either the test needs a non-tmpfs scratch directory, or
drop_file_cache needs to detect a tmpfs target and skip/report accordingly.

Filed without a fix in the same flow: found as a side effect of unrelated
work (ORACLE-VLLM-ROCM-GFX1200-DOCKER, #2961) and needs its own
investigation into the right fix (relocate the test's scratch dir vs. teach
drop_file_cache about tmpfs) rather than a guess landed in a hurry.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions