test_drop_file_cache: posix_fadvise cache-drop proof fails when /tmp is tmpfs
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 423
- Forks
- 53
- Avg merge
- 20h 26m
- Merged PRs (30d)
- 310
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running python3 -m unittest tests.tools.test_drop_file_cache and inspect tests.tools.test_drop_file_cache plus tools.bench.drop_file_cache. Reproduce the failure with /tmp on tmpfs, then determine whether the scratch directory or cache-drop handling should change. Done means the test has defined behavior on tmpfs without weakening the proof on block-device-backed storage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, python
- Domain
- operating-systems, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100