Skip to content

build: a test-fizzy step running fizzy's SDL patch suites - #1

Merged
foxnne merged 1 commit into
fizzyfrom
test/test-fizzy-step
Oct 9, 2026
Merged

foxnne merged 1 commit into
fizzyfrom
test/test-fizzy-step

Conversation

@foxnne

@foxnne foxnne commented Oct 9, 2026 •

Copy link
Copy Markdown

Part of fizzyedit/fizzy#280 (step A1). Needs fizzyedit/SDL#1, whose commit this pins.

What changes

  • zig build test-fizzy builds SDL_test (SDL's src/test/*.c) plus fizzyedit/SDL's suites for fizzy's patches (test/testfizzy.c, test/testautomation_fizzy*.c) against the SDL library this package already builds, and runs them. Arguments after -- reach the runner: --filter <suite|test>, --list, --require-gpu metal,vulkan. On Zig after 0.16 it uses addPassthruArgs, since b.args is gone there. Nothing in it is installed, and the library's definition is untouched, so a consumer's build of SDL (fizzy's) doesn't change. A plain zig build still installs only libSDL3.a. It cross-compiles: I built it for x86_64-linux-gnu and x86_64-windows-gnu from a Mac.
  • The sdl pin moves to fizzyedit/SDL test/fizzy-gpu-suite @ 4839ede, which is fizzy-3.4 (tag fizzy-3.4.16-5) plus the suite for patch 1.
  • CI now runs on fizzy as well as main (it only ran for main before, so PRs here never got checks), and gains two jobs:
    • test-fizzy-linux: Mesa lavapipe with --require-gpu vulkan, once on X11 under Xvfb and once on Wayland under weston --backend=headless. Xvfb is the one-line way to get a display (xvfb-run). Weston is there because SDL's transparent-window path differs per video driver (X11 needs an ARGB visual), and step A2 needs headless weston anyway. It runs in an ubuntu:26.04 container, not on the 24.04 runner. This package builds SDL against libxkbcommon 1.13's headers, so SDL's Wayland driver needs xkb_keymap_mod_get_mask (added in 1.10) at run time. Ubuntu 24.04 ships 1.6, so SDL_VIDEO_DRIVER=wayland failed there with wayland not available while X11 passed.
    • test-fizzy-macos on macos-14, macos-15 and macos-latest: system_profiler SPDisplaysDataType, then a probe printing MTLCreateSystemDefaultDevice() and every device in MTLCopyAllDevices(), then the suite. It passes --require-gpu metal wherever a device is listed, so a runner with Metal can't quietly skip the Metal tests.

The hosted macOS runners have Metal

All three expose one Metal device, Apple Paravirtual device, and SDL's Metal GPU driver claims and presents on it, with transparent windows included:

Runner Image / macOS MTLCreateSystemDefaultDevice() MTLCopyAllDevices() Suite with --require-gpu metal
macos-14 14.8.9 arm64 nil 1: Apple Paravirtual device Metal tests pass
macos-15 macos-15-arm64, 15.7.9 Apple Paravirtual device 1: same Metal tests pass
macos-latest macos-26-arm64, 26.6.2 Apple Paravirtual device 1: same Metal tests pass

On macos-14, a bare command-line tool gets nil from MTLCreateSystemDefaultDevice() even though the device is listed, so the probe goes by the list. system_profiler SPDisplaysDataType prints nothing on any of them.

So the Metal suites for patches 3–5 (#280 Track A) can run in CI as far as needing a device goes. Whether a live resize or a CATransaction present behaves there is a separate question.

Before merge

The SDL commit needs a permanent tag (docs/DEPENDENCIES.md, "Tag, then pin"). That means fizzyedit/SDL#1 reviewed and moved onto fizzy-3.4, then the tag (e.g. fizzy-3.4.16-6) and the repin. Tags are the maintainer's, so I created none. This PR's pin comment calls it a test pin until then.

Verified

  • macOS 26.5, Apple silicon, local: zig build test-fizzy -- --require-gpu metal passes. The Metal opaque and transparent tests pass, and Vulkan skips.
  • The same suite on upstream release-3.4.16 (fa2c02bb, through a local .path pin, Metal): fails, exit 1, on gpu_claimTransparentWindowMetal: got error: The GPU API doesn't support transparent windows. The opaque control passes. The refusal sits in SDL_ClaimWindowForGPUDevice itself, before any driver, but the upstream run was only done on Metal.
  • CI: test-fizzy-linux (x11, wayland): both Vulkan tests pass on llvmpipe (Mesa 26.0.8), the transparent window's flag stays set, and the swapchain is 320x240. test-fizzy-macos passes on all three runners as above. The build (master, …) jobs fail in Zig master's translate-c (avx512bmmintrin.h: use of unknown builtin), which isn't this change. They are continue-on-error.

🤖 Generated with Claude Code

`zig build test-fizzy` builds SDL_test (SDL's `src/test`) and
fizzyedit/SDL's suites for fizzy's patches (`test/testfizzy.c`,
`test/testautomation_fizzy*.c`) against the SDL library this package
already builds, and runs them. Arguments after `--` reach the runner
(`--filter`, `--require-gpu vulkan`). Nothing in it is installed, so a
consumer's build of SDL is unchanged.

The `sdl` pin moves to fizzyedit/SDL `test/fizzy-gpu-suite` (fizzy-3.4
plus the suite for patch 1), a test pin until that commit is tagged.

CI now runs for `fizzy` as well as `main`, and gains two jobs. Linux runs
the suite in an Ubuntu 26.04 container on Mesa's lavapipe, under Xvfb
(X11) and headless weston (Wayland), requiring Vulkan. Not on the 24.04
runner: SDL built here needs libxkbcommon 1.10+ for its Wayland driver,
and 24.04 has 1.6. macOS (14, 15, latest) prints the displays, lists the
Metal devices, then runs the suite, requiring Metal wherever there is one.

Part of fizzyedit/fizzy#280.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@foxnne
foxnne force-pushed the test/test-fizzy-step branch from 05e0d1c to 0f6a2a8 Compare October 9, 2026 17:19
@foxnne
foxnne marked this pull request as ready for review October 9, 2026 18:09
@foxnne
foxnne merged commit 0f6a2a8 into fizzy Oct 9, 2026
8 of 11 checks passed
foxnne added a commit to fizzyedit/fizzy that referenced this pull request Oct 9, 2026
…294)

Fixes #289. Part of #280 (steps A1, A2 and A4b landed on the forks).

Moves fizzy's `.sdl` pin to sdl_zig `fizzy-1.0.3+3.4.16-8` (SDL
`fizzy-3.4.16-8`). That brings two things:

**1. The forks carry tests now.** fizzyedit/SDL has fizzy's own suites
on SDL's test harness, one per patch, each failing without its patch.
fizzyedit/sdl_zig runs them with `zig build test-fizzy` in CI: Linux on
lavapipe under Xvfb and headless weston, and the hosted macOS runners,
which have a Metal device.
- fizzyedit/SDL#1 → `fizzy-3.4.16-6` (`4839ede`): the runner, plus patch
1's suite (transparent window claimed on Metal and Vulkan).
- fizzyedit/sdl_zig#1 → `fizzy-1.0.3+3.4.16-6` (`0f6a2a8`): the
`test-fizzy` step.
- fizzyedit/SDL#2 → `fizzy-3.4.16-8` (`a518aaf`), fizzyedit/sdl_zig#2 →
`fizzy-1.0.3+3.4.16-8` (`a02dda8`): patch 6's suite, Wayland frame
insets.
- **How:** it reads libwayland's request trace under headless weston, at
scale 1 and 2.
- **Checks:** geometry, input region, min/max sizes and published insets
while floating; zero insets when maximized or fullscreen; popup
anchoring.
  - **Result:** passes on the fork, and fails on upstream 3.4.16.
  - **Problems it found in patch 6:** five, listed in #280 (C2b).

**2. SDL patch 8: Wayland loads where libxkbcommon is older than 1.10**
(#289).
- **The bug:** built against 1.10+ headers (sdl_zig uses 1.13), SDL
required `xkb_keymap_mod_get_mask()`. On Ubuntu 24.04 (1.6) or Debian 12
(1.5) the whole Wayland driver reported itself unavailable, and fizzy
fell back to X11. Upstream `main` has the same problem.
- **The fix:** the symbol is now optional at runtime, and the masks fall
back to `xkb_keymap_mod_get_index()`, the path SDL already takes when
built against older headers. For standard keymaps both paths give the
same masks.
- **The proof:**
- [red](https://github.com/fizzyedit/sdl_zig/actions/runs/37968707700)
on `ubuntu:24.04` without the patch ("wayland not available");
- [green](https://github.com/fizzyedit/sdl_zig/actions/runs/37971005996)
on 24.04 and 26.04 with it, where a German keymap's Shift, Caps Lock and
AltGr levels come out right.
- **The PRs:** fizzyedit/SDL#3 → `fizzy-3.4.16-7` (`36dda37`);
fizzyedit/sdl_zig#3 → `fizzy-1.0.3+3.4.16-7` (`264af2a`).

`docs/DEPENDENCIES.md` records patch 8, the three suites, sdl_zig's step
and CI jobs, all six tags, and each patch's check at a rebase.

## Verified

On macOS (arm64), in a fresh workspace on `main`:

| Gate | Result |
|---|---|
| `zig build` | 43/43 steps |
| `zig build test` | 75/75 steps |
| `zig build test-integration` | 33/33 steps, 347/347 tests |
| `zig build check-web` | 16/16 steps |
| `zig build test-sdk-version` | 12/12 steps |
| `zig build -Dtarget=x86_64-linux-gnu` | 54/54 steps (builds the
patched Wayland file) |

Not verified: a fizzy binary running on a real Ubuntu 24.04 Wayland
desktop. The evidence is the fork suite in CI containers, built from the
same sdl_zig. The SDK fingerprint doesn't move, since plugins never link
SDL.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant