tracker
All repositories: gitoria
1.3 KB
// refused-catch.mjs — mission 517 (hybriel#240). A fetch to a closed port, an unknown host// and a closed https port must each give an error `on Error` can catch, with the host:port and// the reason in the message, and the program must run on to its end.import { spawnSync } from 'node:child_process';import net from 'node:net';import path from 'node:path';import { fileURLToPath } from 'node:url';const HERE = path.dirname(fileURLToPath(import.meta.url));const ROOT = path.resolve(HERE, '../../..');const BIN = process.env.HL_BIN || path.resolve(ROOT, 'native/zig-out/bin/hybriel');// Find a port nothing listens on: bind one, note it, close it.const probe = net.createServer();await new Promise((r) => probe.listen(0, '127.0.0.1', r));const port = probe.address().port;await new Promise((r) => probe.close(r));const r = spawnSync(BIN, [path.join(HERE, 'refused_catch.hl')], {env: { ...process.env, HL_TEST_PORT: String(port) }, encoding: 'utf8', timeout: 60000,});const log = (r.stdout || '') + (r.stderr || '');const ok = r.status === 0&& log.includes(`127.0.0.1:${port}/x: connection refused`)&& log.includes('could not resolve host')&& log.includes('done 3 true true true');if (ok) { console.log('PASS refused, https refused and unknown host are caught'); process.exit(0); }console.log(`FAIL exit ${r.status}\n` + log.slice(-1500));process.exit(1);
Branches
Latest commits
- c1c4178cMerge branch 'rv39'mre
- a016e9abReapply "Merge branch 'rv39'"mre
- f29e2502log: RV39 gate fixmre
- d9fce111browser gate #26: exact frame count incl. SL1 people step (hybriel#308)mre
- ad529ac1log: m572 verdictmre
- 1b37d404RV39 on hold: hybriel#308mre
- f9127c68Revert "Merge branch 'rv39'"mre
- cd39f3d3log: hybriel#308mre
- 51341d6elog: RV39 deploy startedmre
- c9e29e06Merge branch 'rv39'mre
- 0f8d1fdclog: RV39 report, browser 387/2mre
- 50249b0bRV39: reportmre
- 10ed9581compose: HL_GC_STATS=1mre
- 955da19bRV39: re-vendor Hybriel set day39 (source 51e921d7, bin 6b481aa7)mre
- 64b8d1dclog: RV39 startedmre
- 1f2df72amission RV39mre
- 6c1936f9log+status: GC planmre
- 2846a840log: m569 result, GC hypothesismre
- b24cd2d5log: Anton on hl:fetch, mission 569mre
- 7d42cac1log+status: SL1 measured, fetch stalls remainmre