jw-pkg/test/unit/python/jw/pkg/lib
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jan Lindemann e02f724808
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 4m23s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 4m44s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 4m55s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m54s
CI / Packaging test (push) Successful in 0s
lib.FcCache: Add a write-through read cache
Add a write-through read cache in front of a file context.

stat() and get() results are cached: stat per (path, follow_symlinks), get
per (path, wd, throw). Successful stats and FileNotFoundErrors are cached;
other errors are re-probed, so a transient transport failure does not
poison the cache. Writes pass through to the wrapped context and drop the
cache entries of the affected paths. The existence and directory checks are
rerouted through the cached stat, so they pay the cache instead of the
wrapped context's own fast path.

warm() fills the stat cache of a set of paths, as file_exists() would stat
them, without following symlinks. If the wrapped context is an exec
context, one host command stats all of the paths; otherwise, one stat per
path runs.

The GNU stat format of ExecContext is lifted to the module constant
STAT_GNU_FORMAT, and the field parser is exported as parse_stat_fields(),
so warm() fills entries that are indistinguishable from a real stat().

Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v1.1.0
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-10-17 12:17:21 +02:00
..
App test: Fix mypy strict errors in unit tests 2026-09-13 15:42:29 +02:00
Distro lib.Distro.verify(): Add method 2026-10-16 09:40:22 +02:00
ec lib.FileContext: Add readdir() method 2026-09-29 15:29:19 +02:00
ExecApp test: Fix mypy strict errors in unit tests 2026-09-13 15:42:29 +02:00
FcCache lib.FcCache: Add a write-through read cache 2026-10-17 12:17:21 +02:00
FcWrapper lib.FcWrapper: Add a delegating file context wrapper 2026-10-17 12:17:21 +02:00
Package lib.Package: Add unit tests 2026-09-14 20:52:59 +02:00
PackageFilter lib.PackageFilter: Add unit tests 2026-09-14 20:53:00 +02:00
pm cmds.pkg.CmdVerify: Add command 2026-10-16 09:40:22 +02:00
ProcFilter lib.ProcFilter: Add unit tests 2026-09-14 20:52:59 +02:00
ProjectConf test: Fix mypy strict errors in unit tests 2026-09-13 15:42:29 +02:00
Result test: apply yapf formatting to test.py files 2026-07-04 07:35:17 +02:00
TarIo lib.TarIo: Add unit tests 2026-09-14 20:53:00 +02:00
Uri lib.Uri: Fix __assemble(): No '://' for relative paths 2026-09-05 14:01:46 +02:00
util lib.util.copy(): Add parents flag parameter 2026-10-17 11:47:06 +02:00
version lib.version.Dependency.__version_boundaries(): Use Version.next() 2026-09-15 21:43:47 +02:00
Makefile test: Move unit tests below jw/pkg 2026-06-25 20:57:05 +02:00