[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Define symbol for file_buffer size in tests/libsvn_delta/random-test.c

From: <kfogel_at_collab.net>
Date: 2005-06-16 16:16:25 CEST

Thanks. I thought about applying this, but didn't really see a good
reason to -- the buffer lengths are only coincidentally the same, they
could be different and all the tests should still pass. Therefore, I
don't see any need to add another level of indirection for the reader.

Looking forward to other patches, though...

-Karl

"Vlad Dascalu" <vlad.dascalu@goobix.com> writes:
> Log message:

> * subversion/tests/libsvn_delta/random-test.c
>
> (FILE_BUFFER_SIZE): Defined this symbol as 10240
> in order to store the hard-coded file_buffer size used in tests.
>
> Index: tests/libsvn_delta/random-test.c
> ===================================================================
> --- tests/libsvn_delta/random-test.c (revision 14931)
> +++ tests/libsvn_delta/random-test.c (working copy)
> @@ -40,6 +40,7 @@
> #define DEFAULT_MAXLEN (100 * 1024)
> #define DEFAULT_DUMP_FILES 0
> #define DEFAULT_PRINT_WINDOWS 0
> +#define FILE_BUFFER_LENGTH 10240
> #define SEEDS 50
> #define MAXSEQ 100
>
> @@ -133,7 +134,7 @@
> static void
> dump_file_contents (apr_file_t *fp)
> {
> - static char file_buffer[10240];
> + static char file_buffer[FILE_BUFFER_LENGTH];
> apr_size_t length = sizeof file_buffer;
> fputs ("--------\n", stdout);
> do
> @@ -159,7 +160,7 @@
> int dump_files,
> apr_pool_t *pool)
> {
> - static char file_buffer[10240];
> + static char file_buffer[FILE_BUFFER_LENGTH];
> char *buf = file_buffer;
> char *const end = buf + sizeof file_buffer;
>
> @@ -216,8 +217,8 @@
> static svn_error_t *
> compare_files (apr_file_t *f1, apr_file_t *f2, int dump_files)
> {
> - static char file_buffer_1[10240];
> - static char file_buffer_2[10240];
> + static char file_buffer_1[FILE_BUFFER_LENGTH];
> + static char file_buffer_2[FILE_BUFFER_LENGTH];
>
> char *c1, *c2;
> apr_off_t pos = 0;
> @@ -257,7 +258,7 @@
> static apr_file_t *
> copy_tempfile (apr_file_t *fp, apr_pool_t *pool)
> {
> - static char file_buffer[10240];
> + static char file_buffer[FILE_BUFFER_LENGTH];
> apr_file_t *newfp;
> apr_size_t length1, length2;
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jun 16 17:02:06 2005

This is an archived mail posted to the Subversion Dev mailing list.