Is there any environment for running unit tests on Apache C modules?

I am going to make some changes to the existing Apache C module to fix some possible security flaws and common bad methods. However, the functionality of the code should remain unchanged (unless the bug is fixed). It seems to be in standard regression testing. I would like to know if anyone knows of a good way to re-run some regression tests. I think it's kind of using C-Unit , but with all the connections to the APR and Apache state structures, I was wondering if there is a good way to test this. Are there any pre-built frameworks that can be used with a C-module, for example?

thanks

Peter

+5
source share
2 answers

I thought about this for a while, but I thought that someone else might come up with a better answer, because mine is rather unsatisfactory: no, I don’t know any such unit testing system.

I find it best to try and reorganize your C module so that its dependencies on the httpd code base are contained in a very thin layer of glue. I would not worry too much about APR dependencies, which could easily be related to your unit test code. This is similar to using a query record, which you should try to abstract a bit.

, - , . .

, , - , ( ), .. .

, , , , , - . , , , - , , , .

+7

, , , . wiki, ,

http://cutest.sourceforge.net/

apache portable c. .

+1

All Articles