Commit af386f86 authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

#2965 make a common assert in the brtloader extractor test more informative closes[t:2965]

git-svn-id: file:///svn/toku/tokudb@24329 c7de825b-a66e-492c-adef-691d508d4ae1
parent f88cb7a6
...@@ -170,7 +170,14 @@ static char *merge(char **tempfiles, int ntempfiles, const char *testdir) { ...@@ -170,7 +170,14 @@ static char *merge(char **tempfiles, int ntempfiles, const char *testdir) {
merge_file_init(&f[i]); merge_file_init(&f[i]);
char tname[strlen(testdir) + 1 + strlen(tempfiles[i]) + 1]; char tname[strlen(testdir) + 1 + strlen(tempfiles[i]) + 1];
sprintf(tname, "%s/%s", testdir, tempfiles[i]); sprintf(tname, "%s/%s", testdir, tempfiles[i]);
f[i].f = fopen(tname, "r"); assert(f[i].f != NULL); f[i].f = fopen(tname, "r");
if (f[i].f == NULL) {
int error = errno;
fprintf(stderr, "%s:%d errno=%d %s\n", __FILE__, __LINE__, error, strerror(error));
if (error == EMFILE)
fprintf(stderr, "may need to increase the nofile ulimit\n");
}
assert(f[i].f != NULL);
if (read_row(f[i].f, &f[i].key, &f[i].val) == 0) if (read_row(f[i].f, &f[i].key, &f[i].val) == 0)
f[i].row_valid = TRUE; f[i].row_valid = TRUE;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment