MCPcopy Create free account
hub / github.com/axboe/liburing / verify_buf

Function verify_buf

test/io_uring_passthrough.c:32–51  ·  view source on GitHub ↗

* Each offset in the file has the ((test_case / 2) * FILE_SIZE) * + (offset / sizeof(int)) stored for every * sizeof(int) address. */

Source from the content-addressed store, hash-verified

30 * sizeof(int) address.
31 */
32static int verify_buf(int tc, void *buf, off_t off)
33{
34 int i, u_in_buf = BS / sizeof(unsigned int);
35 unsigned int *ptr;
36
37 off /= sizeof(unsigned int);
38 off += (tc / 2) * FILE_SIZE;
39 ptr = buf;
40 for (i = 0; i < u_in_buf; i++) {
41 if (off != *ptr) {
42 fprintf(stderr, "Found %u, wanted %llu\n", *ptr,
43 (unsigned long long) off);
44 return 1;
45 }
46 ptr++;
47 off++;
48 }
49
50 return 0;
51}
52
53static int fill_pattern(int tc)
54{

Callers 1

__test_ioFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected