You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2006/11/02 12:25:16 UTC
svn commit: r470334 - in /lucene/lucy/trunk/charmonizer/src/Charmonizer:
Modules/LargeFiles.charm Test/LargeFiles.charm
Author: marvin
Date: Thu Nov 2 03:25:14 2006
New Revision: 470334
URL: http://svn.apache.org/viewvc?view=rev&rev=470334
Log:
Move stuff around in LargeFiles probe so that attempt to create big file is
valid as it was before the last refactor. Swap out some remaining old symbols
in the LargeFiles test I'd missed because the test was skipped on Darwin.
Modified:
lucene/lucy/trunk/charmonizer/src/Charmonizer/Modules/LargeFiles.charm
lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/LargeFiles.charm
Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Modules/LargeFiles.charm
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Modules/LargeFiles.charm?view=diff&rev=470334&r1=470333&r2=470334
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Modules/LargeFiles.charm (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Modules/LargeFiles.charm Thu Nov 2 03:25:14 2006
@@ -60,17 +60,6 @@
Start_Run(conf_fh, "LargeFiles");
- /* check for sparse files */
- if (check_sparse_files()) {
- append_conf(conf_fh, "#define CHAZ_HAS_SPARSE_FILES\n");
- /* see if we can create a 5 GB file without crashing */
- if (success && can_create_big_files())
- append_conf(conf_fh, "#define CHAZ_CAN_CREATE_BIG_FILES\n");
- }
- else {
- append_conf(conf_fh, "#define CHAZ_NO_SPARSE_FILES\n");
- }
-
/* see if off64_t and friends exist or have synonyms */
for (i = 0; off64_combos[i].includes != NULL; i++) {
off64_combo combo = off64_combos[i];
@@ -83,8 +72,6 @@
}
}
-
-
/* write the affirmations/definitions */
if (success) {
append_conf(conf_fh,
@@ -102,6 +89,17 @@
}
}
+ /* check for sparse files */
+ if (check_sparse_files()) {
+ append_conf(conf_fh, "#define CHAZ_HAS_SPARSE_FILES\n");
+ /* see if we can create a 5 GB file without crashing */
+ if (success && can_create_big_files())
+ append_conf(conf_fh, "#define CHAZ_CAN_CREATE_BIG_FILES\n");
+ }
+ else {
+ append_conf(conf_fh, "#define CHAZ_NO_SPARSE_FILES\n");
+ }
+
/* short names */
if (want_short_names && success) {
Start_Short_Names(conf_fh);
@@ -250,6 +248,7 @@
/* concat the source strings, compile the file, capture output */
code_buf_len = join_strings(&code_buf, code_buf_len,
create_bigfile_code_a, fseek_command, create_bigfile_code_b, NULL);
+
output = capture_output(code_buf, code_buf_len, &output_len);
/* truncate, just in case the call to remove fails */
Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/LargeFiles.charm
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/LargeFiles.charm?view=diff&rev=470334&r1=470333&r2=470334
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/LargeFiles.charm (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/LargeFiles.charm Thu Nov 2 03:25:14 2006
@@ -47,28 +47,28 @@
if (fh == NULL)
Skip_Remaining("Failed to open file");
- check_val = lfseek(fh, gb4_plus, SEEK_SET);
- Assert_True((check_val == 0), "lfseek above 4 GB");
+ check_val = fseeko64(fh, gb4_plus, SEEK_SET);
+ Assert_True((check_val == 0), "fseeko64 above 4 GB");
- offset = lftell(fh);
- Assert_True((offset = gb4_plus), "lftell above 4 GB");
+ offset = ftello64(fh);
+ Assert_True((offset = gb4_plus), "ftello64 above 4 GB");
check_val = fprintf(fh, "X");
Assert_True((check_val == 1), "print above 4 GB");
- check_val = lfseek(fh, gb2_plus, SEEK_SET);
- Assert_True((check_val == 0), "lfseek above 2 GB");
+ check_val = fseeko64(fh, gb2_plus, SEEK_SET);
+ Assert_True((check_val == 0), "fseeko64 above 2 GB");
- offset = lftell(fh);
- Assert_True((offset = gb2_plus), "lftell above 2 GB");
+ offset = ftello64(fh);
+ Assert_True((offset = gb2_plus), "ftello64 above 2 GB");
- check_val = lfseek(fh, -1, SEEK_END);
+ check_val = fseeko64(fh, -1, SEEK_END);
Assert_True((check_val == 0), "seek to near end");
check_char = fgetc(fh);
Assert_True((check_char == 'X'), "read value after multiple seeks");
- lfseek(fh, wrap_gb4, SEEK_SET);
+ fseeko64(fh, wrap_gb4, SEEK_SET);
check_char = fgetc(fh);
Assert_True((check_char == '\0'), "No wraparound");