Older blog entries for ctrlsoft (starting at number 86)

subunit usage in Samba

Both Samba 3 and Samba 4 are now using the "subunit" protocol inside their testsuite (aka "make test"). subunit is a streaming protocol used to report test results that is aimed at being simple to generate and parse as well as being human readable.

A very simple subunit stream might look like this:

  test: samba4.tests.util.strlist.check_list_make
creating list...
list created!
success: samba4.tests.util.strlist.check_list_make
test: samba4.tests.util.strlist.check_list_make_shell
creating list...
xfail: samba4.tests.util.strlist.check_list_make_shell [
returned NT_STATUS_NOT_IMPLEMENTED
]

For those that are familiar with the TAP protocol used by Perl, it is similar to that, although it has a couple of features that TAP does not have. For example, it can report timestamps (useful for determining test duration) and has more flexible progress reporting.

Subunit is particularly useful for projects that use multiple programming languages as it allows a single tool to be used for test visualization or analysis rather than one per language. All that's required per-language is a test runner that can spit out subunit streams.

selftest.pl, the main engine behind Samba's test suite, has been using subunit internally since its creation couple of years ago. Most other test tools we use can also report subunit, in particular our Python tests, blackbox tests, Perl tests (using tap2subunit) and smbtorture.

"make test" never displays raw subunit results, it always formats them using our format-subunit script. Samba 4's "make test" stores the raw subunit output in st/subunit.

I'm attending SNIA SDC at the moment and a couple of people here have asked me about the tools I use to display and analyse test results. They are:

The subunit project contains a bunch of convenience tools for working with subunit. Other than libraries for parsing/generating subunit for several languages it contains tools for manipulating and analysing subunit streams, including:

  • subunit-ls: List all tests in a subunit stream, optionally including their run times (I used this for the test duration summary I sent to the Samba mailing list earlier)
  • tap2subunit: convert a TAP stream to a Subunit stream
  • subunit-stats: Print statistics for a subunit stream (how many successful tests, failed tests, skipped tests, etc)
  • subunit-filter: E.g. remove test result or output from a stream
  • subunit-diff: Compare two subunit streams and see what tests have started failing or are no longer failing
  • subunit2pyunit: Format a subunit stream using Python's standard unit test test result formatter

We're including the subunit tree in the Samba git tree at lib/subunit.

Tribunal is a GTK+ viewer for subunit streams. It allows for easy browsing of test results. Tribunal is still a bit rough around the edges, although it should already be useful.

Example usage:

  $ make test
$ tribunal-subunit st/subunit

Test Repository provides a database of test results which fits into developers work flow and keeps track of useful information like what tests are failing, or which failures have the same backtrace.

In particular Test Repository can re-run only the tests that failed in the previous test run:

  $ testr init
# Run the full testsuite (1 hour goes by)
$ testr run
# Run those tests from the testsuite that failed in the previous run 
# (this would be a lot shorter usually, depending on how many tests were
# failing)
$ testr run --failing

testrepository is also still in its early days, but can potentially be very useful, e.g. when comparing old test runs on the buildfarm.

Syndicated 2010-09-24 00:46:11 from Stationary Traveller

It's that time of year again

Ik ga op vakantie en neem mee:

  • Agalloch - Ashes Against the Grain
  • Aimee Mann - Lost In Space
  • Anathema - Alternative 4
  • Arch Enemy - Burning Japan
  • Blackfield_-_Blackfield
  • Camel - Coming of Age
  • Dream Theater - Black Clouds And Silver Linings
  • Evanescence - Fallen
  • Gazpacho - Tick Tock
  • Green Day - American Idiot
  • Heather Nova - Redbird
  • Isis - Wavering Radiant
  • Karnivool - Sound Awake
  • Karnivool - Themata
  • Kashmir - The Good Life
  • Mostly Autumn- Glass Shadows
  • Muse - Black Holes And Revelations
  • Orgy - Vapor Transmission
  • Redemption - Snowfall on Judgement Day
  • Red Sparowes - The Fear Is Excruciating, But Therein Lies the Answer
  • Riverside - Anno Domini
  • Sophie Ellis Bextor - Trip The Light Fantastic
  • Sylvan - Posthumous Silence
  • The Mars Volta - The Bedlam in Goliath
  • Third Eye Blind - Out Of The Vein
  • This Town Needs Guns - This Town Needs Guns
  • Threshold - Critical Mass
  • Trivium - Ascendancy
  • We Are Scientists - Barbara
  • Zero 7 - The Garden

In other words, I'm for two weeks of camping. The final destination of our annual cycling tour is either Slovenia or Croatia, in 10 stages of about 130 km each.

Syndicated 2010-07-02 13:40:00 from Stationary Traveller

Working from home

For about 6 months now I've been working for Canonical on the Soyuz component of Launchpad. Like most other engineers at Canonical I don't work at the office but from a desk at home, as our nearest office is in London, not really a distance that is feasible for a commute. I do work at regular hours during work days and stay in touch with my colleagues using IRC and voice over IP.

I did have some experience working on contracts and study assignments from home previously, but working a fulltime regular job has turned out to be a bigger challenge. It seems easy enough. No travel time, every day is casual Friday, being able to listen to obscure death metal all day without driving coworkers crazy. Awesome, right?

Well, not entirely. I can't say I wasn't warned beforehand (I was) but I still ran head-first into some of the common mistakes.

Solitude

I can work well by myself and I appreciate the occasional solitude, but it does get kinda lonely when you're physically sitting by yourself for 8 hours a day, five days a week.

Fortunately we regularly have sprints at different locations around the world and, apart from appealing to the travel junkie in me, that brings some essential face time with coworkers. Electronic communication mechanisms such as mailing lists, IRC, Skype and, more recently, mumble also help make the rest of the company feel closer, but it's still very different from being able to talk to people at the water cooler (the point of which, btw, still escapes me. What's wrong with proper cold tap water?).

What also seems to help is going into the city and meeting up with others for lunch, or even just to get groceries.

Concentration, work times

One of the nice things about working at home is that you're quite flexible in planning your days; it's possible to interrupt work to run an errand if necessary. The downside of it is that it is also really easy to get distracted, and there's something I do very well: procrastinating. I initially ended up getting distracted quite often and then would end up working into the evening to make up for that lost time. The result being that, while only spending 8 hours doing actual work, it felt like having been at work for 12 hours in the end and having lost all spare time. Or as a friend summarized it accurately: working at home is all about boundaries.

This is at least partially related to the fact that I am a compulsive multi-tasker; I always do several things at once and context-switch every minute or so (prompted by e.g. having to wait for code to compile), including checking email and responding to conversations on IRC and Google Talk. This, among other things, has the affect that I respond quite slowly in IRC/IM conversations; if you've ever chatted with me you've probably noticed it. Multi-tasking has always worked well for me, despite research suggesting otherwise, probably because software development always involves a lot of waiting (for vcses, compilers, testsuites, ...).

Recently I've tried to eliminate some more of the distractions by signing out off Skype, Empathy (Google Talk, MSN, etc) and Google reader completely and only checking email a couple of times per day.

Feeling productive

What has perhaps surprised me most of all was how essential the satisfaction of getting something done is. After spending about a day staring at Python code it's important for your mood to have accomplished *something*. This appears to be a virtuous circle, as lack of progress kills the fun of work, which kills motivation, which causes a lack of progress.

I am hard core, so during my first few months I used my lunch breaks and evenings to hack on other free software projects, triaging bug reports that had come in or reviewing patches. Despite the fact that this is indeed technically a break from Launchpad, it didn't (surprise!) seem to work as well as stepping away from hacking completely. Also, it turns out that spending 14 hours a day programming doesn't make you all that much more productive than working a couple of hours less.

What I've discovered recently is that getting at least one branch done by the end of each day, even if it's just by fixing a trivial bug, helps tremendously in giving me some sense of accomplishment. Julian also wrote a blog post with some useful hints on feeling productive a while ago.

What is your experience working from home? Any good tips?

cp: Sieges Even - Unbreakable

Syndicated 2010-06-25 12:38:00 from Stationary Traveller

Proof of concept OpenChange server working

Seeing this makes me very happy. It's taken us a couple of years to get to this point but we've finally made it, mostly thanks to the dedication and persistence of Julien and Brad.

Syndicated 2010-06-08 19:09:08 from Stationary Traveller

Input overload

During the last few months, despite filtering and thread-scoring, I'm having trouble keeping up with the continuous flood of emails that come my way. I'm now spending way too much of my time dealing with both email and other background noise (hello, web 2.0 services). To cope with this, I've now dropped off a couple dozen mailing lists, unsubscribed from a similar number of RSS feeds and left a few IRC channels. I'm slowly working working my way through the backlog of emails and merge requests that I still have to deal with. If you need me to participate in a mailing list discussion, please CC me.

cp: Agalloch - Our Fortress Is Burning, pt. 1

Syndicated 2010-03-13 23:05:19 from Stationary Traveller

Nostalgia: 10 Years of Samba Hacking

While searching for something else I happened to come across one of my first posts to the ntdom list in November 2000.

My post is a simple question about a Samba crash that I myself no doubt had introduced. I'm sure I could have found a solution to it by using Google - excuse me, AltaVista - but I still received a friendly reply from Jerry explaining me to use GDB. I'm not too embarrassed, at least I used proper punctuation and wrote somewhat comprehensible English.

It's also strange to realize it's already been almost ten years since I started hacking on the Samba project.

Syndicated 2010-02-11 04:32:00 from Stationary Traveller

Nostalgia: 10 Years of Samba Hacking

While searching for something else I happened to come across one of my first posts to the ntdom list in November 2000.

My post is a simple question about a Samba crash that I myself no doubt had introduced. I'm sure I could have found a solution to it by using Google - excuse me, AltaVista - but I still received a friendly reply from Jerry explaining me to use GDB. I'm not too embarrassed, at least I used proper punctuation and wrote somewhat comprehensible English.

It's also strange to realize it's already been almost ten years since I started hacking on the Samba project.

Syndicated 2010-02-11 01:34:00 from Stationary Traveller

Linux.Conf.Au 2010 - Day 3 - Wednesday

I went to Jonathan Corbet's yearly update of the status of the Linux kernel. He talked about the various big changes that went into the kernel over the last year as well as the development processes. The Linux kernel is probably one of the largest open source projects, and very healthy - there are a lot of individuals and companies contributing to it. With this size
comes a few interesting challenges coping with the flow of changes into Linus' tree. Their current processes seem to deal with this quite well, and don't seem to need a lot of major changes at the moment.

His talk also included the obligatory list of features that landed in the last year. The only one that really matters to me is the Nouveau driver, which I'm looking forward to trying out.

The second talk I went to in the morning was Selena Deckelmann's overview of the Open Source database landscape. She mentioned there's new projects started daily, but it was still a bit disappointing not to see TDB up there.

After lunch Rob gave a talk about Subunit, introducing to the ideas behind the Subunit protocol as well as presenting an overview of the tools that are available for it and the projects that have Subunitized as of yet. It's exciting to see the Subunit universe slowly growing, I wasn't aware of some of the projects that are using it. The recently announced
testrepository also looks interesting, even though it is still very rudimentary at the moment.

In the evening Tridge, Rusty, Andrew, Jeremy,AJ and I participated in the hackoff as the "Samba Team".

The hackoff was a lot of fun, and consisted of 6 problems, each of which involved somehow decoding the data file for the problem and extracting a short token from it in one way or another, which was required to retrieve the next problem. We managed to solve 4 problems in the hour that the organizers had allocated, and ended first because we were a bit quicker in solving the 4th problem than the runner-ups. No doubt the fact that we were the largest team had something to do with this.

I hung out with some of the awesome Git and Github developers in the Malthouse in the evening, and talked about Dulwich, Bazaar and Launchpad ("No *really*, I am not aware of any plans to add Git support to Launchpad.").

Syndicated 2010-02-04 00:06:17 from Stationary Traveller

Linux.Conf.Au 2010 - Day 2 - Tuesday

On Tuesday we had the "Launchpad" mini-conf, which featured talks from various Launchpad developers about different parts of Launchpad as well as from community members about their use of Launchpad. It wasn't necessarily about hosting projects on Launchpad, but rather about how various projects could benefit from Launchpad.

I popped out of Launchpad track for a bit to attend Andrews talk about the current status of Samba 4. He did a nice job of summarizing the events in the last year, the most of import one of course being the support for DC synchronization. I'm proud we've finally managed to pull this off - and hopefully we'll actually have a beta out next year. We have been saying "maybe next year" for almost 4 years now when people asked us for estimates of a release date.

In the afternoon I gave the talk about Launchpad code imports and code reviews that I had prepared with Aaron earlier. We had planned to give the talk together, but I unexpectedly ended up giving it by myself because of some confusion about the schedule.

Syndicated 2010-02-03 19:44:24 from Stationary Traveller

Linux.Conf.Au 2010 - Day 1

Linux.Conf.Au has a reputation for being one of the best FLOSS conferences in the world, and it more than met my (high) expectations. The last one I attended was also in New-Zealand, but further south - in Dunedin.

Day 1 - Monday

As usual there were miniconfs the first two days before the actual conference. On the first day I attended some of the talks in the Open Languages track.

mwhudson gave a talk about pypy - Python implemented in Python. He discussed the reasons for doing what they do and the progress they've made so far. Like so many of the custom Python implementations, one of the main thing that's holding them back is the lack of support for the extensions written in C for CPython.

[en.wikipedia.org/wiki/Rusty_Russell Rusty] gave a quick tutorial to talloc/ after lunch ("it's a shame K&R didn't think of this!") and explained why it's so great.

In the afternoon I caught some of the talks in the distro summit track. Both of the talks that I attended happened to be Ubuntu-related - first Dustin gave a quick introduction to the components of Launchpad, followed by a talk from Lucas about the
relationship between Ubuntu and Debian. There was a discussion afterwards about
interoperability between the various hosting sites and bug trackers. Several audience members questioned the relevance of Debian and suggested everything should just switch to Launchpad, but this seemed to be founded in ignorance. (none were actually Launchpad developers, contrary to the impression Martin seems to have).

Syndicated 2010-02-03 18:15:45 from Stationary Traveller

77 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!