From 3775ab0e371caf85ce17122b5109a91ae5477550 Mon Sep 17 00:00:00 2001 From: Adam Rutkowski Date: Sat, 26 Jun 2021 16:55:25 +0200 Subject: [PATCH] fix debug logs in cacheline concurrency UT tests Signed-off-by: Adam Rutkowski --- .../ocf_cache_line_concurrency.c/ocf_cache_line_concurrency.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/unit/tests/concurrency/ocf_cache_line_concurrency.c/ocf_cache_line_concurrency.c b/tests/unit/tests/concurrency/ocf_cache_line_concurrency.c/ocf_cache_line_concurrency.c index b284f29c..91cf79fc 100644 --- a/tests/unit/tests/concurrency/ocf_cache_line_concurrency.c/ocf_cache_line_concurrency.c +++ b/tests/unit/tests/concurrency/ocf_cache_line_concurrency.c/ocf_cache_line_concurrency.c @@ -505,7 +505,8 @@ static void cctest(unsigned num_threads, unsigned num_iterations, unsigned cline print_message("thread no %u\n", i); for (j = 0; j < num_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"; print_message("[%u] %u %s\n", j, map->coll_idx, status); }