Skip to content

fix(libc): report null gmtime_s and localtime_s arguments to the constraint handler - #12593

Open
JJenkx wants to merge 3 commits into
boykopovar:mainfrom
JJenkx:windows/libc-time-s-null-constraints
Open

JJenkx wants to merge 3 commits into
boykopovar:mainfrom
JJenkx:windows/libc-time-s-null-constraints

Conversation

@JJenkx

@JJenkx JJenkx commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

What

gmtime_s and localtime_s now report a null timer or result to the constraint handler, as titles' libc.prx does. The handler gets "gmtime_s: bad argument" or "localtime_s: bad argument", EINVAL and a null pointer, and the function returns null. On main it returned null without calling the handler.

gmtime, localtime, gmtime_r and localtime_r are built on these two. They keep returning null for a null argument without calling the handler, exactly as on main.

The default constraint-handler prerequisite is fulfilled on current main b11c7bf84f5d2f636ff60166cc3371bd071e24d5: #9935 was closed after its changes landed through #10270. Merging its final head into this main produces the unchanged main tree. Earlier test and title measurements retain their recorded source pins.

Overlap: ntamas94's #10409 (36-byte struct tm, tm_isdst = -1 from gmtime_s) also edits these two functions. It currently conflicts with main on its own; the change here is the four-line null check at the top of each function.

Tested

Current-main refresh — 2026-11-02. Published head 23fcc2d857f40e9c7f2b0cbc451c89d574bddb30 includes pinned main a4eca2a056bf3bbbec98ab42e9d28163e4ea9cb8. The time-conversion constraint implementation and null argument fixtures are retained with main’s Time.cpp updates and timelocal debt. Quiet null returns of ordinary gmtime/localtime and _r forms remain the documented host compatibility behavior, not a new title-library assertion.

Rebuilt actual libc/Ampr and selected tests from the final input tree. guest_crt, guest_time_conversion, guest_time_extras, guest_mktime, guest_strftime, guest_locale each pass three consecutive runs: 18 runtime passes, zero skips, plus public_headers. Conventions and whitespace pass. Source/input manifests, exact dependencies, library/test hashes, logs/JUnit and head-leased push receipts are attached. The same pinned main passes 18 selected groups three times (54 runtime passes) plus headers. All 34 recursive dependency trees/31,551 tracked blobs verify with zero errors; QuickJS’s update=none test262 corpus is explicitly excluded because it is not a library build input.

Linux-7.2.11-arch1-1-x86_64-with-glibc2.44, Ryzen 9 7950X, GCC 16.2.1, Ninja Release, BUILD_TESTING=ON. Focused Linux CPU qualification only. Older Windows/module/reference reports retain their original pins; no fresh Windows/macOS, SDK-module, console, title/GPU or speed claim. AI-assisted: yes (Codex).

Evidence: https://github.com/JJenkx/AnyPS5/releases/download/linux-validation-20261023/math-six-main-a4eca-linux-extra10321-20261102.tar.gz; SHA-256 525ccb31a5d3d0f5adced5fda58818d8432f06c0afa7290139adb60ae6664b54.

Earlier dated qualifications below retain their recorded source/platform pins.

Windows 11, WinLibs GCC 15.2.0 UCRT r7, Release, main 319621ba2e.

  • Native comparison: a scratch loader calls the titles' functions (PPSA07923) by NID next to this build's, with the same recording handler on both sides.
    • gmtime_s: 50,000 random calls with times across the 64-bit range and null arguments. Calls with a null argument differ in 4,960 cases on main and 0 with this PR.
    • The other differences don't involve null arguments, and this PR leaves them unchanged:
      • 9,549 calls inside 1901 to 2099 differ only in tm_isdst (titles -1, main 0), which fix(libc): write a 36-byte struct tm as the console does #10409 addresses;
      • 35,491 calls outside that range differ because the titles' gmtime_s gets those dates wrong (it returns wrapped years even for INT64_MAX), which this build does not copy.
    • localtime_s: the titles report "localtime_s: bad argument" for a null timer, a null result and both. Its non-null path needs a time-zone import the loader doesn't provide, so it isn't compared.
  • Non-_s functions: the titles' gmtime, localtime, gmtime_r and localtime_r don't check for null at all. Each of the eight null cases (one for each single-argument function, three for each _r function) ends in an access violation on PPSA07923. Returning null without a handler call for these four is therefore main's existing, safer behaviour, which this PR keeps, not a titles rule.
  • Regression: guest_time_conversion gains CheckNullArguments, which covers each null combination for both functions and a valid call with no handler call. With the previous Time.cpp it fails (null argument did not report a bad argument).
  • Test set: guest_time_conversion, guest_time_extras, guest_mktime, guest_strftime, guest_crt and guest_locale pass 3/3. Conventions pass.

Checklist

🤖 Generated with Claude Code

@adriadam10 adriadam10 self-assigned this Oct 28, 2026
@oneandonlydean

Copy link
Copy Markdown
Collaborator

@JJenkx the change matches your native comparison and the null guards on gmtime/localtime/gmtime_r/localtime_r keep those four away from the handler, as you describe. One test fix:

CheckNullArguments is meant to cover each null combination, but the loop convert(which == 1 ? nullptr : &timer, which == 0 ? nullptr : which == 1 ? &result : nullptr) gives (timer, null), (null, result) and then (timer, null) again; which == 2 repeats which == 0, so "both null", which your comparison shows the titles report as "localtime_s: bad argument", is never exercised. Please make the first argument which == 0 ? &timer : nullptr so the three iterations are (timer, null), (null, result) and (null, null).

Optional, for #12593 and #12594 alike: #12589's debt entry records that the behaviour is the titles' libc.prx (PPSA07923 and PPSA05916), not the system libSceLibcInternal or a console. A line in docs/dev/debt/libc.md saying the same for gmtime_s/localtime_s and for memset_s would keep that in the repository; for memset_s it would also record that a violation writes nothing, where C11 K.3.7.4.1 fills min(count, destsz) bytes.

@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 10409 core/libs/prx/libc/src/Time.cpp L558-559
core/libs/prx/libc/src/TimeExtras.cpp L35-36

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 5021 core/libs/prx/libc/src/Time.cpp
docs/dev/debt/libc.md
PR 5303 docs/dev/debt/libc.md
PR 6819 docs/dev/debt/libc.md
PR 7081 docs/dev/debt/libc.md
PR 7386 docs/dev/debt/libc.md
PR 7447 docs/dev/debt/libc.md
PR 7715 docs/dev/debt/libc.md
PR 7851 docs/dev/debt/libc.md
PR 8150 docs/dev/debt/libc.md
PR 8965 docs/dev/debt/libc.md
PR 9340 docs/dev/debt/libc.md
PR 9371 docs/dev/debt/libc.md
PR 9447 core/libs/prx/libc/src/Time.cpp
docs/dev/debt/libc.md
PR 9526 docs/dev/debt/libc.md
PR 10397 docs/dev/debt/libc.md
PR 10405 docs/dev/debt/libc.md
PR 10780 docs/dev/debt/libc.md
PR 11172 docs/dev/debt/libc.md
PR 11260 docs/dev/debt/libc.md
PR 11262 docs/dev/debt/libc.md
PR 11266 docs/dev/debt/libc.md
PR 11332 docs/dev/debt/libc.md
PR 11661 docs/dev/debt/libc.md
PR 11689 docs/dev/debt/libc.md
PR 11698 docs/dev/debt/libc.md
PR 11724 docs/dev/debt/libc.md
PR 11726 docs/dev/debt/libc.md
PR 11831 docs/dev/debt/libc.md
PR 12682 docs/dev/debt/libc.md
PR 12688 docs/dev/debt/libc.md
PR 12700 docs/dev/debt/libc.md
PR 12849 docs/dev/debt/libc.md
PR 12965 docs/dev/debt/libc.md
PR 13449 docs/dev/debt/libc.md
PR 13486 docs/dev/debt/libc.md
PR 13794 docs/dev/debt/libc.md
PR 13804 docs/dev/debt/libc.md
PR 13809 docs/dev/debt/libc.md
PR 14085 docs/dev/debt/libc.md
PR 14212 docs/dev/debt/libc.md
PR 15800 docs/dev/debt/libc.md
PR 15801 docs/dev/debt/libc.md
PR 15802 docs/dev/debt/libc.md
PR 15803 docs/dev/debt/libc.md
PR 15804 docs/dev/debt/libc.md
PR 15807 docs/dev/debt/libc.md

@JJenkx

JJenkx commented Oct 28, 2026

Copy link
Copy Markdown
Contributor Author

@oneandonlydean thanks, you're right: the loop ran (timer, null) twice. Fixed in db1c1b22ef (on 704acff4af). The first argument is now which == 0 ? &timer : nullptr, so the iterations are (timer, null), (null, result) and (null, null).

I also added the debt entry you suggested. It records the titles' rule from PPSA07923's libc.prx, that gmtime, localtime, gmtime_r and localtime_r stay quiet, and that the titles' gmtime_s gets dates wrong outside about 1901–2099, which this build doesn't copy.

On Windows, guest_time_conversion, guest_time_extras, guest_mktime, guest_strftime, guest_crt and guest_locale pass 3/3. With main's Time.cpp, guest_time_conversion still fails. Conventions pass.

AI-assisted: yes (Claude Code).

@rooklz rooklz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran this on macOS x86_64 (Apple clang, ASan+UBSan, -fno-sanitize-recover), at head 704acff4af. It's a standalone build of Time.cpp, TimeExtras.cpp, Environment.cpp and Multibyte.cpp with the target's -include HostStandardStreams.hpp, plus a two-function shim: __error_nid_postfix returns &errno, and set_constraint_handler_s_nid_postfix calls SonySetConstraintHandlerS.

  • guest_time_conversion and guest_time_extras pass at head (3/3 runs).
  • If I swap in main's Time.cpp, guest_time_conversion fails with null argument did not report a bad argument, as your body says.
  • git merge-tree against main 319621ba2e is clean, and conventions pass.
  • Every internal caller of gmtime_s/localtime_s (tzset, mktime, timegm, SonyCtimeS) passes non-null pointers, so the new handler call can't fire from inside the library.

Mutants. I ran 12 against the two tests. 5 are killed: main's Time.cpp, gmtime_s reporting only a null timer, a message of "gmtime_s", ERANGE for EINVAL, and result passed as the handler pointer. These 7 survive:

Mutant Survives because
gmtime_s, both null → silent nullptr (null, null) is never exercised; which == 2 repeats which == 0, as oneandonlydean noted
localtime_s, both null → silent nullptr same
libc_gmtime / libc_localtime without the new timer == nullptr guard no test passes a null timer to the non-_s functions with a recording handler installed
gmtime_r / localtime_r guarding only result same

(If gmtime_r loses its guard completely, guest_time_extras catches it, because its null-result call aborts in the default handler.)

The body says gmtime, localtime, gmtime_r and localtime_r "keep returning null for a null argument without calling the handler". That is half of this PR, but no test pins it. Here is a test-only diff. It includes oneandonlydean's (null, null) fix, and it checks that the four non-_s entry points (plus libc_gmtime/libc_localtime) return null for every null combination while the recording handler is installed, without calling it:

@@ -51,13 +51,22 @@ static void CheckNullArguments() {
         const char* expected = convert == gmtime_s_nid_postfix ? "gmtime_s: bad argument" : "localtime_s: bad argument";
         for (int which = 0; which < 3; ++which) {
             g_constraintCalls = 0;
-            Require(convert(which == 1 ? nullptr : &timer, which == 0 ? nullptr : which == 1 ? &result : nullptr) == nullptr,
+            Require(convert(which == 0 ? &timer : nullptr, which == 1 ? &result : nullptr) == nullptr,
                 "null argument was accepted");
             Require(g_constraintCalls == 1 && g_constraintMessage == expected, "null argument did not report a bad argument");
         }
         g_constraintCalls = 0;
         Require(convert(&timer, &result) == &result && g_constraintCalls == 0, "valid conversion reported a violation");
     }
+    g_constraintCalls = 0;
+    for (const auto convert : {libc_gmtime_nid_postfix, gmtime_nid_postfix, libc_localtime_nid_postfix, localtime_nid_postfix}) {
+        Require(convert(nullptr) == nullptr, "null timer was accepted");
+    }
+    for (const auto convert : {gmtime_r_nid_postfix, localtime_r_nid_postfix}) {
+        Require(convert(nullptr, &result) == nullptr && convert(&timer, nullptr) == nullptr && convert(nullptr, nullptr) == nullptr,
+            "null argument was accepted");
+    }
+    Require(g_constraintCalls == 0, "non-_s conversion reported a violation");
     set_constraint_handler_s_nid_postfix(previous);
 }

With this diff all 12 mutants are killed, and head stays green (3/3 under ASan+UBSan).

One question about provenance. Your native comparison covers gmtime_s and localtime_s. Did the scratch loader also call the titles' gmtime/localtime/gmtime_r/localtime_r with a null argument and a recording handler installed? If it did, a line in Tested would back up the new assertions. If it didn't, the non-_s side is main's behaviour kept unchanged, which is fine, but the body could say so.

@JJenkx

JJenkx commented Oct 28, 2026

Copy link
Copy Markdown
Contributor Author

@rooklz thanks. Your diff is applied: db1c1b22ef already had the (null, null) fix, and b8ea6ed9cc (test-only) adds the non-_s block, unchanged. On Windows, guest_time_conversion, guest_time_extras, guest_mktime, guest_strftime, guest_crt and guest_locale pass 3/3. I reran two of your survivors and both now fail guest_time_conversion:

  • libc_gmtime without its timer == nullptr guard;
  • localtime_r guarding only result.

Provenance: I hadn't measured those four before, so I did now. The titles' gmtime, localtime, gmtime_r and localtime_r don't check for null at all. All eight null cases end in an access violation in the loader, on PPSA07923 and on PPSA05916:

  • gmtime(NULL) and localtime(NULL);
  • each _r with (timer, null), (null, result) and (null, null).

So the silent null return is main's existing behaviour kept unchanged, not a titles rule. Tested now says so.

AI-assisted: yes (Claude Code).

@jotitadev jotitadev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First Linux run of this head (the thread has Windows and a standalone macOS build).

Ubuntu 26.04, i7-8700, GCC 15.2, Release, BUILD_TESTING=ON. Head b8ea6ed9cc merged (--no-commit) onto current main ed1e0ed08f; the merge is clean.

  • guest_time_conversion: passes 3/3.
  • guest_time_*, guest_mktime, guest_strftime, guest_crt and guest_locale: 10/10 pass.
  • public_headers: passes.
  • Control: with Time.cpp and TimeExtras.cpp from main and this PR's test kept, guest_time_conversion aborts 3/3 at null argument did not report a bad argument.

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

@oneandonlydean oneandonlydean self-assigned this Oct 30, 2026
@bunbeans2-arch

Copy link
Copy Markdown
Contributor

A Windows run with GCC 16: Windows 11 Pro 10.0.22631, i9-9900K, MSYS2 UCRT64 GCC 16.1.0, Release, this PR (b8ea6ed9cc) merged into main fae9e48.

  • With this PR: guest_time_conversion passed 5 of 5.
  • Same tree with only Time.cpp and TimeExtras.cpp put back to main (this PR's tests kept): it aborted at the new check null argument did not report a bad argument, in 5 of 5 runs.
  • main fae9e48 alone (its own tests and source): the same test passed 3 of 3.

AI-assisted: yes (Claude Code)

JJenkx and others added 3 commits November 2, 2026 12:47
…traint handler

The libc.prx that titles ship (PPSA07923) calls the constraint handler
with "gmtime_s: bad argument" or "localtime_s: bad argument", EINVAL and
a null pointer when either argument of gmtime_s or localtime_s is null,
and returns null. main returned null without calling it. gmtime,
localtime, gmtime_r and localtime_r, which are built on them, keep
returning null for a null argument without a call.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 704acff)
The loop repeated the null-result case instead of passing both
arguments null; it now runs (timer, null), (null, result) and
(null, null). The debt notes record the measured rule. Both from
oneandonlydean's review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit db1c1b2)
…r _r forms

gmtime, localtime, libc_gmtime, libc_localtime, gmtime_r and
localtime_r must return null for a null argument without calling the
installed constraint handler. Suggested by rooklz in review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit b8ea6ed)
@JJenkx
JJenkx force-pushed the windows/libc-time-s-null-constraints branch from b8ea6ed to 23fcc2d Compare November 2, 2026 18:12
@JJenkx

JJenkx commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

Current-main refresh — 2026-11-02. Published head 23fcc2d857f40e9c7f2b0cbc451c89d574bddb30 includes pinned main a4eca2a056bf3bbbec98ab42e9d28163e4ea9cb8. The time-conversion constraint implementation and null argument fixtures are retained with main’s Time.cpp updates and timelocal debt. Quiet null returns of ordinary gmtime/localtime and _r forms remain the documented host compatibility behavior, not a new title-library assertion.

Rebuilt actual libc/Ampr and selected tests from the final input tree. guest_crt, guest_time_conversion, guest_time_extras, guest_mktime, guest_strftime, guest_locale each pass three consecutive runs: 18 runtime passes, zero skips, plus public_headers. Conventions and whitespace pass. Source/input manifests, exact dependencies, library/test hashes, logs/JUnit and head-leased push receipts are attached. The same pinned main passes 18 selected groups three times (54 runtime passes) plus headers. All 34 recursive dependency trees/31,551 tracked blobs verify with zero errors; QuickJS’s update=none test262 corpus is explicitly excluded because it is not a library build input.

Linux-7.2.11-arch1-1-x86_64-with-glibc2.44, Ryzen 9 7950X, GCC 16.2.1, Ninja Release, BUILD_TESTING=ON. Focused Linux CPU qualification only. Older Windows/module/reference reports retain their original pins; no fresh Windows/macOS, SDK-module, console, title/GPU or speed claim. AI-assisted: yes (Codex).

Evidence: https://github.com/JJenkx/AnyPS5/releases/download/linux-validation-20261023/math-six-main-a4eca-linux-extra10321-20261102.tar.gz; SHA-256 525ccb31a5d3d0f5adced5fda58818d8432f06c0afa7290139adb60ae6664b54.

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 2, 2026
@JJenkx

JJenkx commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

Windows check of the rebased head 23fcc2d857.

Setup: Windows 11 Enterprise 10.0.22621, Ryzen 9 5950X, WinLibs GCC 15.2.0 UCRT r7 (the CI toolchain), Release, BUILD_TESTING=ON, private build. The build was clean, and the changed sources were rebuilt for this head.

  • ctest -R '^guest_time_conversion$' --repeat until-fail:3: guest_time_conversion passes 3/3. The system timezone was not changed.

🤖 Generated with Claude Code

@JJenkx

JJenkx commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

The failing relinker (windows-latest, g++) check (run 41498379849) is a runner timeout unrelated to this change. check_compile_modes_test_version_and_dry_run_modes_cannot_report_success hit its CTest timeout; the other tests in that job passed.

  • Locally: the same test takes 0.8 s on Windows 11 (MinGW-w64 GCC 15.2.0 UCRT, main 7feb37ee3e).
  • Other PRs: the same job timed out in different tool tests on other PRs within the same hour.
  • Rerun: I can't rerun jobs on this repository. A maintainer rerun, or the next push, should clear it.

AI-assisted: yes.

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ AMD GPU test: passed

PR head 23fcc2d merged onto main 1e65852 · tested 2026-11-03 19:08 UTC · 21 min

GPU AMD Radeon RX 6300 (RADV NAVI24), driver Mesa 25.2.8-0ubuntu0.24.04.4, Vulkan 1.4.318
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-42-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 3,690 passed · 17 failed (0 new, 15 also fail on main, 2 unstable on main) · 61 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 3,768 of 3,818 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 (1334 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 121.4 s, ⚠️ agc_driver_graphics_maps_fallback 117.3 s, ⚠️ agc_driver_graphics 112.1 s, ⚠️ public_headers 70.7 s, ⚠️ agc_driver_image_sample_unnormalized 66.2 s
Unstable on main (2, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_array_layer_target_cpu: failed in 1 of the last 9 main runs
agc_driver_pipeline_journal: failed in 7 of the last 9 main runs
Failing on main too (15, not counted against this PR)
agc_driver_alpha_to_coverage_sample_mask_export
agc_driver_guest_memory_lifetime_direct
agc_driver_image_table
agc_driver_job_manager_compute_capacity
agc_driver_native_depth_bda_clear
agc_driver_native_depth_buffer_clear
agc_driver_native_depth_clears
agc_driver_native_multisample_depth
agc_driver_store_over_untracked
agc_driver_submit_progress
agc_driver_two_sample_alpha_to_coverage_sample_mask_export
agc_submit_progress
agc_submit_progress_no_timeline
guest_mmap_executable
guest_socket_options_multicast
Validation IDs already present on main (4 IDs in 765 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (765 tests): agc_compute_pipeline_replay, agc_driver, agc_driver_address_passes, agc_driver_address_passes_draw_transitions, agc_driver_address_passes_targets_split, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_alpha_to_coverage_sample_mask_export, and 757 more
VUID-vkCmdCopyImage-srcImage-01548 (9 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store_image_copy, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, and 1 more
VUID-vkCmdCopyImage-srcImage-01551 (9 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store_image_copy, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, and 1 more
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (2 tests): agc_driver_prepared_exports, agc_driver_srgb8_color_target
Skipped (61)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_copied_writer_label_order: skipped, the device reports a minStorageBufferOffsetAlignment of 4, so the dispatch binds its record at +0x1004 in place and nothing is written back; the test needs an alignment above 4
agc_driver_copied_writer_label_order_drain: skipped, the device reports a minStorageBufferOffsetAlignment of 4, so the dispatch binds its record at +0x1004 in place and nothing is written back; the test needs an alignment above 4
agc_driver_float16_unused_nan_payloads: skipped, the device has no native f16 conversions with RTE rounding and kept f16 denormals
agc_driver_image_table_vouched_lookups: skipped, the device reports 4 of 4 host-imported pages written after a GPU read, so a watched imported table cannot be vouched for
agc_driver_linear_target_direct_write_completion: skipped, the device does not keep host imports write-watched, so no completion stamp over the target is tracked
agc_driver_ngg_vertex_wave_reduction: skipped, s3 describes a 32-lane wave only on 32-lane subgroups, and the device has 64 lanes
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_unit_shadow: skipped, the device does not import watched host memory for unit shadows
agc_driver_unit_shadow_budget: skipped, the device does not import watched host memory for unit shadows
agc_driver_vertex_elected_atomic_max: skipped, the device runs vertex programs in subgroups, so they keep their cross-lane reductions
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_idle_publish_wait: skipped, the device reports 4 of 4 host-imported pages written after a GPU read, so a forced watch of the import reads its submissions as CPU stores
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_shadowed_key_stores: skipped, the device imports no watched host memory under a unit shadow
agc_small_tiled_shadow_label: skipped, host imports are unavailable: the test block is not imported and watched
agc_storage_clear_hand_over: skipped, the device imports no watched host memory for the clear-key hand-over
agc_storage_pending_key_refresh: skipped, refreshes over a pending key store are not testable here
agc_unit_shadow: skipped, the device does not import watched host memory for unit shadows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platfo
Reproduce
git fetch origin 23fcc2d857f40e9c7f2b0cbc451c89d574bddb30 1e658521a0a599872612bb91949311e2956b5283
git checkout 1e658521a0a599872612bb91949311e2956b5283 && git merge --no-ff 23fcc2d857f40e9c7f2b0cbc451c89d574bddb30
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 12 --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 16 --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 AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants