Skip to content

test(agc): build the pending-after-unwatch failure messages only when a check fails - #16021

Open
xXPBSXx wants to merge 1 commit into
boykopovar:mainfrom
xXPBSXx:test/agc-pending-unwatch-lazy-messages
Open

xXPBSXx wants to merge 1 commit into
boykopovar:mainfrom
xXPBSXx:test/agc-pending-unwatch-lazy-messages

Conversation

@xXPBSXx

@xXPBSXx xXPBSXx commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

What

agc_storage_pending_after_unwatch takes about 10 s under ASan and UBSan, and agc_driver_recorder, which runs the same checks in its full pass, went from under 10 s to the 30 s limit in the sanitizer runs since #10026 added them. Most of that time is spent building failure messages that are never used: the checks over the watched units pass each word to Require with a message assembled from std::to_string and, for the stored results, the per-unit summary, so every passing word pays for a string. The message is now built only when the check fails; the checks themselves and what they cover are unchanged. CONTRIBUTING asks to shrink a test that gets close to the limit instead of raising its timeout. #15441 raises the timeout of agc_driver_recorder to 120 s in ASan builds; with this change the test takes about 6.7 s instead of 16 to 17 s under ASan on the machine below, so #15441 would remain only as a reserve. Whether it is still needed is for the reviewers.

Tested

Ubuntu 24.04 under WSL2, GCC 13.3.0, configured as sanitizers.yml does (Release, ANYPS5_ENABLE_ASAN=ON, -fsanitize=undefined -fno-sanitize=vptr, same ASAN_OPTIONS and UBSAN_OPTIONS), three runs each on main 1e24993fa3 and on this change on the same main:

main this change
agc_storage_pending_after_unwatch 9.91 / 9.83 / 10.53 s 1.07 / 1.04 / 1.01 s
agc_driver_recorder 17.00 / 16.32 / 16.34 s 6.67 / 6.67 / 6.73 s

All runs passed. tools/check_conventions.py --base upstream/main passes.

Overlap: all 1827 open pull requests were checked on 2026-11-05 at 09:30 UTC against main 7ad9749ed0; 56 change tests/Recorder.cpp. 23 merge with and without this change without a conflict, 33 already conflict with main without it, and none conflicts because of this change; none changes pendingAfterLeavingWatchTests.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a (test-only change to how failure messages are built)
  • AI-assisted: yes

AI-assisted (Claude Code).

🤖 Generated with Claude Code

… a check fails

The checks over the watched units passed each word to Require with a
message built from std::to_string and, for the stored results, the unit
summary, so every passing word paid for a string. Build the message only
when the check fails; the checks themselves are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JJenkx

JJenkx commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Windows check of head 1d899f2b7a, merged onto main aafd88b74b (74993d9a60, clean merge; Recorder.cpp auto-merged).

Setup: Windows 11 Enterprise 22621, WinLibs GCC 15.2 UCRT, Release, Radeon RX 6700 XT, AMD driver 26.10.1, run with ANYPS5_REQUIRE_VULKAN=1 and Vulkan validation layers 1.4.363 enabled. The hosted Windows check does not run these tests on pull requests.

  • All 115 tests from agc_driver_recorder_tests pass in 3 of 3 runs, none skipped. The validation layer loaded 336 times, with no VUID- errors.

AI-assisted: yes.

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 1d899f2 merged onto main c5bd55a · tested 2026-11-05 11:23 UTC · 12 min

GPU NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Vulkan 1.4.329
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 1,231 passed · 1 failed (0 new, 1 also fail on main) · 4 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 1,236 of 3,972 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (547 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 106.2 s
Failing on main too (1, not counted against this PR)
agc_driver_image_table
Validation IDs already present on main (9 IDs in 466 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (466 tests): agc_driver_address_draw_space_reuse, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, and 458 more
VUID-VkShaderModuleCreateInfo-pCode-08737 (14 tests): agc_driver_dpp16_operands, agc_driver_dpp8_pk_fmac, agc_driver_dx10_clamp, agc_driver_f16_fma_denormal_modes, agc_driver_f16_fma_invalid_nan, agc_driver_float16_fma_rounding, agc_driver_float16_modifiers, agc_driver_float16_native, and 6 more
VUID-VkShaderModuleCreateInfo-pCode-08739 (14 tests): agc_driver_dpp16_operands, agc_driver_dpp8_pk_fmac, agc_driver_dx10_clamp, agc_driver_f16_fma_denormal_modes, agc_driver_f16_fma_invalid_nan, agc_driver_float16_fma_rounding, agc_driver_float16_modifiers, agc_driver_float16_native, and 6 more
VUID-VkShaderModuleCreateInfo-pCode-08741 (14 tests): agc_driver_dpp16_operands, agc_driver_dpp8_pk_fmac, agc_driver_dx10_clamp, agc_driver_f16_fma_denormal_modes, agc_driver_f16_fma_invalid_nan, agc_driver_float16_fma_rounding, agc_driver_float16_modifiers, agc_driver_float16_native, and 6 more
VUID-vkCmdCopyImage-srcImage-01548 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_srgb8_color_target
VUID-VkPipelineShaderStageCreateInfo-module-parameter (1 test): agc_driver_float16_unused_nan_payloads
VUID-VkPipelineShaderStageCreateInfo-pSpecializationInfo-06849 (1 test): agc_driver_float16_unused_nan_payloads
Skipped (4)
agc_driver_gcn_display_present: skipped, no display: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
agc_driver_scattered_runs: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_sparse_dma_buf_import: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_stencil_ref_export: skipped, the device lacks VK_EXT_shader_stencil_export
Reproduce
git fetch origin 1d899f2b7a83c4c20a96388c14fdfa7fca46432e c5bd55a89a07d39840867cc671f622f3d7c4869c
git checkout c5bd55a89a07d39840867cc671f622f3d7c4869c && git merge --no-ff 1d899f2b7a83c4c20a96388c14fdfa7fca46432e
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 32 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 4 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@github-actions github-actions Bot added the agc libSceAgc* label Nov 5, 2026

This branch has not been deployed

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

Labels

agc libSceAgc*

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants