News for hackers. Stuff that matters.
Re:10 years ago, someone wrote a test for servo that include... by SkyBelow on Monday April 20, 2026 @02:05PM (#47838245)
Can't one get randomness and determinism at the same time? Randomly generate the data, but do so when building the test, not when running the test. This way something that fails will consistently fail, but you also have better chances of finding the missed edge cases that humans would overlook. Seeded randomness might also be great, as it is far cleaner to generate and expand/update/redo, but still deterministic when it comes time to debug an issue.
Re:10 years ago, someone wrote a test for servo that include... by tomjakubowski on Monday April 20, 2026 @04:19PM (#47839960)
Most test frameworks I have seen that support non-determinism in some way print the random seed at the start of the run, and let you specify the seed when you run the tests yourself. It's a good practice for precisely the reasons you wrote.
Re:10 years ago, someone wrote a test for servo that include... by CoastalCoder on Tuesday April 21, 2026 @11:29AM (#47850210)
Absolutely for things like (pseudo) random-number streams.

Some tests can be at the mercy of details that are hard to control, e.g. thread scheduling, thermal-based CPU throttling, or memory pressure from other activity on the system