Author: Andreas Schneider

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...

0

cmocka 0.3.0

I’ve just released a new version of cmocka. cmocka is a unit testing framework for C with support for mock objects. Jakub and I finished the API documentation and added two new useful macros mock_type(#type) and mock_type_ptr(#type). The rest is some small bugfixes and a pkgconfig file. You can download it here.

13

Writing and reading code

You’ve probably heard that a developer of an established software project writes an average of 100 lines of code (loc) a day. I can say that this applies to me. So if you write 100 loc per day, how many do you read? I would estimate that the amount of time you spend on reading and understanding code is significantly more than on writing code....

10

vim modelines in git config

I’m working on different Open Source projects and most of them have different coding style guidelines. Mostly spaces or tabs or different tabwidth. The easiest thing would be to store these information in the git config of the project. So here is a easy and secure way to have modelines in the git config. So first I set the modelines (here for the Samba project):...

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...

0

Finally it is out, Samba 4.0.0!

We just released version 4.0.0 of Samba. About 10 years in development this is a huge milestone. It is the first version that can be a domain controller in an Active Directory domain!

6

Understanding Winbind

I recently fixed a bug resolving Domain Local groups in Winbind. I was asked how to reproduce it with a more complex setup, so I had to dig through the Winbind code to understand everything in more detail. I have documented my findings here, in order to retain what I’ve learned and to help others understand how Winbind works. The Setup We have a forest...

9

How to create a SuplRootCert for supl.google.com

Back to these bad GPS fixes for Android spread all over the net. This time I will describe how to find out which is the correct SSL root certificate you need and how to create it. So first we need know the root certificate the Google SUPL server has been signed. There are several ways but we use the easiest. Connect with the openssl binary...

13

Android, CyanogenMod and the GPS fix

There are a lot of people around providing gps fixes for Android. Most of them don’t really help at all. I want to explain here what variables the code recognizes and what they do. The other thing is SuplCert which is the certificate to verify the ssl connection for the supl server. Most of the time poeple provide the wrong certificate. gps.conf There are two...

25

CyanogenMod 9 for HTC Wildfire S (ALPHA3)

Maybe you already know that I worked since January 2012 on porting CM9 to the HTC Wildfire S (Marvel). It took quite a while to figure out how Android is working and how to get the the OS correctly talking with the hardware. Today I’ve released ALPHA3 of my work which is a pretty stable version. The Wildfire S is not a supported Android 4.0...