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


I have an 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…

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…

New uid_wrapper with full threading support.


Today I've released a new version of uid_wrapper (1.1.0) with full threading support. Robin Hack a colleague of mine spent a lot of time improving the code and writing tests for it. It now survives funny things like forking in a thread. We also added two missing functions and fixed several bugs. uid_wrapper is a tool to help you writing tests for your application. If you don't know uid_wrapper and wonder what you can do with it, here is an example: $ id uid=1000(asn) gid=100(users) groups=100(users),478(docker) $ LD_PRELOAD=libuid_wrapper.so UID_WRAPPER=1 UID_WRAPPER_ROOT=1 id uid=0(root) gid=0(root) groups=0(root) More details about uid_wrapper can be found on the cwrap project website, here.

resolv_wrapper 1.0.0 – the new cwrap tool


I've released a new preloadable wrapper named resolv_wrapper which can be used for nameserver redirection or DNS response faking. It can be used in testing environment to route DNS queries to a real nameserver separate from resolv.conf or fake one with simple config file. We tested it on Linux, FreeBSD and Solaris. It should work on other UNIX flavors too. You can download resolv_wrapper here.

A talk about cwrap at LinuxCon Europe


Next week is the LinuxCon Europe in Düsseldorf, Germany. I will be there and give a talk about cwrap, a set of tools to make client/server testing easy on a single machine. Testing network applications correctly is hard. This talk will demonstrate how to create a fully isolated network environment for client and server testing on a single host, complete with synthetic account information, hostname resolution, and privilege separation. I hope you will attend my talk if you are there. If you can't attend the LinuxCon Europe, but you're going to the Linux Plumbers Conference then say hello and lets talk about cwrap there! At the LinuxCon Europe I will announce new cool stuff and the website will be updated.…