User: Password:
|
|
Subscribe / Log in / New account

Are there any unit tests for this?

Are there any unit tests for this?

Posted Jun 10, 2010 9:25 UTC (Thu) by walles (guest, #954)
Parent article: Another OOM killer rewrite

I don't know what kind of unit testing frameworks are in place in the kernel, but the OOMK's victim selection process sounds like something that should be *really* suitable for unit testing.

With unit testing in place bug reports could be converted into unit tests ("on a system with these processes using these amounts of memory, don't start with KDE") and be run on future generations of OOMKs as well.

What kind of unit testing frameworks *are* available in the kernel?


(Log in to post comments)

Are there any unit tests for this?

Posted Jun 10, 2010 18:37 UTC (Thu) by bronson (subscriber, #4806) [Link]

Not quite sure what you're picturing as the unit that would be tested in this case...?

Are there any unit tests for this?

Posted Jun 11, 2010 14:15 UTC (Fri) by walles (guest, #954) [Link]

The unit that would be nice to have tests for would be whatever it is that:
* takes as input the system state
* outputs the PID to kill first.

Regards /Johan

Are there any unit tests for this?

Posted Jun 12, 2010 17:42 UTC (Sat) by bronson (subscriber, #4806) [Link]

* outputs the PID to kill first.

Sounds good.

* takes as input the system state

Is that all? :) Still having a hard time picturing a discrete unit to test here.

Are there any unit tests for this?

Posted Jun 13, 2010 23:22 UTC (Sun) by Oddscurity (subscriber, #46851) [Link]

I'm thinking the unit to be tested suggested by GP is the aforementioned badness() function.


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds