Andreas Schneider

Recent Posts

Testing your software stack without root privileges using cwrap

by Jakub Hrozek and Andreas Schneider

Software testing is already a hard business. It gets even harder if you need to test software that is networked, requires custom users on the system or resolve DNS queries.

Consider software such as a file server — it needs to listen for incoming connections on a certain port, often a privileged one in case of well-known protocols. The file server also requires the ability to switch to different user accounts and act on their behalf to create files owned by these users. Finally, a client of this hypothetical file server might want predefined SRV records to be present in DNS for autodiscovery to work properly. All these cases should be tested on every build.

And it gets even harder if your unit tests can’t run as the root user to set up the environment. The use case of testing the full stack, including network, users or DNS with only regular user privileges is exactly what the project is aiming to solve.

Continue reading “Testing your software stack without root privileges using cwrap”


cmocka 1.0

The cmocka project finally released version 1.0. cmocka is a unit testing framework for C with support for mock objects.

In software development, unit testing has become a standard part of many projects. They use tools like cmocka to check some of the functionality of the source code. Unit-testing frameworks allow testing of low level functionality and ensure that all software components are working correctly and often prevent regression if you do code changes.

Continue reading “cmocka 1.0”