Dariusz on Software Quality

27/07/2010

Where’s JUnit for C++?

Filed under: en — Tags: , — dariusz.cieslak @

Recently I started new project targetting STB (set top boxes). STB is a networking device (Ethernet based) that allows you to watch (record in some cases) HD films on your TV screen. I have no TV device in home (who cares TV if Internet is availabe?), but it’s interesting to see the direction where current TV devices will go in near future.

Anyway, the most important difference to previous projects is “new” language: no more Java, no more Python, it’s C++. You can find few C++ projects I published on SourceForge, but they’re created >5 years old now, so I can use “new” word here ;-) . The first thought of old Test Driven Design fan when creating development environment was: whre’s JUnit for C++?

(more…)

08/07/2010

Writable, shared directory structure under Unix/Linux

Filed under: en — Tags: — dariusz.cieslak @

Sometimes you need to make some directories available (R/W mode) to a group of developers on a Linux / Unix server. Using shell tools make this task very easy.

First, ensure all files group are switched to desired group:

find . ! -group group1 -exec chgrp group1 '{}' \;

Then +s (sticky) bit must be attached to directories to ensure group will be preserved in newly created directories:

find . -type d ! -perm -g=s -exec chmod g+s '{}' \;

Then writeability for the group should be set:

find . -type d ! -perm -g=w -exec chmod g+w '{}' \;

And finally some users must be added to the group:

adduser user1 group1

Additionally you have to set default umask to 0002 (only o+w filtered out). It’s done by installing libpam-umask and adding to /etc/pam.d/common-session:

session    optional     pam_umask.so umask=002

That’s all.

Powered by WordPress