3 ms·
Ohh, that is clever - unless someone writes a test for these two new lines, and finds that they never return -EINVAL.
by AnimalMuppet 3y ago
Ohh, that is clever - unless someone writes a test for these two new lines, and finds that they never return -EINVAL.
- TheJoeMan 3y agoMaybe the unit tests should test that the variables you intend to "not touch" do not in fact change. So record UID before and after the function. When I'm writing critical code like this, one gets a tingly feeling when typing in that variable name.
- marssaxman 3y agoDid unit tests exist in 2003? I don't clearly remember when that idea came along, but comprehensive unit testing certainly was not standard practice 20 years ago... not in any organization I knew about at the time, anyway!
- usr1106 3y agoI believe unit tests existed. I had a test training in 2000 and things were pretty systematic already then. Not 100% sure whether the exact term was used then. Edit: JUnit is from 1997. So the name was definitely in use in 2003. I attended a TDD tutorial before 2004 (don't remember the exact year). CI wasn't a thing yet, so you executed your unit tests manually. /edit Do unit tests exist in the kernel today? There is some (or some would say a lot) of automatic testing for the kernel, but I don't remember seeing a single unit test.