Charnell Lucich

The Petard Filesystem.

Posted on: October 2, 2007

So..Donnie Jabbers me this link today, which he does every day. Generally when Donnie sends me a link it’s either incredibly funny, weird, or super cool. The link today happened to be super cool because the application is designed to produce only errors. I know, some of you are probably thinking, ‘huh?’ I click on the link and the first thing that stands out to me is that this is called ‘petard’. Now before I start reading, I’m thinking….what the hell did he just send me? After reading on, the geek-girl in me comes out and I’m engrossed in this article telling me about the petard filesystem.

The petard filesystem is designed to produce errors which you can specify what conditions generate the errors and what those errors should be. How many of us have spent countless hours digging and searching for error messages in logs only to finally find it and not understand what exactly it’s trying to tell you? Not sure about you, but useless errors really piss me off.

“Petardfs uses Filesystem in Userspace (FUSE) and allows an easy setup without requiring a kernel recompile or new kernel
modules. In normal configuration you specify a “base filesystem” and
give a mountpoint — for example, saying that /home/ben/foo is the base
filesystem and mounting the filesystem at /home/ben/petard-foo. Without
any other configuration, any files in foo will be available in
petard-foo unchanged. Petardfs uses an XML configuration file to tell
which files to report errors for and what error code to use. For
example, foo.txt can have an EIO error at bytes 34 to 37.

Petardfs allows you to be mean to your applications and see how
gracefully they respond under error conditions. Errors in your
project’s error-handling code can be detected and fixed by running your
application through a test suite against petardfs. In many error
conditions, such as failure to open a file at startup, an application
might just have to exit gracefully, but things such as failure to
truncate a log file might only call for the application to inform the
user of the error and continue. Petardfs can help you test both common
errors such as read failures and rarer conditions such as truncate(2)
failures.”

Read more about this application here

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Enter your email address to follow this blog and receive notifications of new posts by email.

Follow Charnell Lucich on WordPress.com

Follow me on Twitter

%d bloggers like this: