▲ 90 ▼ An (almost) catastrophic OpenZFS bug and the humans that made it (and Rust is here too) (despairlabs.com) submitted 1 year ago by ikidd@lemmy.world to c/linux@programming.dev 8 comments fedilink hide all child comments
[–] kcuf2@lemmynsfw.com 6 points 1 year ago (2 children) No unit test? permalink fedilink source hideshow 2 child comments replies: [–] FizzyOrange@programming.dev 12 points 1 year ago (1 child) The article said it pretty well: if your answer to any perceived failing in a person is “just try harder”, you are either woefully inexperienced or a just a dick That applies to writing impossibly comprehensive unit tests too. Though really for a filesystem they should really do silicon-style verification (which we're calling Deterministic System Testing now). permalink fedilink source parent hideshow 1 child comment replies: [–] kcuf2@lemmynsfw.com 0 points 1 year ago This is a pretty straightforward utility function that wouldn't be that hard to test. It's normal to have standards for code coverage as part of the review process, I don't code in C but I'd be surprised if setting any of that up is actually that burdensome. I disagree with your reference of that quote being applicable here though. In fact, adding unit tests is the exact opposite: that quote is saying 'if your answer is "make less mistakes" ....' Unit tests in general are an acceptance of the fact that we will fail to be perfect and we need to mitigate that with extra checks. The article already said it had two human reviewers, so they're not opposed to extra process to help ensure quality, unit tests are just another (actually very cheap) extra step. permalink fedilink source parent
[–] FizzyOrange@programming.dev 12 points 1 year ago (1 child) The article said it pretty well: if your answer to any perceived failing in a person is “just try harder”, you are either woefully inexperienced or a just a dick That applies to writing impossibly comprehensive unit tests too. Though really for a filesystem they should really do silicon-style verification (which we're calling Deterministic System Testing now). permalink fedilink source parent hideshow 1 child comment replies: [–] kcuf2@lemmynsfw.com 0 points 1 year ago This is a pretty straightforward utility function that wouldn't be that hard to test. It's normal to have standards for code coverage as part of the review process, I don't code in C but I'd be surprised if setting any of that up is actually that burdensome. I disagree with your reference of that quote being applicable here though. In fact, adding unit tests is the exact opposite: that quote is saying 'if your answer is "make less mistakes" ....' Unit tests in general are an acceptance of the fact that we will fail to be perfect and we need to mitigate that with extra checks. The article already said it had two human reviewers, so they're not opposed to extra process to help ensure quality, unit tests are just another (actually very cheap) extra step. permalink fedilink source parent
[–] kcuf2@lemmynsfw.com 0 points 1 year ago This is a pretty straightforward utility function that wouldn't be that hard to test. It's normal to have standards for code coverage as part of the review process, I don't code in C but I'd be surprised if setting any of that up is actually that burdensome. I disagree with your reference of that quote being applicable here though. In fact, adding unit tests is the exact opposite: that quote is saying 'if your answer is "make less mistakes" ....' Unit tests in general are an acceptance of the fact that we will fail to be perfect and we need to mitigate that with extra checks. The article already said it had two human reviewers, so they're not opposed to extra process to help ensure quality, unit tests are just another (actually very cheap) extra step. permalink fedilink source parent