Skip to content

Add an endurance soak for signed requests - #112

Open
beetlebugorg wants to merge 1 commit into
mainfrom
soak/endurance-harness
Open

Add an endurance soak for signed requests#112
beetlebugorg wants to merge 1 commit into
mainfrom
soak/endurance-harness

Conversation

@beetlebugorg

Copy link
Copy Markdown
Owner

What

test/endurance/ drives signed /dims3/, /dims4/, and /dims5/ requests at the production image for hours, and compares each response against the result the request requires. A seeded generator picks the endpoint, the source, a chain of one to six operations, every argument, the query, and one of fifteen mutations applied after signing. The same seed sends the same requests. Three modes share the client: soak runs the production image, asan runs a sanitizer build, and valgrind accounts for leaks.

corpus.sh builds the sources. The bulk is govdocs1 archives from digitalcorpora, a thousand real files each, most of them not images: PDF, PostScript, Office, HTML, and text. A Wikimedia Commons top-up adds PNG, TIFF, WebP, SVG, and animated GIF. Local re-encodings and a generated hostile set complete it. Each file is classified by a decode through the toolchain ImageMagick, read from a stream the way the module reads a fetched source, so the manifest holds the expected result for each one.

The corpus and every run artifact are ignored by git. make test does not run any of this.

Why

The golden files record what the module returns for a fixed set of requests. Nothing measured what it does over millions of varied ones.

A three hour run sent 266,334 requests. No crash, no OOM kill, and no tampered request served. It reported 386 failures, 0.145%, in four classes. The largest is a crop rectangle outside the image, which answers 500.

Verify

bash test/endurance/corpus.sh
DURATION=600 bash test/endurance/run.sh

The report names the seed and the failure counts. A pass has zero crashes, zero OOM kills, and zero tampered requests served. The exit status is zero.

make test still passes, 271 of 271.

- Generate signed /dims3/, /dims4/, and /dims5/ requests from a seed.
- Compare each response against the result the generator requires.
- Build a corpus of real files from govdocs1 and Wikimedia Commons.
- Run the production image under a CPU and memory limit.
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