[HN Gopher] How the GNU coreutils are tested
___________________________________________________________________
How the GNU coreutils are tested
Author : pcr910303
Score : 167 points
Date : 2021-12-06 13:00 UTC (10 hours ago)
(HTM) web link (www.pixelbeat.org)
(TXT) w3m dump (www.pixelbeat.org)
| CraigJPerry wrote:
| I read this page and i'm reminded of this tweet:
| https://twitter.com/6thgrade4ever/status/1433519577892327424
|
| It's not true that just because a product is open source, it will
| be of good quality. I don't have enough knowledge to say the
| following is true or that i'm not just suffering confirmation
| bias but it does appear to be true that at the extremes, the best
| quality software delivery processes are from open source
| projects.
|
| I would shoot holes in my own argument by pointing out specific
| projects from NASA.
| mistrial9 wrote:
| one of the GNU CoreUtils maintainers was/is a retired physics
| guy with serious health problems.. no income or recognition
| from the project IIR
| rectang wrote:
| Open Source provides a way for some authors to publish software
| optimized for quality, rather than optimized for profitability
| of a commercial entity.
|
| Back in the day physical products might have amazing
| engineering that in fact undermined profitability because
| products were designed to last forever. Nowadays product
| designs need to incorporate planned obsolescence instead,
| optimizing for profitability by ensuring that products break
| down in a timely manner and encourage repurchasing.
|
| Open Source _can_ provide an escape from such pressures.
| Releases can deliver features only _when they are ready_ , not
| when marketing needs them.
|
| Open Source doesn't guarantee that will happen, because
| companies can still publish half-baked products under Open
| Source licenses (Firebase SDK anyone?). But for Open Source
| projects governed by individuals or by stakeholder communities,
| it's at least possible to optimize for quality.
| Jiro wrote:
| >Open Source provides a way for some authors to publish
| software optimized for quality
|
| This is literally true because of the word "some" in there.
| But if you mean that it _especially_ leads to quality, rather
| than just "some quality happens", open source programs are
| notably deficient in many ways. Programmers don't like
| writing and don't need documentation for their own program;
| are familiar with the program's functions so they don't need
| a good UI; and they have different needs from average users,
| so their programs may not meet those users' needs very well.
| Whether you want to call that quality is, I suppose, up to
| you.
| rectang wrote:
| Yes, I was very deliberately not generalizing to all of
| Open Source. I was exploring these assertions:
|
| > _It 's not true that just because a product is open
| source, it will be of good quality._
|
| > _[...] it does appear to be true that at the extremes,
| the best quality software delivery processes are from open
| source projects._
|
| To turn around your argument, I think your generalizations
| about "programmers" are too pessimistic. Many of the best
| Open Source authors enjoy designing good user interfaces
| and writing good documentation because they want to make
| something awesome and beautiful. And commercial entities
| generally won't/can't give software developers free reign
| to do that because of marketplace pressures to optimize for
| profitability and value (which are awesome and beautiful in
| a different way).
| teddyh wrote:
| Less than three weeks before that tweet, this was made:
| https://xkcd.com/2347/
| nathell wrote:
| We need more of these ,,How project X is tested" articles. Keep
| them coming!
|
| Here's one on SQLite: https://www.sqlite.org/testing.html
| asicsp wrote:
| "Testing Firefox more efficiently with machine learning":
| https://hacks.mozilla.org/2020/07/testing-firefox-more-effic...
| mbildner wrote:
| This feels like a passion project site idea
| AlexDenisov wrote:
| I started building exactly this some years ago, but
| eventually stopped for some reason
| https://systemundertest.org
| pmezard wrote:
| TIL /dev/full
|
| https://en.wikipedia.org/wiki//dev/full
| rectang wrote:
| That's awesome.
|
| I've had to resort to grotesque hacks before to simulate full
| disks in test suites -- e.g. replacing a file descriptor with
| a nonsense number to trigger an error at the call site where
| a write would have failed.
|
| Now that I know /dev/full exists, I can write a test which,
| although it works only on a subset of operating systems,
| still exercises a code path which applies to all of them.
| stevenhuang wrote:
| Off topic, but why do people quote things like ,,'' this?
| donut wrote:
| https://en.wikipedia.org/wiki/Quotation_mark#German
| almaember wrote:
| Also Hungarian, and a bunch of other languages in the
| general are AFAIK
| AlexDenisov wrote:
| I have a "series" of articles from a few years ago covering
| FreeBSD, LLVM, and GNU Make
| (https://lowlevelbits.org/categories/system-under-test/) and
| even created a separate website with a few more articles
| https://systemundertest.org, but stopped later.
| JTbane wrote:
| SQLite is such an amazing piece of software. Public domain,
| amazing testing, as well as being so lightweight and efficient.
| It's a breath of fresh air in a bloated software world.
| Dangsucks2 wrote:
| kys dang
| Dangsucks2 wrote:
| Unfortunately SQLite was developed by a religious extremist
| for use on war ships. (Try to reconcile those two facts...)
| RicoElectrico wrote:
| Religious (source header comments) and warships (General
| Dynamics) sure, but an extremist?
| Dangsucks2 wrote:
| I mean, he killed people...
|
| Don't know why I'm being down voted for facts. See my
| username. HN is a disgusting echo chamber.
| Decabytes wrote:
| I'm looking forward to the improvements to the ergonomics of
| testing as programming languages mature. For example I really
| like how Rust has allowed the integration of runnable code into
| the docstrings of functions to combat documentation being out of
| date with the current iteration of the function.
|
| Ultimately though, I believe any amount of testing that can be
| pushed into the compiler/virtualmachine of the language is the
| most effective. I've learned that people (myself included) don't
| always code as robustly as they could (either through
| inexperience, negligence, time/market constraints etc). I can't
| count how many times I've told myself, I'll go back and write a
| test for this later.
| rectang wrote:
| Rust's implementation of doc tests and its integration of doc
| tests into standard workflows is praiseworthy. At the same
| time, we need to acknowledge that doc tests were pioneered
| elsewhere and have existed in many other languages for a long
| time.
|
| Like many things in Rust, the innovation is not so much at the
| computer science conceptual level, but in designing
| institutions, communities, and processes that allow for
| integrating the best ideas in a controlled manner.
| rasengan wrote:
| Other discussion where this appeared regarding the rust rewrite
|
| https://news.ycombinator.com/item?id=29456115
| ufo wrote:
| Maybe my brain cells are slow today but even after reading a
| bunch of times I can't understand what's the point of the
| returns_ helper function. Could someone kindly give an
| explanation for dummies?
| ttyprintk wrote:
| Older discussion:
|
| https://news.ycombinator.com/item?id=18034265
___________________________________________________________________
(page generated 2021-12-06 23:01 UTC)