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