unix-thrust / beurk

BEURK Experimental Unix RootKit
GNU General Public License v3.0
362 stars 94 forks source link

Internal API unit-testing #37

Closed ghost closed 9 years ago

ghost commented 9 years ago

PRs can't merge without passing Travis tests, so we need this before anything else (We are not passing since 6607913b66).

ghost commented 9 years ago

Not everything is done yet.

ghost commented 9 years ago

There's one thing I wonder. Since hooks are calling the API or the real function, is it really necessary to verify every hook? (Especially since we can't really test all the stat flavors on the same architecture).

nil0x42 commented 9 years ago

we must be able to detect any potential regression, event is we do some big internal api modifications. this way we'll be able to at least assert that all hooks and internal api functions are at least callable.

therefore, keep in mind that thos unit tests do not intend to test EVERYTING, we just need to be sure that all calls are currently working.

do not try to get a 100% code coverage for now, just do stupid calls, and we will be able to improve them if needed later, thanks to coveralls which will keep a track of covered lines.

ghost commented 9 years ago

@nil0x42 : It's not about coverage. It's just that when compiling, we only get one of the 4 flavors of stat/lstat, and only one of the two readdir/fopen.

I'll only test the internal API. But I need you on the drop_shell_backdoor() test.