News for hackers. Stuff that matters.
Re:Status update from the Reproducible Builds project by mabbo on Sunday July 23, 2017 @08:16PM (#14835096)
One (misguided) counter argument I've heard from otherwise fantastic devs it's the notion of adding randomness to unit tests in the hopes that if there's a bug, at least some builds will fail. In practice, I've seen those builds and developers saying "yeah, sometimes you need to build it twice".

I think the solution is to give those devs who favor such techniques a separate but easy to use fuzzing tool set that they can run just like their unit tests, separate from their usual 'build' command. Give them their ability to discover new bugs, but make it separate from the real build.

Re:Status update from the Reproducible Builds project by closeparen on Monday July 24, 2017 @03:54AM (#14836611)
Why would the randomness in unit tests affect the binary? RNGs are invoked when the tests are run, not when they're built, and anyway, test code shouldn't be part of the final binary.
Re:Status update from the Reproducible Builds project by davexunit on Monday July 24, 2017 @09:23AM (#14838190)
The test suite is used to validate the build. Intermittently failing test suite -> intermittently failing build. You can always disable running a problematic test suite, but that doesn't exactly inspire confidence in the result.
Re:Status update from the Reproducible Builds project by regularfry on Monday July 24, 2017 @04:32AM (#14836770)
My take on that is that those devs are probably fooling themselves about the state of their test suite. I'm working on a codebase like that right now - it's in generally a relatively good state, but just this week I've run into a moderately nasty bug involving global state not getting properly reset which the tests didn't cover because their specific execution order happened to work.
Re:Status update from the Reproducible Builds project by vfaronov on Monday July 24, 2017 @07:53AM (#14837667)
Or just seed the PRNG with some digest of the relevant source code (perhaps as simple as the version number). Doesn’t solve the problem that your tests can suddenly break on unrelated changes, but does solve the problem that your tests can break without any changes.
Re:Status update from the Reproducible Builds project by kobeya on Monday July 24, 2017 @04:33AM (#14836773)
Down-voted because that's not an argument against reproducible builds. The outputs can be bit-for-bit identical but still use an RNG for fuzz testing.
Re:Status update from the Reproducible Builds project by davexunit on Monday July 24, 2017 @09:22AM (#14838182)
A "build" often includes running the unit test suite to verify that the software works in the build environment, so randomness in the test suite can indeed lead to non-reproducible output: when a bad RNG seed causes a test failure and thus a failed build. I've spent my fair share of time debugging issues like this.
Re:Status update from the Reproducible Builds project by kobeya on Monday July 24, 2017 @10:28AM (#14838710)
Use a PRNG seeded with the hash of the build manifest.
Re:Status update from the Reproducible Builds project by davexunit on Monday July 24, 2017 @11:12AM (#14839082)
I don't know what a build manifest is but yeah, that sounds great. However, the test suite needs to support this. Plenty of times they do not.
Re:Status update from the Reproducible Builds project by sitkack on Sunday July 23, 2017 @08:29PM (#14835151)
Non-determinism should be on a leaf of the DAG.