]>
git.saurik.com Git - apple/xnu.git/blob - tools/tests/perf_index/perfindex-ram_file_read.c
1 #include "perf_index.h"
3 #include "test_file_helper.h"
8 const char ramdisk_name
[] = "StressRAMDisk";
9 char ramdisk_path
[MAXPATHLEN
];
14 retval
= setup_ram_volume(ramdisk_name
, ramdisk_path
);
15 VERIFY(retval
== PERFINDEX_SUCCESS
, "setup_ram_volume failed");
17 printf("ramdisk: %s\n", ramdisk_path
);
19 return test_file_read_setup(ramdisk_path
, num_threads
, length
, 0L);
23 return test_file_read(ramdisk_path
, thread_id
, num_threads
, length
, 0L);
29 retval
= test_file_read_cleanup(ramdisk_path
, num_threads
, length
);
30 VERIFY(retval
== PERFINDEX_SUCCESS
, "test_file_read_cleanup failed");
32 retval
= cleanup_ram_volume(ramdisk_path
);
33 VERIFY(retval
== 0, "cleanup_ram_volume failed");
35 return PERFINDEX_SUCCESS
;