commit 25573c9dc5c75b833ce56befa266e6a2e146a0d7 Author: Alberto Bertogli Date: Sun Feb 27 21:42:53 2011 +0000 Version 1.02 Signed-off-by: Alberto Bertogli commit 527dd15806492e2a8895c35c0476db2c2d629ad3 Author: Alberto Bertogli Date: Sun Feb 27 21:39:21 2011 +0000 tests/util: Update README to reflect the rename of quick-test-run Signed-off-by: Alberto Bertogli commit 6fb21b1012c0b947760f1b42dfde50d2500b2626 Author: Alberto Bertogli Date: Sun Feb 27 21:22:37 2011 +0000 tests/behaviour: Add a test for stressing jtrans_add_[rw]() This patch adds a test which stresses jtrans_add_[rw]() by creating 50 * 5 operations with those functions. This would have caught the bug fixed in commit 251fcad (bindings/python: Fix broken realloc() new size, 2011-02-27). Signed-off-by: Alberto Bertogli commit bbe7a88cb5fcdeed48154282879fddecaa488c8c Author: Alberto Bertogli Date: Sun Feb 27 21:20:03 2011 +0000 tests/behaviour: Make test 23 more interesting by using different sizes Test 23 covers basic jtrans_add_[rw], and this patch makes it a little bit more interesting by making the size of the write operations differ. Signed-off-by: Alberto Bertogli commit bc792921d5aa9824e0453bdd473f57cc1dc6991b Author: Alberto Bertogli Date: Sun Feb 27 12:01:59 2011 +0000 tests/stress: Do not depend on libfiu if not asked for it If the --fi command line option is not passed to jiostress, it won't use it, so there's no need to depend on it. Signed-off-by: Alberto Bertogli commit d3dbfecd3bf139f10a51e062fd06904845073bd3 Author: Alberto Bertogli Date: Sun Feb 27 11:57:52 2011 +0000 libjio: Free lingering transaction mutex in jclose() Signed-off-by: Alberto Bertogli commit 251fcad42e6435006836b3fa01c12011cc7bfb27 Author: Alberto Bertogli Date: Sun Feb 27 11:39:53 2011 +0000 bindings/python: Fix broken realloc() new size This patch fixes the new size parameter given to realloc(), which was (very) wrong. Surprisingly, this simple mistake wasn't caught by the tests OR valgrind under Linux, but on FreeBSD made one of the tests crash (behaviour n23), and it did appear under valgrind on that platform. Signed-off-by: Alberto Bertogli commit 036fe769755f430dac1d4be7effaa107614145da Author: Alberto Bertogli Date: Sun Feb 27 11:17:02 2011 +0000 Build Python bindings with debugging enabled when doing a debug build If we invoke make with DEBUG=1 when building Python bindings, pass a debug flag to the Python build scripts. Signed-off-by: Alberto Bertogli commit e9c07535b25fa53dfa5d5fd6850bfc547e1de8a1 Author: Alberto Bertogli Date: Sat Feb 26 23:11:12 2011 +0000 bindings/python: Use more appropriate data types In the bindings we often used long instead of either ssize_t or int, specially for return values. This patch changes the definitions to match the appropriate data type, and adds checks for some cases where we need to do so in Python (e.g. we convert to (signed) long long and use it as an (unsigned) off_t). Signed-off-by: Alberto Bertogli commit 2c51596edc7bb67a0be4c692b9f66c3c250feb07 Author: Alberto Bertogli Date: Sat Feb 26 21:57:01 2011 +0000 bindings/python: Initialize flags in jfsck() Since flags is an optional parameter, we need to initialize it. Signed-off-by: Alberto Bertogli commit b2e18b1fefc2b51baf70d5e1a5c41567214ebfe4 Author: Alberto Bertogli Date: Sat Feb 26 21:47:21 2011 +0000 libjio: Fix a memory leak in jtrans_rollback() jtrans_rollback() creates a new transaction using the data saved by jtrans_commit() in op->pdata as the data to commit, which is stored in op->buf, making both point to the same location. After applying the new transaction, we need to free it; however, jtrans_free() assumes op->buf points to a different place than op->pdata, and attempts to free both. Thus, to prevent a double free in the hand-crafted transaction, we need to set one of them to NULL. However, we currently set both to NULL, effectively leaking the memory used to store it. This patch fixes that bug, by simply removing one of the two assignments. Signed-off-by: Alberto Bertogli commit a243dffae86f5524c1b49c63a7314e19ad8228bd Author: Alberto Bertogli Date: Sat Feb 26 21:46:33 2011 +0000 samples: Close the files when using the classic API Signed-off-by: Alberto Bertogli commit b02aff4eb7523b23ea8d11effb770754e5182bc3 Author: Alberto Bertogli Date: Sat Feb 26 20:33:48 2011 +0000 tests/util: Rewrite the scripts in Python The old scripts had issues when ran from directories with spaces on them, among other bugs and portability problems. This commit rewrites the scripts in Python to make them more robust and portable. There is no user-facing changes when invoked via make. Signed-off-by: Alberto Bertogli commit 9075b326ff2699f01aef95a758aa418a2557e14f Author: Alberto Bertogli Date: Sat Feb 26 20:22:25 2011 +0000 samples: Use -std=c99 -pedantic when building Signed-off-by: Alberto Bertogli commit 897b36fa9041311b8c459e47acfd3057022defcf Author: Alberto Bertogli Date: Sat Feb 26 20:20:10 2011 +0000 tests/stress: Check the file we're going to use does not exist Since jiostress overrides the file, and it's not useful to run it on already created files, make it check if the file exists before using it, to prevent accidental destruction. This also helps to prevent symlink exploits when used with temporary paths. Signed-off-by: Alberto Bertogli commit a894011dc4e9daed1f6bacbac7ee987e2c894668 Author: Alberto Bertogli Date: Sat Feb 26 14:18:51 2011 +0000 Use /usr/bin/env bash instead of /bin/bash Not every system has /bin/bash, use /usr/bin/env bash which is more portable. Signed-off-by: Alberto Bertogli commit aa934d0c45bd564ea8a9580793d616a24f700f5e Author: Alberto Bertogli Date: Wed Feb 23 00:43:43 2011 +0000 Make quick-test-run.sh be able to cope when tempfile is not available tempfile is convenient, but it's from debianutil, so it's better to avoid the dependency if we can. This patch makes quick-test-run.sh use a simple alternative when tempfile is not available. Tested on Ubuntu (with tempfile) and on Fedora 14 (whithout). Signed-off-by: Alberto Bertogli commit 96b8cd2804340006487c5b913b78acf688b69201 Author: Alberto Bertogli Date: Tue Feb 22 23:57:07 2011 +0000 Make tests-fi run longer To take advantage of the fault injection, we need to do more operations in the stress test, otherwise we end up with only about 5 simulated failures. This patch increases the number of operations from 50 to 400, which ends up making about 40 simulated failures and taking about 2 minutes (overall, not just the stress test) on my laptop (Thinkpad T400 with a P8400 CPU). Signed-off-by: Alberto Bertogli commit cea597c4f3d55544c1175c1eec48d04432abf09c Author: Alberto Bertogli Date: Tue Feb 22 23:56:29 2011 +0000 Fix lenght -> length typo Signed-off-by: Alberto Bertogli commit c3c425bdfa3184eac6344882f085c63c0a3bf48b Author: Alberto Bertogli Date: Tue Feb 22 23:52:56 2011 +0000 Fix Python setup.py so that it uses the "new" build directory Python's setup.py was looking for the library (for build purposes) in the libjio directory, instead of libjio/build where it should reside. This broke the Python build, but went unnoticed because in all my repositories I had (purely by chance) a shared library in the libjio directory. This commit fixes this by making it look in the appropriate place, and also making libjio/Makefile to create a link to the library with the soname, so the Python interpreter can find the library (we don't need to install it because ldconfig will take care of creating it). Signed-off-by: Alberto Bertogli commit 8fe1ddfcf95efdab6075716978ef813fb0a166e6 Author: Alberto Bertogli Date: Tue Feb 22 23:37:43 2011 +0000 Miscellaneous manpage fixes From: Jonathan Yu This patch contains several fixes for the manpage (mostly escaping hyphens and misspells). From Jonathan Yu, with minor additions by me. Signed-off-by: Alberto Bertogli commit b3b87afa718f33845bb8e072f2cf515580473d6c Author: Alberto Bertogli Date: Tue Feb 22 23:03:57 2011 +0000 Add some scripts and make targets to make testing easier This commit adds some scripts that are used by two make targets, "tests" and "tests-fi", to run a reasonable set of tests against the built library (as opposed to using the installed version, which is what the tests do if run without a special environment). Signed-off-by: Alberto Bertogli commit 13d64ea3908eac5e5686992e081e99897060142d Author: Alberto Bertogli Date: Mon Feb 21 21:55:51 2011 +0000 Minor code cleanup This patch contains three minor cleanups, that do not change the build result but are purely aesthetic. Signed-off-by: Alberto Bertogli commit c7d31f215f7f248fa62f35322c8afddfd114da66 Author: Alberto Bertogli Date: Wed May 26 00:22:45 2010 -0300 python: Fix int/long argument parsing mismatch Some PyArg_ParseTuple() invocations were told to parse to an int, but a long was given to it instead. On 64-bit platforms that mismatch caused trouble, but luckily nothing that could cause corruption, since the resulting values were given to malloc(), which would fail. This issue came up when running the behaviour tests in Fedora 13. The patch fixes this by telling PyArg_ParseTuple() we are giving it a long instead of an int. Signed-off-by: Alberto Bertogli