Author: rooneg
Date: Wed Jan 25 21:04:09 2006
New Revision: 372439
URL: http://svn.apache.org/viewcvs?rev=372439&view=rev
Log:
Merge r292064 to 1.2.x.
Original log message:
Mac OS X HFS doesn't support sparse files; therefore, the test_insertfile case
would cause an 8GB file to be written to disk. Ouch. Instead, truncate the
file before closing.
* test/testbuckets.c
(test_insertfile): Truncate file before closing.
Modified:
apr/apr-util/branches/1.2.x/CHANGES
apr/apr-util/branches/1.2.x/test/testbuckets.c
Modified: apr/apr-util/branches/1.2.x/CHANGES
URL: http://svn.apache.org/viewcvs/apr/apr-util/branches/1.2.x/CHANGES?rev=372439&r1=372438&r2=372439&view=diff
==============================================================================
--- apr/apr-util/branches/1.2.x/CHANGES (original)
+++ apr/apr-util/branches/1.2.x/CHANGES Wed Jan 25 21:04:09 2006
@@ -3,8 +3,11 @@
*) Add support for Berkeley DB 4.4 to the configure scripts.
[Garrett Rooney]
+ *) Fix bug in test suite that cause testbuckets to write 8GB file
+ on Mac OS X. [Justin Erenkrantz]
+
Changes with APR-util 1.2.2
-
+
*) Teach configure how to find the Novell LDAP SDK. [Graham Leggett]
*) Fix usage of ldapssl_init/ldap_sslinit on platforms that support
Modified: apr/apr-util/branches/1.2.x/test/testbuckets.c
URL: http://svn.apache.org/viewcvs/apr/apr-util/branches/1.2.x/test/testbuckets.c?rev=372439&r1=372438&r2=372439&view=diff
==============================================================================
--- apr/apr-util/branches/1.2.x/test/testbuckets.c (original)
+++ apr/apr-util/branches/1.2.x/test/testbuckets.c Wed Jan 25 21:04:09 2006
@@ -344,8 +344,16 @@
}
ABTS_ASSERT(tc, "total size of buckets incorrect", count == bignum);
-
+
apr_brigade_destroy(bb);
+
+ /* Truncate the file to zero size before close() so that we don't
+ * actually write out the large file if we are on a non-sparse file
+ * system - like Mac OS X's HFS. Otherwise, pity the poor user who
+ * has to wait for the 8GB file to be written to disk.
+ */
+ apr_file_trunc(f, 0);
+
apr_file_close(f);
apr_bucket_alloc_destroy(ba);
apr_file_remove(TIF_FNAME, p);
|