All posts

11 posts

Testing

Fuzzers, end-to-end tests, and tests that could not fail.

  1. 9 min readTesting, Sessions

    The daemon sent a client an older state after a newer one

    A flaky tuios test turned out to be the daemon delivering session state out of order. The first fix ordered by the state Version, and the review found the one kind of change that never moves the Version. The second fix counts every change.

  2. 7 min readRendering, Testing

    One fuzz failure was the test, one was the emulator

    Two fuzz targets failed in tuios on the same evening. The kitty graphics target had an oracle that an allocator change left behind, and my first fix made it too lenient. FuzzModel found a real bug, a cut-off UTF-8 rune that ate the escape after it.

  3. 7 min readTesting

    Three flaky tests, and what they were hiding

    Nine tests failed now and then on CI in the last days of September. Two were product bugs, and the work turned up a third. A hook that waited on itself, a broken pipe that should have been an error, and a command line the shell echoed twice.

  4. 8 min readTesting

    A window named db

    An end-to-end test lost an agent's state about twice in a hundred runs. It was not a race. The pane was named db, db is hex, and -w tried a window id prefix before an exact name.

  5. 8 min readTesting

    Tests that could not fail

    A resize fuzzer whose only screen check sat behind a constant false, a palette test that measured the length of a fixed-size array, and a pinned repro that lost one byte to encoding/json. All three were green, and none of them could go red.

  6. 9 min readTesting

    Deleting two thirds of the unit tests, then putting a third back

    In one day I cut the tuios unit tests from 4,239 to 1,470 under a strict rule, then restored 1,395 of them. The rule asked what kind of test it was. The review asked whether a bug gets past the E2E suite without it.

  7. 10 min readTesting

    Nothing failed, so nothing was fixed

    A whole-codebase audit of tuios found a flag nothing set, an interface with one implementation behind 140 call sites, and copies of code that had quietly drifted apart. Dead code survives because nothing fails when it is wrong.

  8. 7 min readTesting

    The fuzzer that found nothing, and the two questions that found everything

    590,000 fuzz runs against the tuios terminal emulator found nothing, because they checked that the screen was well formed, not that it was right. Two properties that compare the emulator with itself found two real bugs.

  9. 6 min readRendering, Testing

    My differential tests passed and the screen was pink

    A style cache keyed by recycled libghostty-vt style IDs painted ls output hot pink, and a differential test suite that compared once, at the end, missed it.

  10. 8 min readTesting

    The daemon said yes to an option that did not exist

    Driving the tuios control socket the way a program would found a command that lost its spaces, a parameter that was silently dropped, and 88 settings of which six applied live.

  11. 8 min readTesting

    My fuzzer was optimising for my own bug

    A flaky TUI fuzz suite came down to a PTY line discipline I never configured, and a shrinker that minimised straight toward the race.