Hacker News new | past | comments | ask | show | jobs | submit login

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





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.


You can also create a tiny filesystem in a file, set root user reservation to 100%, mount the file with `-o loop`. That should give you a "real" full device.


I typically use LD_PRELOAD hacks to simulate failure conditions. That way you can get deeper into your code than simply something that always fails.


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.


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.


[flagged]


Religious (source header comments) and warships (General Dynamics) sure, but an extremist?


"Testing Firefox more efficiently with machine learning": https://hacks.mozilla.org/2020/07/testing-firefox-more-effic...


This feels like a passion project site idea


I started building exactly this some years ago, but eventually stopped for some reason https://systemundertest.org


Off topic, but why do people quote things like ,,'' this?



Also Hungarian, and a bunch of other languages in the general are AFAIK




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: