]>
Commit | Line | Data |
---|---|---|
1 | #include "perf_index.h" | |
2 | #include "fail.h" | |
3 | #include "test_file_helper.h" | |
4 | #include <sys/param.h> | |
5 | #include <stdio.h> | |
6 | ||
7 | char tempdir[MAXPATHLEN]; | |
8 | ||
9 | DECL_SETUP { | |
10 | char* retval; | |
11 | ||
12 | retval = setup_tempdir(tempdir); | |
13 | ||
14 | VERIFY(retval, "tempdir setup failed"); | |
15 | ||
16 | printf("tempdir: %s\n", tempdir); | |
17 | ||
18 | return test_file_read_setup(tempdir, num_threads, length, 0L); | |
19 | } | |
20 | ||
21 | DECL_TEST { | |
22 | return test_file_read(tempdir, thread_id, num_threads, length, 0L); | |
23 | } | |
24 | ||
25 | DECL_CLEANUP { | |
26 | int retval; | |
27 | ||
28 | retval = test_file_read_cleanup(tempdir, num_threads, length); | |
29 | VERIFY(retval == PERFINDEX_SUCCESS, "test_file_read_cleanup failed"); | |
30 | ||
31 | retval = cleanup_tempdir(tempdir); | |
32 | VERIFY(retval == 0, "cleanup_tempdir failed"); | |
33 | ||
34 | return PERFINDEX_SUCCESS; | |
35 | } |