streamdiff

command
v2.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2026 License: MIT Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command streamdiff is the differential for streamed execution: it records TestXSLT30Suite on a base commit, on this checkout, on this checkout with streaming switched off (GOXSLT_STREAM_OFF=1), and on this checkout with re-runs switched off (GOXSLT_STREAM_NORERUN=1), compares the first three recordings with tests/recdiff, summarises which cases ran on the streamed path, and reports the streamed error codes against the tree's.

go run ./tests/streamdiff [-floor n] [-allow file] [-output] <base-rev> <outdir>

Run it from the checkout under test. The base tree is extracted with "git archive <base-rev> | tar -x" into <outdir>/base-src, with a testdata symlink to this checkout's; all three legs read the suite through the same resolved path, so their base URIs and error paths agree. Each leg records into <outdir>/<leg> (internal/record) and logs to <outdir>/<leg>.log; the base leg, when its <outdir>/base/DONE names the same revision, is not run again. The branch and off legs always are: the checkout may have changed. The legs run one after another: the suite has cases near its per-case deadline, and three at once on one box can time them out.

It fails (exit 1) when base vs branch or branch vs off differ anywhere the allow file (default tests/streamdiff/allow.txt) does not explain, when fewer cases than the floor (-floor, else GOXSLT_STREAM_FLOOR, else defaultFloor) ran a container on the streamed path, when any guard fired, or when the off leg streamed anything. The summary comes from <outdir>/branch/streams/ xslt30.tsv, which tests/xslts writes (key, runs per strategy, fallbacks, guard hits, re-runs, the core's sNodes per kind).

With -output it also runs a fourth leg, "output", on this checkout with GOXSLT_OUTPUT_CHECK (tests/xslts/outputcheck.go): every case is run again with its principal result streamed to TransformOptions.Output, and the bytes and error compared with Result.Serialize's. It then fails when any case differs, and reports the counts over all cases and over those the branch leg streamed.

The fourth leg, "norerun", has every container that fails while streaming return its streamed error instead of running again on the tree (streamtrace.SetNoRerun). For each case where one did (its re-runs in <outdir>/norerun/streams/xslt30.tsv), the error code the judge read (streams/xslt30-verdicts.tsv, tests/xslts/record.go) is compared with the branch leg's, which is the tree's answer: the same code and verdict, another code the catalog also accepts (the case still passes), or a wrong one (it fails). The matrix is written to <outdir>/errors.tsv and summarised; it fails only when a case with no re-run moved between the two legs, which the switch must not do.

One family of errors is compared by code, not text, in the base/branch and branch/off comparisons and in the output leg: an input document's invalidity found by validating it (XTTE1510 for validation="strict", XTTE1540 for type=), whose streamed text is the first failure the stream met, marked as such, where the tree's lists every failure (streamtrace.SameError). XSLT 3.0 §2.14: "If more than one error arises, an implementation is not required to signal any errors other than the first one that it detects." For each case whose two recordings are that error with the same code, a rule accepting the case is added to the allow rules (<outdir>/<a>-vs-<b>.allow) and counted in the summary; every other error is compared in full.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL