Tapper - a test infrastructure

AMD released Tapper to github and CPAN, a test infrastructure for all aspects of testing including Operating Systems and Virtualization. It provides independent layers to adapt to different levels of QA requirements, from simple tracking and presenting test results to complete automation of machine pools multiplexing complex virtualization use-cases with detailed data evaluation.

Tapper includes:

  • Automation
  • Machine Scheduling
  • Command line utilities
  • Web Frontend application
  • Support for writing tests
  • Powerful result evaluation API
  • Testplan support with TaskJuggler

Technologies used:

  • Test Anything Protocol (TAP)
  • Core system written in Perl and CPAN
  • DB independent, developed on MySQL and SQLite
  • Language agnostic testing (e.g. Perl/Python/Shell test suites)
  • PXE, GRUB, TFTP, NFS boot automation

Read more on developer.amd.com or amd64.org.

2011 QA Workshop Day 0.5

I'm in Amsterdam now, the morning of the first day of the 2011 Perl QA Hackathon, and about to be pulled in by the black hole of Perl developers that is Booking.com. Curiously, this is the first trip in a long time that I haven't used Booking.com for my reservations.

Every year that I come to one of these workshops, my list of things to work on get longer and longer.

Last year I sketched out, with David Golden's help, a possible new CPAN client. We held off last year to see which direction Miyagawa would go in, but this year I don't think our tools really overlap. His tool, cpanm, appeals to the people who want the tool to not only make most of the decisions but also hide the details. It's started off as zero-conf, and you can still use it like that, but it is starting to get some knobs and dials.

wee perls

I've been lurking on the various ARM Linux boards for a while, so when I saw a hackable ARM appliance for $40, I grabbed it.

Honestly, setting up (Arch) Linux on it was the easiest Linux setup ever. [By cracky, back in my day we didn't even have ZEROS in our binary!] After installing a few Perl packages from the PlugApps repo, I decided, "Why not try to kill this wee Linux box and its THUMBDRIVE filesystem with PostgreSQL and some heavy DBI action?!" Surprisingly, it'd actually probably be usable as a tiny PostgreSQL server. The L'ane test suite, which takes about three-ish minutes on my Core i5 Thinkpad took just under nine minutes on this tiny, silent, USB-DRIVEN box. While a third of the speed might sound like a deal-breaker, the test suite really hits the database with bulk data loads that aren't realistic under normal use. I'll have to whip out my minimum-wage-worker-simulator to see if this (did I mention it's pink?) lil' box can actually hold up to a "real" workload.

RSS and Atom feeds in Catalyst

The Catalyst cookbook provides two recommendations for adding RSS feeds to your application:

  1. Create an XML template, populate the stash with data, let your template view render it, then override the Content-Type: header of your view with Catalyst::Response.
  2. Use an XML::* feed module to render the XML, manually set the Catalyst::Response body, then set the Content-Type: header.

The former almost makes me angry, and the latter, although saner, puts view-specific responsibilities on the shoulders of the Controller.

Catalyst::View::XML::Feed

Catalyst::View::XML::Feed is an attempt at something cleaner, and more in the spirit of MVC, which makes the nitty-gritty details of presentation entirely the responsibility of the view. Using it is pretty much what you would expect from any view:

  • Put your data in $c->stash->{feed}
  • Forward to your View::Feed (or whatever you called your Catalyst::View::XML::Feed subclass)

It attempts to be as intelligent as possible, allowing you to supply data in a wide range of formats to the feed value in the stash. These can be XML::* Atom or RSS objects, custom objects, plain hashrefs of values, etc.

As always, any recommendations or other feedback are warmly welcomed.

More Ouch

The response to my original Ouch post has been overwhelming. Based upon the number of responses it got and the number of emails I personally received about it, Ouch must have struck a cord.

I've taken the feedback I've received and released Ouch 0.03. New feature details after the jump.

Perl in the News

Perl FTW (open source implementation of Apple AirPort Express)

http://www.mafipulation.org/blagoblig/2011/04/08#shairport

Can we afford bad code on blogs.perl.org?

If you have a regular look on blogs.perl.org, you will have noticed a certain newcomer around here who keeps posting uncommented Perl scripts. I don't mind a noob asking stupid questions. Heck, I don't even think that noobs can ask stupid questions. But can the Perl community afford to have really bad code on a domain named 'perl.org'?

Just asking.

perlnews bot renewal

I have recently replaced my perl news bot for IRC (#news@irc.perl.org) and Twitter (@perlnews) along with the server where it resides. Now it is powered by AnyEvent (it was a Plagger bot before), and its repository goes to github as well. If you find anything wrong or if you have any feeds to be included, send me a pull request. Enjoy.

https://github.com/charsbar/perlnews

Ouch - Exceptions that don't hurt.

For the past many years I've been using Exception::Class to create rich, object-oriented exceptions. However, I've always disliked it, but I never found anything better. I felt like it was just too verbose and seemed to get in my way more often than it helped. Finally I created Ouch, a minimalist exception handling system. Details after the jump.

2011 Perl QA Hackathon

So the 2011 Perl QA Hackathon is happening here in Amsterdam and sponsored in part by my employer, Booking.com (what? You want to sit by a canal here in Amsterdam, eating bitterballen, drinking Grolsch and loving life as an expat? Drop me a line because we're still hiring). This will give me a chance to catch up on a fair amount of code I've been neglecting (testing related and otherwise). Of course, I think I have a damned good excuse for not being as "present" in the community as I otherwise could be the last couple of months:

Our beautiful daughter

That being said, I still want to apply some long-neglected patches to Test::Differences and other modules.

I also have a few other ideas up my sleeve, but we'll see how much time we have.

Quick Start : Puppet

This is mostly a note to myself in case I ever need to do this again. I’ve already got a git managed puppet config and need to remember how to deploy it on a new server.

Pre-Requisites

  • Debian based server (Debian, Ubuntu)
  • git repo for existing /etc/puppet
    • if you don’t have an existing repo, you can turn the default /etc/puppet into one later

On your server

You’ll need to install the tools and your configuration:

Installing Puppet Master

sudo aptitude install puppetmaster vim-puppet

Install git managed puppet repo

Don’t forget to change the repo name where necessary!

sudo mv /etc/puppet.default/ /etc/puppet
sudo mv /etc/puppet/ /etc/puppet.default/
git clone git@github.com:chiselwright/puppet-chizography.git puppet
sudo mv puppet /etc/
sudo /etc/init.d/puppetmaster start

Creating a new puppet config repo

I love it when a plan comes together

Barbie blogged about the 11 million test reports mark, and gave a link to a dataset.

I had been sitting on my data "visualization" idea App::ffeedflotr for some time already, and had just started writing and publishing it on github. That dataset pushed me to write a short tutorial / showcase of the application.

The screenshots were produced by WWW::Mechanize::Firefox, the charts produced by the flot library, and the Javascript manipulation also came through MozRepl::RemoteObject. It's nice when your tools conspire to surprise you in a good way!

11 Million Test Reports

It seems I wasn't paying attention to the CPAN Testers Statistics site when writing the March Summary. A little over 11 weeks after our last milestone, on 11th March we pass the 11 millionth report, as can be seen on the Interesting Stats page. As always, many thanks to all the testers who have help to contribute to this milestone.

Congratulations to Andreas J. König for posting the 11 millionth report. It was a PASS for Parse-ErrorString-Perl-0.15.

Cross-posted from the CPAN Testers Blog.

Bovicide 5: Parse-time Error Reporting

This post is one of a series prompted by an exchange of papers on the Internet. That exchange discussed what it would take to produce an acceptable replacement for yacc and the entire family of LALR-based parsers.

My first post concentrated on speed and power -- the ability to parse all context-free grammars in O(n**3) time, and the ability to parse just about every grammar in practical use, including all yacc-able grammars, in linear (O(n)) time. This is the second of two posts about error reporting.

Error reporting is often ignored, but it is extremely important. In a previous post, I suggested that its poor error reporting properties are the real reason why production parsers are abandoning the once-dominant LALR in favor of hand-written recursive descent. LALR's feedback on grammar errors could pass for low-grade encryption.

Yet Another Perl Podcast #3: Анонс

Анонс выпуска №1
Perl программист, CPAN-автор, один из разработчиков популярного web framework’а Mojolicious, организатор локального Perl-сообщества Ростова-на-Дону - RostovOnDon.pm, человек который живет по принципу: “use Perl or die;” - Анатолий Шарифулин в гостях у Yet Another Perl Podcast.
Свои вопросы Вы можете писать в twitter: twitter.com/yapp_ru, по почте: yapp_ru@gmail.com, в jabber: yapp@demond.org или в комментариях к данному анонсу на blogs.perl.org по адресу: https://blogs.perl.org/users/perl_demon/

App-ffeedflotr - plot using Firefox and flot

Sometimes, I want a pretty plot of data. Excel is not always the tool of choice,
especially when the data to plot is something like running progress of a (Perl) script I wrote,
or the output of

while /bin/true done; ls $file ; sleep 1; done

Inspired by feedGnuplot , I wrote ffeedflotr.pl, which takes data and plots it in Firefox. So far, it is not really configurable. But as I have the API blueprint of `feedGnuplot`, I can easily/conveniently adapt it to the featureset.

One nasty thing I found is that Firefox does not like to execute Javascript that comes from `data:` URIs. I suspect this is due to security concerns, but it means that I have to find a sneakier way to load custom HTML into Firefox, preferrably avoiding a tempfile. Things that I've tried so far are named pipes - Firefox does not like reading from these either, likely due to the same or similar security concerns.

Adding Version Control Sanity to Solaris logadm

Solaris includes a log rolling utility called logadm, which is very useful for managing logs without having to write your own custom scripts or install some other utility across all of your servers.

However, there is one big drawback to logadm. Whenever it runs, it stores a timestamp for each log it rolls in the logadm configuration file itself. I'll leave it to the reader to question the sanity of this.

For example:

/var/adm/messages -C 4 -a 'kill -HUP `cat /var/run/syslog.pid`'

Is changed to:

/var/adm/messages -C 4 -P 'Sat Apr 09 21:27:21 2011' -a 'kill -HUP `cat /var/run/syslog.pid`'

Stop using Locale::Maketext

The following is a translation of a talk given by Steffen Winkler at German Perl Workshop 10, Internationalisierungs-Framework auswählen, in 2010. You can find my translation of the POD on Github. (In fact you are better off reading it there, because the CSS formatting on blogs.perl.org sucks, at least for now. If you’re seeing this in a feed reader, feel free to stay.)

Aside from Steffen’s talk, there is also Nikolai Prokoschenko’s rant On the state of i18n in Perl, which mentions to some extent the fact that gettext has established workflows as well as supporting software (such as graphical tools) known in many software communities and even outside the open source world, whereas Maketext has… none of that, and is known only to Perl folk.

Be smart. Don’t use Maketext.

Yet Another Perl Podcast #2: Новости за прошедший месяц, источники информации на русском, новые cpan модули

События за прошедший месяц ( март - 1.03.11-1.04.11 ): Релизы cpan модулей: Источники информации о perl:
  • planetperl.ru - аггрегатор новостей про perl
  • onperl.ru - блог Андрея Шитова
  • perlrussia.org - расписание мероприятий
  • perl5doc.ru - переводы документация perl5 на русский язык
  • pm.org - Perl Mongers
  • moscow.pm.org - московская группа perl программистов
  • kiev.pm.org - киевская группа perl программистов

В выпуске участвовал

Cсылки: RSS и лента на rpod.ru
Следите за анонсами в twitter

Funky Function Filters in Perl6

A while back I wrote about Funky Function Filters. Let me refresh your memory - we have a Python and a Ruby snippet and we translate it into Perl5. The code is a toy to show some fancy shmancy lambda (unnamed functions) usage. The idea is to take a list of functions, filter them, and then with the remaining ones show what happens with parameters from -10 to 10.

Python example:

for f in filter(lambda f: f(-1)>=f(1),
                [lambda x:x, lambda x:x**2, lambda x:x**3]):
    for x in range(-10, 11):
        print x, f(x)

Ruby translation:

for f in [lambda { |x| x }, lambda { |x| x**2 }, lambda { |x| x**3 }
         ].select { |f| f.call(-1) >= f.call(1) }
    for x in -10..10
        print x, f.call(x)
    end
end

My perl5 translation:

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.