KytyPS5/tests
Saadi 4e8d8c849d
tests: add LeastRecentlyUsedCache regression tests (#671)
* launcher: keep primary update feed answer when the fallback request fails

When the primary feed is reachable but its tag differs from the build tag,
the result was discarded and the GitHub API fallback was consulted. If the
fallback request failed (api.github.com rate-limits unauthenticated
requests), the launcher reported an error even though the primary feed had
already returned a usable update answer with a working release URL. Keep
the primary feed answer and show it if the fallback fails.

* emulator: validate numeric CLI arguments

--screen-width, --screen-height, --gpu, and --vblank-frequency were parsed
with Common::ToInt32/ToInt64, which ignores std::from_chars errors and
returns 0, so values like "--screen-width abc" or "--gpu xyz" were
silently accepted: zero screen size, or GPU 0 selected instead of auto
(-1). Reject invalid values with an error message like the other options,
using from_chars-based helpers (ParseUint32/ParseInt32); reject zero
screen dimensions.

* tests: add LeastRecentlyUsedCache regression tests

Cover the LRU cache walk order, tick filtering in ForEachItemBelow,
early-exit boolean callbacks, Touch reordering and same-tick skips,
Free, and freed-id reuse by later inserts. Modeled on BitArrayTests.

* tests: use a tick cutoff that detects a stale newest-item tick

Collect(cache, 35) also visits c when Touch(c, 35) failed to update
its tick (30 <= 35). Use a cutoff of 30 and expect only b.

* Run LRU cache tests in CI

---------

Co-authored-by: nmzik <Nmzik@mail.ru>
2026-09-26 02:42:31 +04:00
..
AudioOut2PortTests.cpp Capture PCM at set time when multiple AudioOut2 ports share a buffer (#826) 2026-09-26 02:19:49 +04:00
BitArrayTests.cpp graphics: perf - batch GPU page watcher updates at 4 MiB granularity 2026-08-02 08:39:50 +02:00
EventQueueLifetimeTests.cpp format src and tests with clang-format 2026-07-31 11:36:12 +02:00
ImagePageTableTests.cpp render: clean up cache and image internals 2026-09-06 03:55:13 +04:00
ImeDialogTests.cpp remove unused helpers and the -64 suffix 2026-09-17 20:35:36 +04:00
KernelFileSystemTests.cpp SDL3 update (#787) 2026-09-23 17:22:15 +04:00
LruCacheTests.cpp tests: add LeastRecentlyUsedCache regression tests (#671) 2026-09-26 02:42:31 +04:00
MemoryTrackerTests.cpp Simplify and batch buffer cache downloads 2026-09-12 14:17:00 +04:00
Ngs2SamplerTests.cpp audio: improve NGS2 stream and ATRAC9 playback 2026-09-25 18:26:08 +04:00
PageManagerTests.cpp render: simplify buffer and memory tracking ownership 2026-09-06 03:46:34 +04:00
ResourceMaterializationTests.cpp Read image descriptors in one bounded span 2026-09-23 15:41:02 +04:00
ResourceTrackingTests.cpp Shader recompiler: accept V_NOT_B32 SDWA partial dst with any source; allow 64 buffers 2026-09-26 01:58:55 +04:00
SaveDataMemoryTests.cpp loader: wrap elapsed time in Timer::GetTime (#679) 2026-09-24 22:02:19 +04:00
ScalarProvenanceTests.cpp Read image descriptors in one bounded span 2026-09-23 15:41:02 +04:00
ShaderRayTracingTests.inc graphics: skip compute dispatches with BVH instructions 2026-09-24 20:46:04 +04:00
ShaderRecompilerComputeTests.cpp Shader recompiler: accept V_NOT_B32 SDWA partial dst with any source; allow 64 buffers 2026-09-26 01:58:55 +04:00
ShaderVertexMetadataTests.cpp graphics: accept AGC vertex-buffer-only shaders 2026-08-18 03:53:43 +02:00
SyncOnAddressTests.cpp kernel: support timed umtx waits through shared address deadlines 2026-09-14 06:58:32 +04:00
VirtualMemoryAllocationTests.cpp Publish reserved guest mappings atomically after backing commit 2026-09-24 11:13:33 +04:00
macosSse4aTests.cpp loader: emulate immediate SSE4a instructions on macOS (#635) 2026-09-17 11:23:50 +04:00
shaderCfgTests.cpp Shader recompiler: accept V_NOT_B32 SDWA partial dst with any source; allow 64 buffers 2026-09-26 01:58:55 +04:00