qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Clean up the functional download cache after some months
@ 2025-10-13 12:17 Thomas Huth
  2025-10-13 12:17 ` [PATCH v2 1/2] tests/functional: Set current time stamp of assets when using them Thomas Huth
  2025-10-13 12:17 ` [PATCH v2 2/2] tests: Evict stale files in the functional download cache after a while Thomas Huth
  0 siblings, 2 replies; 5+ messages in thread
From: Thomas Huth @ 2025-10-13 12:17 UTC (permalink / raw)
  To: qemu-devel, Daniel P. Berrangé
  Cc: John Snow, Alex Bennée, Philippe Mathieu-Daudé

The download cache of the functional tests is currently only growing.
But sometimes tests get removed or changed to use different assets,
thus we should clean up the stale old assets after a while when they
are not in use anymore.

This little patch series now introduces time stamps for the assets in
the cache (first patch) that we update during each test run, so we can
check these time stamps regularly and evict stale assets after half
of a year not being used anymore (that should be enough time to still
keep the assets around for a while in case you want to diagnose a
problem that is still some months old).

v2:
- Add some wordings to the 1st patch why we cannot use mtime/atime here
- Use functions from Path object instead from "os" (thanks to Daniel!)

Thomas Huth (2):
  tests/functional: Set current time stamp of assets when using them
  tests: Evict stale files in the functional download cache after a
    while

 MAINTAINERS                         |  1 +
 scripts/clean_functional_cache.py   | 45 +++++++++++++++++++++++++++++
 tests/Makefile.include              |  1 +
 tests/functional/qemu_test/asset.py | 15 ++++++++++
 4 files changed, 62 insertions(+)
 create mode 100755 scripts/clean_functional_cache.py

-- 
2.51.0



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-10-13 13:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-13 12:17 [PATCH v2 0/2] Clean up the functional download cache after some months Thomas Huth
2025-10-13 12:17 ` [PATCH v2 1/2] tests/functional: Set current time stamp of assets when using them Thomas Huth
2025-10-13 13:16   ` Daniel P. Berrangé
2025-10-13 12:17 ` [PATCH v2 2/2] tests: Evict stale files in the functional download cache after a while Thomas Huth
2025-10-13 13:17   ` Daniel P. Berrangé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).