Aesthetic changes

Aesthetic changes, typos fix and delete recursive inclusions.

Signed-off-by: Slawomir_Jankowski <slawomir.jankowski@intel.com>
This commit is contained in:
Slawomir_Jankowski 2019-10-01 14:24:16 +02:00
parent e02821d399
commit 0696ec1f9c
25 changed files with 23 additions and 29 deletions

9
env/posix/ocf_env.c vendored
View File

@ -7,6 +7,7 @@
#include <sched.h>
#include <execinfo.h>
/* ALLOCATOR */
struct _env_allocator {
/*!< Memory pool ID unique name */
char *name;
@ -45,7 +46,6 @@ void *env_allocator_new(env_allocator *allocator)
return &item->data;
}
env_allocator *env_allocator_create(uint32_t size, const char *fmt_name, ...)
{
char name[OCF_ALLOCATOR_NAME_MAX] = { '\0' };
@ -110,8 +110,7 @@ void env_allocator_destroy(env_allocator *allocator)
}
}
/* *** DEBUGING *** */
/* DEBUGING */
#define ENV_TRACE_DEPTH 16
void env_stack_trace(void)
@ -129,13 +128,13 @@ void env_stack_trace(void)
free(messages);
}
/* *** CRC *** */
/* CRC */
uint32_t env_crc32(uint32_t crc, uint8_t const *data, size_t len)
{
return crc32(crc, data, len);
}
/* *** execution contexts *** */
/* EXECUTION CONTEXTS */
pthread_mutex_t *exec_context_mutex;
static void __attribute__((constructor)) init_execution_context(void)

View File

@ -11,7 +11,7 @@
#include <stdbool.h>
/* TODO: Move prefix printing to context logger. */
#define OCF_LOGO "Intel(R) OCF"
#define OCF_LOGO "OCF"
#define OCF_PREFIX_SHORT "[" OCF_LOGO "] "
#define OCF_PREFIX_LONG "Open CAS Framework"

View File

@ -12,7 +12,6 @@
* @brief OCF cache API
*/
#include "ocf_types.h"
#include "ocf_volume.h"
#include "ocf_ctx.h"
#include "ocf_def.h"

View File

@ -11,7 +11,6 @@
#ifndef __OCF_CORE_H__
#define __OCF_CORE_H__
#include "ocf_types.h"
#include "ocf_volume.h"
#include "ocf_io.h"
#include "ocf_mngt.h"

View File

@ -11,7 +11,6 @@
* @brief OCF library context API
*/
#include "ocf_types.h"
#include "ocf_volume.h"
#include "ocf_logger.h"

View File

@ -6,7 +6,6 @@
#ifndef __OCF_MNGT_H__
#define __OCF_MNGT_H__
#include "ocf_types.h"
#include "ocf_cache.h"
#include "ocf_core.h"

View File

@ -13,7 +13,6 @@
#include "ocf_types.h"
#include "ocf_env.h"
#include "ocf_err.h"
struct ocf_io;

View File

@ -90,7 +90,7 @@ class TestGenerator(object):
def get_autowrap_file_include(self, test_file_path):
autowrap_file = test_file_path.rsplit(".", 1)[0]
autowrap_file = autowrap_file.replace(self.main_UT_dir, "")
autowrap_file += "_generated_warps.c"
autowrap_file += "_generated_wraps.c"
return "#include \"" + autowrap_file + "\"\n\n"
def get_includes(self, abs_path_to_tested_file):

View File

@ -15,7 +15,7 @@ framework_script_path = os.path.join(script_path, "../framework/add_new_test_fil
framework_script_path = os.path.normpath(framework_script_path)
status, output = commands.getstatusoutput(framework_script_path + " " + args)
print output
print(output)
if status == 0:
path = output.split(" ", 1)[0]

View File

@ -35,7 +35,7 @@
#include "../mngt/ocf_mngt_common.h"
#include "../metadata/metadata.h"
#include "cleaning/cleaning.c/ocf_cleaner_run_test_generated_warps.c"
#include "cleaning/cleaning.c/ocf_cleaner_run_test_generated_wraps.c"
/*
* Mocked functions. Here we must deliver functions definitions which are not

View File

@ -21,7 +21,7 @@
#include "ocf_metadata_concurrency.h"
#include "../metadata/metadata_misc.h"
#include "concurrency/ocf_metadata_concurrency.c/ocf_metadata_concurrency_generated_warps.c"
#include "concurrency/ocf_metadata_concurrency.c/ocf_metadata_concurrency_generated_wraps.c"
void __wrap_ocf_metadata_hash_lock(struct ocf_metadata_lock *metadata_lock,
ocf_cache_line_t hash, int rw)

View File

@ -21,7 +21,7 @@
#include "metadata.h"
#include "../utils/utils_cache_line.h"
#include "metadata/metadata_collision.c/metadata_collision_generated_warps.c"
#include "metadata/metadata_collision.c/metadata_collision_generated_wraps.c"
static void metadata_hash_func_test01(void **state)
{

View File

@ -40,7 +40,7 @@ ocf_mngt_cache_mode_has_lazy_write
#include "../ocf_ctx_priv.h"
#include "../cleaning/cleaning.h"
#include "mngt/ocf_mngt_cache.c/_cache_mngt_set_cache_mode_test_generated_warps.c"
#include "mngt/ocf_mngt_cache.c/_cache_mngt_set_cache_mode_test_generated_wraps.c"
/*
* Mocked functions
*/

View File

@ -34,7 +34,7 @@
#include "../ocf_ctx_priv.h"
#include "../cleaning/cleaning.h"
#include "mngt/ocf_mngt_cache.c/ocf_mngt_cache_set_fallback_pt_error_threshold_generated_warps.c"
#include "mngt/ocf_mngt_cache.c/ocf_mngt_cache_set_fallback_pt_error_threshold_generated_wraps.c"
int __wrap_ocf_log_raw(ocf_logger_t logger, ocf_logger_lvl_t lvl,
const char *fmt, ...)

View File

@ -35,7 +35,7 @@
#include "../eviction/ops.h"
#include "ocf_env.h"
#include "mngt/ocf_mngt_io_class.c/ocf_mngt_io_class_generated_warps.c"
#include "mngt/ocf_mngt_io_class.c/ocf_mngt_io_class_generated_wraps.c"
/* Functions mocked for testing purposes */
bool __wrap_ocf_part_is_added(struct ocf_user_part *part)

View File

@ -33,7 +33,7 @@
#include "ocf/ocf.h"
#include "metadata/metadata.h"
#include "ocf_freelist.c/ocf_freelist_get_put_generated_warps.c"
#include "ocf_freelist.c/ocf_freelist_get_put_generated_wraps.c"
ocf_cache_line_t __wrap_ocf_metadata_collision_table_entries(ocf_cache_t cache)
{

View File

@ -21,7 +21,7 @@
#include "ocf/ocf.h"
#include "metadata/metadata.h"
#include "ocf_freelist.c/ocf_freelist_init_generated_warps.c"
#include "ocf_freelist.c/ocf_freelist_init_generated_wraps.c"
ocf_cache_line_t __wrap_ocf_metadata_collision_table_entries(ocf_cache_t cache)
{

View File

@ -31,7 +31,7 @@
#include "ocf/ocf.h"
#include "metadata/metadata.h"
#include "ocf_freelist.c/ocf_freelist_get_put_generated_warps.c"
#include "ocf_freelist.c/ocf_freelist_get_put_generated_wraps.c"
ocf_cache_line_t __wrap_ocf_metadata_collision_table_entries(ocf_cache_t cache)
{

View File

@ -23,7 +23,7 @@
#include "ocf/ocf.h"
#include "metadata/metadata.h"
#include "ocf_freelist.c/ocf_freelist_populate_generated_warps.c"
#include "ocf_freelist.c/ocf_freelist_populate_generated_wraps.c"
ocf_cache_line_t __wrap_ocf_metadata_collision_table_entries(ocf_cache_t cache)
{

View File

@ -20,7 +20,7 @@
#include "../utils/utils_refcnt.h"
#include "utils/utils_refcnt.c/utils_refcnt_dec_generated_warps.c"
#include "utils/utils_refcnt.c/utils_refcnt_dec_generated_wraps.c"
static void ocf_refcnt_dec_test01(void **state)
{

View File

@ -21,7 +21,7 @@
#include "../utils/utils_refcnt.h"
#include "utils/utils_refcnt.c/utils_refcnt_freeze_generated_warps.c"
#include "utils/utils_refcnt.c/utils_refcnt_freeze_generated_wraps.c"
static void ocf_refcnt_freeze_test01(void **state)
{

View File

@ -20,7 +20,7 @@
#include "../utils/utils_refcnt.h"
#include "utils/utils_refcnt.c/utils_refcnt_inc_generated_warps.c"
#include "utils/utils_refcnt.c/utils_refcnt_inc_generated_wraps.c"
static void ocf_refcnt_inc_test(void **state)
{

View File

@ -20,7 +20,7 @@
#include "../utils/utils_refcnt.h"
#include "utils/utils_refcnt.c/utils_refcnt_init_generated_warps.c"
#include "utils/utils_refcnt.c/utils_refcnt_init_generated_wraps.c"
static void ocf_refcnt_init_test(void **state)
{

View File

@ -22,7 +22,7 @@
#include "../utils/utils_refcnt.h"
#include "utils/utils_refcnt.c/utils_refcnt_register_zero_cb_generated_warps.c"
#include "utils/utils_refcnt.c/utils_refcnt_register_zero_cb_generated_wraps.c"
static void zero_cb(void *ctx)
{

View File

@ -22,7 +22,7 @@
#include "../utils/utils_refcnt.h"
#include "utils/utils_refcnt.c/utils_refcnt_unfreeze_generated_warps.c"
#include "utils/utils_refcnt.c/utils_refcnt_unfreeze_generated_wraps.c"
static void ocf_refcnt_unfreeze_test01(void **state)
{