|
|
Log in / Subscribe / Register

libfiu: fault injection in userspace

From:  Alberto Bertogli <albertito-AT-blitiri.com.ar>
To:  lwn-AT-lwn.net
Subject:  libfiu: Fault injection in userspace
Date:  Fri, 19 Jun 2009 16:37:17 -0300
Message-ID:  <20090619193717.GA5913@blitiri.com.ar>


Hi!

I'm the author of libfiu, a library to perform fault injection. I've just made
a release, and it occurred to me that it's something that LWN readers might
find interesting, so I thought it'd be appropriate to let you know about it.

Its website is http://blitiri.com.ar/p/libfiu/.


It comes with some tools that can be used to simulate failures in the POSIX
functions without having to modify the application's source code.

The main application (or at least the one I had in mind when writing it) is to
simplify automated testing of software behaviour at failure scenarios, for
software which is supposed to be fault-resistant or at least gracefully cope
with failures.

If there's anything else you need to know about it, please let me know.


Thanks a lot,
		Alberto





to post comments

libfiu: fault injection in userspace

Posted Jun 29, 2009 10:26 UTC (Mon) by meuh (guest, #22042) [Link] (1 responses)

What are the pro and cons compared to 'fusil' ?
http://lwn.net/Articles/322826/

libfiu: fault injection in userspace

Posted Jun 30, 2009 19:32 UTC (Tue) by alberto (subscriber, #57711) [Link]

They do different things, so I don't think it's a pros/cons thing.

From what I could find out from the docs, fuzzer works by restricting the
process' environment, setting limits via the OS, interacting with it, and
monitoring output. It is external to the process.

libfiu works in a different way: it's a shared library, so the user can
put failure points in his/her code, and then use them to simulate
_functions_ failing. It doesn't change the process' environment, or care
about its inputs or outputs.

So, for example, you can test what would happen if a GTK function failed,
regardless of the process' environment; or what would happen if your
process would crash in a particular, pre-determined spot in your code.

On top of that, it provides a set of tools to simulate failures in POSIX
functions using a preload library. That means you get much more control
about what fails, when, and how.

If you want to compare examples, some simple ones are in libfiu's user
guide.

The only real-life example about how libfiu can be used at the moment
is the test at
http://blitiri.com.ar/git/?p=libjio;a=tree;f=tests/behaviour,
which simulates crashes in different spots in the library code, and checks
it leaves things at the expected states; and
http://blitiri.com.ar/git/?p=libjio;a=blob;f=tests/stress..., which
runs a simple stress test simulating random crashes.

Sadly, those require a bit of knowledge about the library they test, so
they may be not so clear.

Thanks
Alberto

libfiu: fault injection in userspace

Posted Jun 30, 2009 21:11 UTC (Tue) by nix (subscriber, #2304) [Link]

This looks truly excellent. I'm likely to find it extremely useful, for
sure.


Copyright © 2009, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds