Using AMD Open Source and the amdgpu-pro OpenCL driver for image processing


I have a AMD grahpics card and use the great Open Source driver which comes with my Linux distribution. However for image processing I want the OpenCL support of my graphics card. Currently that's only provided by the amdgpu-pro driver. However it is possible to just extract the files needed for OpenCL and use them. Here is how to do this: Go to https://support.amd.com/en-us/download Select Desktop Graphics Select your product family: e.g. RX series Select your produt e.g. RX 4xx Choose a platform, SLED or RHEL and download the package Extracting For extracting the required libraries, I use Midnight Commander (mc). You can use them to browse the RPMs. From the following RPM you need to copy the mentioned libraries…

Samba 4.7.0 (Samba AD for the Enterprise)


Enterprise distributions like Red Hat or SUSE are required to ship with MIT Kerberos. The reason is that several institutions or governments have a hard requirement for a special Kerberos implementation. It is the reason why the distributions by these vendors (Fedora, RHEL, openSUSE, SLES) only package Samba FS and not the AD component. To get Samba AD into RHEL some day it was clear, that we need to port it to MIT Kerberos. In 2013 we started to think about this. The question which arise first was: How do we run the tests if we port to MIT Kerberos? We want to start the krb5kdc daemon. This was more or less the birth of the cwrap project! Think of…

Microsoft Catalog Files and Digital Signatures decoded


TL;DR: Parse and print .cat files: parsemscat Introduction Günther Deschner and myself are looking into the new Microsoft Printing Protocol [MS-PAR]. Printing always means you have to deal with drivers. Microsoft package-aware v3 print drivers and v4 print drivers contain Microsoft Catalog files. A Catalog file (.cat) is a digitally-signed file. To be more precise it is a PKCS7 certificate with embedded data. Before I started to look into the problem understanding them I've searched the web, if someone already decoded them. I found a post by Richard Hughes: Building a better catalog file. Richard described some of the things we already discovered and some new details. It looks like he gave up when it came down to understand the…

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 initial data to test cases A will_return_maybe() function for ignoring mock returns Subtests for groups using TAP output Support to write multiple XML output files if you have several groups in a test and improved documentation We have some more features we are working on. I hope it will not take such a long time…

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 module you can use the pamtest library we have implemented. It simplifies testing of modules. You can combine it with the cmocka unit testing framework or you can use the provided Python bindings to write tests for your module in Python. Jakub and I have written an article for LWN.net to provide more details how…

libssh is running in the Matrix now


Since I joined the libssh project we started to write tests to find regression and make development easier. This has been achieved using the a unit testing framework called cmocka which I maintain and develop. The problem is that to run these tests you need to modify the sshd configuration and setup a test user so that the tests can be successfully executed. This is something contributors normally don't do so we need to rely on our testing infrastructure. In 2013 I've started the cwrap project. cwrap is a set of tool to make full network server/client testing made easy. These tools are used to make it possible to run the Samba Testsuite easily on every machine without setting anything…

Hunting down a fd closing bug in Samba


In Samba I had a failing test suite. I have nss_wrapper compiled with debug messages turned on, so it showed me the following line: NWRAP_ERROR(23052) - nwrap_he_parse_line: 3 Invalid line[TDB]: 'DB' The file should parse a hosts file like /etc/hosts, but the debug line showed that it tried to parse a TDB (Trivial Database) file, Samba database backend. I've started to investigate it and wondered what was going on. This morning I called Michael Adam and we looked into the issue together. It was obvious that something closed the file descriptor for the hosts file of nss_wrapper and the samba binary opend a different file getting the same fd number assigned. The big question was, what the heck closes the…

cmocka 1.0


At the beginning of February I attended devconf.cz in Brno and the days before I had a hack week with Jakub Hrozek on cmocka. cmocka is a unit testing framework for C with support for mock objects. We already rewrote the test runner last year and it was time to finish it and add support for several different message output formats. You are able to switch between cmocka standard output, Subunit, Test Anything Protocol and jUnit XML reports. In addition we we have a skip() function and test_realloc() to detect buffer overflows and memory leaks now. You can find all other required information on the overhauled shiny new website: http://cmocka.org