Skip to content
Advertisement

Tag: mocking

How to Mock Linux System Calls in C

When writing C modules that use linux system calls, what is the best practice to mock those calls in order to test the module? Are there maybe any libraries that offer mocks for linux system calls? “my-module.h” – The interface description “my-module.c” – The module to test. “my-module.test.cpp” – The unit test the way I would expect this to work

Advertisement