Tagged: unit testing

0

A new cmocka release version 1.1.0

It took more than a year but finally Jakub and I released a new version of cmocka today. If you don’t know it yet, cmocka is a unit testing framework for C with support for mock objects! We set the version number to 1.1.0 because we have some new features: Support to catch multiple exceptions Support to verify call ordering (for mocking) Support to pass...

0

Testing PAM modules and PAM-aware applications in the Matrix

Jakub Hrozek and I are proud to announce the first release of pam_wrapper. This tool allows you to either simplify testing PAM modules or your application using PAM to authenticate users. PAM (Pluggable Authentication Modules) is a layer of abstraction on top of Unix authentication. For testing PAM-aware applications we have written a simple PAM module called pam_matrix. If you plan to test a PAM...

0

Group support for cmocka

Last Friday I’ve released cmocka 0.4.0. It has several bugfixes and at least two new features. One is support for groups. This means you can define a setup and teardown function for a group of unit tests. I think some people have been waiting for this. You can find an example here. It is simple and easy to use. The other small feature is a...

1

Unit testing with mock objects in C

The article Jakub Hrozek and I wrote for Linux Weekly News (LWN.net) about CMocka and using mock objects is available to the public now. You can find it here: Unit testing with mock objects in C cmocka is a unit testing framework for C with support for mock objects. It is used by several Free Software projects like libssh, csync, SSSD or Elasto Cloud. If...

27

cmocka – a unit testing framework for C

I’m a big fan of unit testing frameworks. When I developed csync, a bidirectional file synchronizer, I used check to write unit tests from the start. check was ok, but it were running valgrind on your testcases to find memleaks in your code the mode reports were about check. So I needed to add valgrind suppressions to get rid of them. When I started to...