Re: Kernel testing

Paul H. Hargrove (hargrove@sccm.Stanford.EDU)
Mon, 14 Apr 1997 15:36:02 -0700 (PDT)

Seth M. Landsman writes:
> Third, what about the module facility for testing? i.e., person
> builds a new kernel. Person's old kernel has module support. Can we have
> the old kernel load up bits and pieces of the new kernel for testing
> purposes?

Along the lines of the user-space kernel tester, how about user-space
testing of filesystem module. Since a module is just an object file
the module authors should be able to write a test program which would
dynamically link the module and test out all the known corner
conditions and generally try to break it. This wouldn't really be
able to reproduce race conditions, but would be great for testing
error recovery.

The biggest part seems to be making user-space versions of all the
kernel functions the module wants to call. Since many of the modules
call the same kernel functions it would make sense to have a library
to do user space emulation of things like bread(), so each filesystem
author wouldn't have to reinvent the wheel.

I don't see this really working for hardware drivers, however. The
emulated hardware would inevitably be based on the driver and not
emulate any of the hardware's undiscovered bugs.

Paul H. Hargrove                   All material not otherwise attributed         is the opinion of the author or a typo.