On 02 Sep 2007 00:08:57 +0200, Andi Kleen <[EMAIL PROTECTED]> wrote: > BTW string functions are best tested in user space. That's > a relatively bad example.
in theory, maybe ... in reality, i really dont think so the string implementations are spread out over the kernel ... there's implementations in lib/, include/asm-*/, and arch/*/lib/ ... so any test code that would use these sources is going to be an ugly hack to make sure it grabs all the right pieces from all the right places. then there's the issue of API ... compiling code that is designed to be in the kernel and nowhere else is going to require a mighty bit of crappy glue logic in order for it to compile properly in userspace but let's cheat and just use the kernel build system to produce .o's for us ... then there's the issue of ABI. there is no guarantee the ABI the kernel uses internally is the same as the ABI userspace uses (and in fact, on some architectures it is simply not possible). so you're left with a solution that may work for some, but not for others. or we put one common piece of C test code right into the kernel and be done. no worrying about the tested API/ABI/environment being different from the actual runtime the kernel itself has. -mike - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/