]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Fix bug testing with ecryptfs
authorAndrew Stubbs <ams@codesourcery.com>
Mon, 10 Sep 2012 13:57:23 +0000 (14:57 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Mon, 17 Sep 2012 19:29:33 +0000 (21:29 +0200)
The test script assumes that zero-length files take up zero disk space,
that the block size is 4k, and that the disk usage will be the file size
rounded up to the nearest block size. Unfortunately these were not true for
ecryptfs.

Additionally, running the test.sh from another directory did not work due
to a bad location assumption in another test.

test.sh

diff --git a/test.sh b/test.sh
index 372c1889c50cb1c33636ceec37af0aee43b41a98..afd73a40e8f7a3d075bb14be7d9f25c39de4f6fc 100755 (executable)
--- a/test.sh
+++ b/test.sh
@@ -497,7 +497,7 @@ base_suite() {
 
 link_suite() {
     if [ `dirname $COMPILER` = . ]; then
-        ln -s ../ccache $COMPILER
+        ln -s "$CCACHE" $COMPILER
         CCACHE_COMPILE="./$COMPILER"
         base_tests
     else
@@ -1542,6 +1542,11 @@ cleanup_suite() {
         fi
     done
 
+    # Warning: this test is known to fail on filesystems that have
+    # unusual block sizes, including ecryptfs.  The workaround is
+    # to place the test directory elsewhere:
+    #     cd /tmp
+    #     CCACHE=$DIR/ccache $DIR/test.sh
     testname="forced cleanup, size limit"
     $CCACHE -C >/dev/null
     prepare_cleanup_test $CCACHE_DIR/a