Files
gex/test/gl/map-buffer.test.js
velzie 4e9e1d2738 test: the native, GL, snapshot and x86 program one-offs in run.mjs
gl: map-buffer, withheld, matrix-shadow and one-library on the node host
against the host's Mesa (hostgl.mjs builds the guest GL once per work
directory). snapshot: a group of its own (snapshot and restores; its
wineserver from wine/dist.sh's new WINE64_SERVER). x86-programs: the
static musl programs natively (t1, fjit, cgen) and in the page, and the
glibc ones. native: bigpie, cgen-max-insns, elf-prov, elf-units-remap
(x86-64 and i386), lockstep, wasm32 and wasm64. gexcc: noplace-floor,
guest-i386, unitcache-fork, xcache and node-child. page: fjit-slot-oob.
threads-many wants more than its first round's 100 threads on the page,
not 200: how many more the page starts depends on the host's load.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_e0aa53aa95eb4b86910519b4d14812a5
(cherry picked from commit 635af594bf6f4bb01091f386b824c50b65c76de5)
2026-11-05 20:28:36 -05:00

23 lines
1.1 KiB
JavaScript

// glMapBufferRange's contents rules (fixtures/programs/gl-map-buffer-probe.c),
// natively: the probe passes on the host's Mesa first, then under gexc --gl
// against the guest GL; the 64 MiB ASTC upload, tried twice, is reported
// once ("gexgl: dropped opcode").
import { tail } from '../lib/native.mjs';
import { hostGl } from './hostgl.mjs';
export const meta = { hosts: ['node'], arches: ['x86'], timeout: 900 };
const WANT = 'SUMMARY cases=15 passed=15 failed=0';
export default async function (t) {
const h = await hostGl(t);
const probe = await h.probe('gl-map-buffer-probe', ['-lEGL', '-lGL']);
const n = await h.native(probe);
if (!n.stdout.includes(WANT)) return t.check('the probe passes on the host\'s Mesa', false, tail(n.stdout + n.stderr));
const g = await h.gex(probe, { env: { GEXGL_PROBE_VMDATA: '1' } });
t.check(`gexc --gl: ${WANT}`, g.stdout.includes(WANT), `exit ${g.code}: ${tail(g.stdout)} ${tail(g.stderr)}`);
const dropped = (g.stderr.match(/gexgl: dropped opcode/g) ?? []).length;
t.eq('one "dropped opcode" line', dropped, 1, g.stderr.split('\n').filter((l) => l.includes('gexgl:')).slice(0, 6).join(' / '));
h.n.clean();
}