commit b1f7a36a3c12bae37628991bdc97343dac7e5428 Author: Alberto Bertogli Date: Fri Jun 19 15:04:29 2009 -0300 doc/posix.rst: Use italics instead of bold Italics look much less intrusive, previous use of bold was unintentional, it was always meant to be italics. Signed-off-by: Alberto Bertogli commit bcbd7f0f1034c39ea8970b4b94b4bfc837e6d930 Author: Alberto Bertogli Date: Fri Jun 19 13:32:57 2009 -0300 Increment libfiu/libfiu.skel.pc's version Signed-off-by: Alberto Bertogli commit 89dcdd7ce4fc952bb0e91fdb814a2b2b3bb0f3e9 Author: Alberto Bertogli Date: Fri Jun 19 13:29:31 2009 -0300 preload/posix: Add more wrapped functions This time stat() and friends, fork() and friends (including the wait() family, and kill() which is not exactly a friend but more like a love-hate relationship), signal() and sigaction(). Signed-off-by: Alberto Bertogli commit f3b6280774cb7b112f7b717621eebb2c43d896e9 Author: Alberto Bertogli Date: Fri Jun 19 13:26:51 2009 -0300 preload/posix: Generate the function list automatically This way it's going to be much harder for it to get out of date. Signed-off-by: Alberto Bertogli commit 942e952f87b72bebf6df1bcf001928943876d0ed Author: Alberto Bertogli Date: Thu Jun 18 21:45:13 2009 -0300 preload/posix: Add select(), pselect() and poll() Signed-off-by: Alberto Bertogli commit d896135ef67cfdcb87a38a94383a0bc6220c055d Author: Alberto Bertogli Date: Thu Jun 18 21:30:43 2009 -0300 preload/posix: Add more functions (mmap(), readdir() and their friends) Signed-off-by: Alberto Bertogli commit ea0a2be66a8f242510eaf784352459a53649b72f Author: Alberto Bertogli Date: Thu Jun 18 21:29:44 2009 -0300 preload/posix: Add the list of functions wrapped by the library Signed-off-by: Alberto Bertogli commit cae3e5948ffa55dd0f4862f2ed5a4cdcdd1e3721 Author: Alberto Bertogli Date: Tue Jun 16 22:09:37 2009 -0300 Add a new document: "Simulating failures in the POSIX API" It's not very detailed and lacks more interesting scenarios, but it's a start. Signed-off-by: Alberto Bertogli commit 3449d9c2ae0374e603e6499513f5088ed9bf0614 Author: Alberto Bertogli Date: Tue Jun 16 22:08:29 2009 -0300 preload/posix: Only build sync_file_range() wrapper when building on linux Signed-off-by: Alberto Bertogli commit dfa720f8b83d5d58cacd622d829515c299e9a013 Author: Alberto Bertogli Date: Tue Jun 16 22:07:25 2009 -0300 preload/posix: Allow modules to include verbatim code It will be used in following commits to put some wrapper functions inside #ifdefs. Signed-off-by: Alberto Bertogli commit fbcf1e5e13780ad8f80c18319f04dfabcee217de Author: Alberto Bertogli Date: Tue Jun 16 22:06:24 2009 -0300 Replace occurrences of "failure injection" with "fault injection" The term "fault injection" is more correct and consistent with the rest of the documentation. Signed-off-by: Alberto Bertogli commit ab57a0ec2a141e95a75b85b0818fc37bbc08c309 Author: Alberto Bertogli Date: Tue Jun 16 16:14:25 2009 -0300 Add references to fiu-run and fiu-ctrl in the documentation While at it, improve the BUGS section of libfiu's manpage a little bit. Signed-off-by: Alberto Bertogli commit 91b40eb3bd7b22d4bc573e28b312d1299970eca7 Author: Alberto Bertogli Date: Tue Jun 16 16:13:43 2009 -0300 Add a new utility, "fiu-ctrl", to make remote control easier This patch adds a new script, fiu-ctrl that makes it easier to remote control running applications. It is strongly related to fiu-run, and provides a very similar interface. See the documentation for more detail. Signed-off-by: Alberto Bertogli commit 72c474d8d7f37a0cdf2c2bed07b36b042323f54d Author: Alberto Bertogli Date: Tue Jun 16 15:34:49 2009 -0300 libfiu: Increment recursion count at remote control functions If the remote control functions are affected by the enabled failures, then it can be useless after enabling some failure points when the POSIX preload library is in use. This patch makes the remote control functions increment the recursion count to prevent this. Signed-off-by: Alberto Bertogli commit f50ef946b445346457108e40b1d31c44283935ee Author: Alberto Bertogli Date: Mon Jun 15 03:22:29 2009 -0300 Build and install the preload libraries by default There is no need to restrain from installing the preload libraries (and support applications) by default. If somebody wants to install just the library, he/she still can by using the "libfiu" target. Signed-off-by: Alberto Bertogli commit aea52dd4feace88142f31303967b9f9d410358a8 Author: Alberto Bertogli Date: Mon Jun 15 03:09:58 2009 -0300 Add fiu-run, a script to simplify running programs with libfiu See the help and/or manpage for more details. Signed-off-by: Alberto Bertogli commit 278bb609c79d9bc9d718fc1395bf4249f9cdd36a Author: Alberto Bertogli Date: Mon Jun 15 03:08:28 2009 -0300 Add a new preload library to enable failure points before a program starts This patch adds a new preload library which allows the user to enable failure points and remote control (via environment variables) before a program starts. It can be used combined with the posix preload to simulate faults in the standard library functions. A shell script to make it easier to use will be added in future commits, along more documentation. Signed-off-by: Alberto Bertogli commit ff676e1218b57d36c41df81d9b85ec3e89abd613 Author: Alberto Bertogli Date: Tue Jun 16 12:12:13 2009 -0300 libfiu: Prevent recursive execution of fiu_fail() When using the POSIX preloader library (or in similar scenarios), using some functions like fiu_enable() can result in unwanted invocations to fiu_fail(), which can cause issues with the rwlock. This patch adds a simple (TLS) recursion counter that each function increments before taking the lock, and makes fiu_fail() return immediately when called with the counter >= 1. See the comments inside the code for more detail. Signed-off-by: Alberto Bertogli commit 3f2d1ccd0cf1d57e0a485271e31a2ebc92c75c64 Author: Alberto Bertogli Date: Mon Jun 15 01:02:44 2009 -0300 Make python bindings build without having libfiu installed The setup.py is not so nice, but it's worth it. Also, while at it, add a general "bindings" target to the top-level Makefile, and make the python[23] build depend on libfiu. Signed-off-by: Alberto Bertogli commit 8362f9771fe1e838cf56c1e8c84dc26a53d78379 Author: Alberto Bertogli Date: Mon Jun 15 00:56:41 2009 -0300 Make preload/posix installable from the top level directory Also, while at it, clean the top level Makefile a little. Signed-off-by: Alberto Bertogli commit ed7cdcab959367a77ac887fb6bed09429790face Author: Alberto Bertogli Date: Mon Jun 15 00:28:42 2009 -0300 preload/posix: Look for libfiu's .so and .h in the local tree This way we avoid having to install libfiu before building the preload library. Signed-off-by: Alberto Bertogli commit cee48fd033580885eab27a422609fc199d4b88eb Author: Alberto Bertogli Date: Mon Jun 15 00:15:23 2009 -0300 preload/posix: Improve behaviour on dlopen() failure We now print to stderr, and exit the process because it really makes no sense to continue. Signed-off-by: Alberto Bertogli commit 31d1f8db15930774388d5ca798c6600fa8ededdf Author: Alberto Bertogli Date: Mon Jun 15 00:15:06 2009 -0300 preload/posix: Seed the PRNG after initialization Because we use random() to choose from possible errnos, we want it to be properly seeded. Signed-off-by: Alberto Bertogli commit c3cdb253b5d7a5a1c71fe3a6ce821270d2acbe42 Author: Alberto Bertogli Date: Sun Jun 14 23:19:17 2009 -0300 Move preload/ to preload/posix/ We're about to get a new, different preload library, so move the current one to preload/posix. Signed-off-by: Alberto Bertogli commit 1bf4bdb11de75be3b8ecc38b3ba6b55b05c43ac5 Author: Alberto Bertogli Date: Sun Jun 14 22:23:41 2009 -0300 preload: Add custom-made wrappers for malloc() and realloc() They can't be made generic because, at least on glibc, they're used before constructors are called. See the comments inside the code for more details. Signed-off-by: Alberto Bertogli commit 8880751a6e76773ac6616957a2990e43fe212d37 Author: Alberto Bertogli Date: Sun Jun 14 22:22:19 2009 -0300 preload: Use constructor attributes for obtaining original functions This patch adds a new function to the generated code that is called at library initialization time (after the codegen constructor) which gets the libc function pointer to use to access the real function. That way there is no penalty on each call, and the code looks more tidy. Signed-off-by: Alberto Bertogli commit aa74075e35f231d7846b75c7d0d63d1bc3fb064f Author: Alberto Bertogli Date: Sun Jun 14 22:19:28 2009 -0300 Initialize rwlock in fiu.c Signed-off-by: Alberto Bertogli commit 12ef3e8d301abfd7e4295092061f04b416b3c148 Author: Alberto Bertogli Date: Sun Jun 14 22:19:09 2009 -0300 Remove old ENABLE_FIU uses, replacing them with FIU_ENABLE Signed-off-by: Alberto Bertogli commit ea03693eb739077e1cfb4de83e13077e23d12ab1 Author: Alberto Bertogli Date: Sat Jun 13 13:42:41 2009 -0300 Minor wording fix in remote control document Signed-off-by: Alberto Bertogli commit d9d3e1dfd953a69a4f6417dcab51186d105e5fee Author: Alberto Bertogli Date: Sat Jun 13 13:42:25 2009 -0300 preload: Fix function definition regexp to cope with "void *f();" Signed-off-by: Alberto Bertogli commit 44db8f99e73b5b370e641ed3e42097055fe51b46 Author: Alberto Bertogli Date: Sat Jun 13 13:41:09 2009 -0300 preload: Only declare finfo when we know we're going to use it Signed-off-by: Alberto Bertogli commit c7e0b631c5c82a1b7ab3c25c92fe18ff7f0b52bb Author: Alberto Bertogli Date: Sat Jun 13 01:32:07 2009 -0300 Add remote control capabilities This patch introduces remote control capabilities via named pipes. Signed-off-by: Alberto Bertogli commit 85c8c763f10da0bb43d7a2f94c9fb5f9340bb890 Author: Alberto Bertogli Date: Sat Jun 13 01:32:46 2009 -0300 manpage: Remove useless comment Signed-off-by: Alberto Bertogli commit d6f68b2f2fa13a0c3001f2b11e9dd3aee284b074 Author: Alberto Bertogli Date: Sat Jun 13 00:54:15 2009 -0300 manpage: Note that probability is between 0 and 1 Signed-off-by: Alberto Bertogli commit b1d105082bee1e2dd41d9b882979e04f20ac9bbd Author: Alberto Bertogli Date: Sat Jun 13 00:53:40 2009 -0300 Make fiu_disable() cope with empty enabled_fails Signed-off-by: Alberto Bertogli commit 090eb55b013888f4190966003635ab0e6c0da135 Author: Alberto Bertogli Date: Fri May 22 01:30:31 2009 -0300 python: Fix function names in some PyArg_ParseTuple() calls Signed-off-by: Alberto Bertogli commit 1eb108d7d209537ce606b21d110831514b238f30 Author: Alberto Bertogli Date: Fri May 22 01:24:03 2009 -0300 Unify Python 2 and Python 3 bindings Signed-off-by: Alberto Bertogli commit 242a627f4da94ddfaa176b0a414e4d93bebeb5af Author: Alberto Bertogli Date: Fri May 22 00:05:09 2009 -0300 Seed the prng at init/fork time Instead of calling gettimeofday() for each randd() call, we use a seed and re-seed at fork time, which is much faster. Signed-off-by: Alberto Bertogli commit fad96ca2ab378b2ff86b8dbe5b6433afa2ac850c Author: Alberto Bertogli Date: Thu May 21 23:23:31 2009 -0300 Run a function at fork time Not really used at the moment, but it will in following patches. Signed-off-by: Alberto Bertogli commit 62178a1b8d487f074c8efaa61c49f6dcd507f76c Author: Alberto Bertogli Date: Thu May 21 23:06:31 2009 -0300 Remove unused "#undef"s They're leftovers from ancient code. Signed-off-by: Alberto Bertogli commit 252f8e76283e4817a260afac5761e74bf6055dff Author: Alberto Bertogli Date: Thu May 21 21:48:18 2009 -0300 Add a preloader library It loads function definition from files, and generates code that is then built into a preloader library. Useful for simulating faults from external libraries like libc. At the moment, only a couple of I/O related functions are wrapped. Signed-off-by: Alberto Bertogli commit 314fda6e2d8e1fb38f9fe176a456d85365d8a286 Author: Alberto Bertogli Date: Fri Mar 27 15:45:02 2009 -0300 Use our own PRNG We can't rely on drand48() because it's seeded, so after forking a process both parent and child will use the same random numbers. That makes it unusable for some testing scenarios. In this patch, we implement our own PRNG based on a linear congruential generator, the same one used by rand() and drand48(), but altering it to take the timestamp into account. While it breaks some of the generator properties, it works well enough for our purposes, and we get rid of the issues with fork(). Signed-off-by: Alberto Bertogli commit 3cc2f54e12ad1b45e7fd98d5b631c66a60c84566 Author: Alberto Bertogli Date: Fri Mar 27 12:19:16 2009 -0300 Simplify initialization code Signed-off-by: Alberto Bertogli commit 734b19cf153fa3f981aa602f27c2bac815cbf084 Author: Alberto Bertogli Date: Fri Mar 27 01:44:22 2009 -0300 Add Python 3 bindings, based on the Python 2 bindings Signed-off-by: Alberto Bertogli commit f63794c79e66586283adbfe68f01298e6dcd8849 Author: Alberto Bertogli Date: Fri Mar 27 02:01:16 2009 -0300 python2: Use double for probabilities There's no need to use a float when our API takes a double, and Python can do the conversion. Signed-off-by: Alberto Bertogli commit 75c5e479b32ece5373735f4064388c580e7e72dc Author: Alberto Bertogli Date: Fri Mar 27 01:42:27 2009 -0300 Fix small style issue in fiu-control.h Signed-off-by: Alberto Bertogli commit 649925ea2277d5652ec95f06409a726835f299f5 Author: Alberto Bertogli Date: Fri Mar 27 01:40:50 2009 -0300 python2: Remove redundant license file There's no need for a binding-specific license because everything in the project is in the public domain, as stated in the top-level LICENSE file. Signed-off-by: Alberto Bertogli commit 08198e250231449a55280858425be8da1321d70e Author: Alberto Bertogli Date: Fri Mar 27 02:07:00 2009 -0300 Fix probability calculation As a result of this very stupid bug, probability was reversed. This patch fixes that by fixing the comparison. Signed-off-by: Alberto Bertogli