Re: [PATCH] Re: Move of input drivers, some word needed from you

From: Eric S. Raymond (esr@thyrsus.com)
Date: Tue Aug 22 2000 - 11:19:39 EST


Linus Torvalds <torvalds@transmeta.com>:
> It is NOT true that "shared code means less bugs". People, wake up!

You've ignored what I see as Rogier's main point. It's not "shared
code means less bugs" per se, it's "shared code means better test
coverage".

Think of each user as testing testing a semi-random sample of the
driver's state space for correctness. Then coverage on each line of
driver code is proportional to the number of users per driver.

Sharing code is a way to increase the test population for the shared
parts, which increases expected test coverage on the shared parts,
which is good. It's especially good because the shared parts tend
to have subtler bug signatures than the unshared parts (data structure
corruption is harder to diagnose than a device lockup), so the better
test coverage happens exactly where it's most needed.

Clean APIs also reduce bugs, of course, but that effect is orthogonal
to the one Rogier was trying to describe. IMHO, we should strive for
both.

-- 
		<a href="http://www.tuxedo.org/~esr/">Eric S. Raymond</a>

"...quemadmodum gladius neminem occidit, occidentis telum est." [...a sword never kills anybody; it's a tool in the killer's hand.] -- (Lucius Annaeus) Seneca "the Younger" (ca. 4 BC-65 AD), - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Aug 23 2000 - 21:00:07 EST