Merge pull request #527 from arutk/clc_ut_fix

fix debug logs in cacheline concurrency UT tests
This commit is contained in:
Robert Baldyga 2021-07-29 23:18:16 +02:00 committed by GitHub
commit 865d29d0cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -505,7 +505,8 @@ static void cctest(unsigned num_threads, unsigned num_iterations, unsigned cline
print_message("thread no %u\n", i); print_message("thread no %u\n", i);
for (j = 0; j < num_clines; j++) { for (j = 0; j < num_clines; j++) {
struct ocf_map_info *map = clines[j]; struct ocf_map_info *map = clines[j];
const char *status = env_bit_test(index, (unsigned long*)req->alock_status) ? unsigned index = map - req->map;
const char *status = env_bit_test(index, (unsigned long*)&req->alock_status) ?
(req->alock_rw == OCF_WRITE ? "W" : "R") : "X"; (req->alock_rw == OCF_WRITE ? "W" : "R") : "X";
print_message("[%u] %u %s\n", j, map->coll_idx, status); print_message("[%u] %u %s\n", j, map->coll_idx, status);
} }