me

/

vinix-ports Public
382 commits 0 issues 0 pull requests 1 contributor Discussions Projects Snippets LOC history Platform CI

Trace the indirect GLX probe through setup and readback

diviocity committed 4 days ago · 4ee175cd6737df8c5cae22a38bd9321911a90083 View patch
Unverified signature 3 files changed +18 -1
tests/x11/README.md +4 -0

@@ -128,6 +128,10 @@ The AMD64 sidecar and signed migration fixtures keep their original backing disk

128128

129129The AMD64 SATA sidecar fixture passed all six compiler checks and verified the sidecar checksum. After 5,314 seconds, its ext2 snapshot showed 5,620 more inodes than the original backing disk. QEMU reached the 5,400-second deadline during extraction. The NVMe replay verified the same backing disk's checksum and ext2 format, then booted the same volume identity. The SATA timeout evidence is in `foundation/release-mode-migration-sata-sidecar-progress-01`, receipt SHA-256 `513b0c8848a62857d0c04a3df5f12b716b8f27a0c355a8b0704006dc114921ee`.

130130

131+The AMD64 NVMe sidecar fixture completed extraction, verified the package command and passed the EGL pixel check. Xvfb answered the authenticated readiness probe before the GLX client hit its 120-second deadline. The GLX probe now logs its display, visual, context and pixel phases. The fixture allows 600 seconds for the client by default. Set `VINIX_GLX_CLIENT_TIMEOUT` to a positive integer in seconds to override it. The timeout evidence is in `foundation/release-mode-migration-amd64-sidecar-glx-timeout-01`, receipt SHA-256 `4674341340dfadd39320ba3fb48b3207077032905e8412a41dbb50b6bd5e3b0c`.

132+

133+The worker built both instrumented probes against the existing signed SDKs and verified their target interpreters, GLX library dependencies and AArch64 load-segment alignment. The signed BusyBox shells passed controls for the default timeout, an override, invalid input and a failing client. See `foundation/release-mode-migration-glx-probes-01` and `foundation/release-mode-migration-glx-timeout-test-01`, receipt SHA-256 `6767c427bfcba8e771b8709ae07cbae6b40b421fb8c69d77e301a133f5234d21` and `c41f5f5a4b95ed98fe343d0a45ff7703b13a675292a5b5646ae36b8699451ae5`.

134+

131135The migration fixture streams the package transaction to serial and keeps a copy for its hook-error check. The worker ran the fixture's logging block with the signed BusyBox shell and tee applet for each target. It observed both output streams before releasing a held package command, verified that tee preserved a failed package command's exit status, and checked that a reported hook failure stopped the fixture. See `foundation/release-mode-migration-stream-fixture-01`, receipt SHA-256 `c5aecd55f7659f68abf295bad3c8a7b86920fc2d884321e344d422433f33faf5`.

132136

133137The 2 GiB AMD64 migration guest reached the 5,400-second QEMU deadline during the GCC update. The worker read the disposable snapshot after QEMU exited. The installed binutils 2.43.1-5 and FreeGLUT 3.4.0-2 records showed PGP validation. The GCC 14.2.0-3 directory existed, but its installed record was absent and the permission migration was unverified. See `foundation/release-mode-migration-amd64-upgrade-terminal-01`, receipt SHA-256 `c66ab9af9e3c0305ba3b03fe2e6add7833da485e9b4cc8b47793dde8bf935a25`.

tests/x11/glx.v +5 -0

@@ -33,12 +33,14 @@ fn C.glReadPixels(i32, i32, i32, i32, u32, u32, voidptr)

3333fn C.glGetError() u32

3434

3535fn main() {

36+ eprintln('GLX probe: open display')

3637 display := C.XOpenDisplay(unsafe { nil })

3738 assert display != unsafe { nil }

3839 defer { C.XCloseDisplay(display) }

3940 screen := C.XDefaultScreen(display)

4041 mut attributes := [i32(C.GLX_RGBA), C.GLX_RED_SIZE, 8, C.GLX_GREEN_SIZE, 8, C.GLX_BLUE_SIZE,

4142 8, 0]!

43+ eprintln('GLX probe: select a visual')

4244 visual := C.glXChooseVisual(display, screen, &attributes[0])

4345 assert visual != unsafe { nil }

4446 defer { C.XFree(visual) }

@@ -48,16 +50,19 @@ fn main() {

4850 drawable := C.glXCreateGLXPixmap(display, visual, pixmap)

4951 assert drawable != 0

5052 defer { C.glXDestroyGLXPixmap(display, drawable) }

53+ eprintln('GLX probe: create indirect context')

5154 context := C.glXCreateContext(display, visual, unsafe { nil }, C.False)

5255 assert context != unsafe { nil }

5356 defer { C.glXDestroyContext(display, context) }

5457 assert C.glXIsDirect(display, context) == C.False

58+ eprintln('GLX probe: bind indirect context')

5559 assert C.glXMakeCurrent(display, drawable, context) != C.False

5660 defer { C.glXMakeCurrent(display, 0, unsafe { nil }) }

5761 C.glClearColor(0, 1, 0, 1)

5862 C.glClear(C.GL_COLOR_BUFFER_BIT)

5963 C.glReadBuffer(C.GL_FRONT)

6064 mut pixel := [4]u8{}

65+ eprintln('GLX probe: read pixels')

6166 C.glReadPixels(0, 0, 1, 1, C.GL_RGBA, C.GL_UNSIGNED_BYTE, &pixel[0])

6267 assert C.glGetError() == C.GL_NO_ERROR

6368 assert pixel[0] == 0 && pixel[1] == 255 && pixel[2] == 0

tests/x11/graphics.sh +9 -1

@@ -64,5 +64,13 @@ until timeout -k 5 15 xset q >/tmp/xset-glx.log 2>&1; do

64done

165

266phase=glx-client

3-LIBGL_ALWAYS_INDIRECT=1 timeout -k 5 120 /vinix-glx-check

67+client_timeout=${VINIX_GLX_CLIENT_TIMEOUT:-600}

68+case "$client_timeout" in

69+ *[!0-9]*|0*) echo 'VINIX_GLX_CLIENT_TIMEOUT must be a positive number of seconds' >&2; exit 1 ;;

70+esac

71+LIBGL_ALWAYS_INDIRECT=1 timeout -k 5 "$client_timeout" /vinix-glx-check || {

72+ status=$?

73+ echo "GLX client exited with status $status after allowing $client_timeout seconds" >&2

74+ exit "$status"

75+}

476echo 'VPAC FIXTURE GUEST PASS'