Skip to content

Commit

Permalink
test: introduce core_log() unit tests (fix)
Browse files Browse the repository at this point in the history
- to be squashed before the merge

Signed-off-by: Jan Michalski <jan.michalski@intel.com>
  • Loading branch information
janekmi committed Mar 4, 2024
1 parent e02e67b commit 45d4187
Show file tree
Hide file tree
Showing 12 changed files with 356 additions and 292 deletions.
14 changes: 0 additions & 14 deletions src/core/log_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,20 +83,6 @@ typedef void core_log_function(

int core_log_set_function(core_log_function *log_function, void *context);

/* pointer to the logging function */
extern
#ifdef ATOMIC_OPERATIONS_SUPPORTED
_Atomic
#endif /* ATOMIC_OPERATIONS_SUPPORTED */
uintptr_t Core_log_function;

/* the logging function's context */
extern
#ifdef ATOMIC_OPERATIONS_SUPPORTED
_Atomic
#endif /* ATOMIC_OPERATIONS_SUPPORTED */
void *Core_log_function_context;

/* threshold levels */
extern
#ifdef ATOMIC_OPERATIONS_SUPPORTED
Expand Down
1 change: 1 addition & 0 deletions src/test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ OTHER_TESTS = \
arch_flags\
core_log\
core_log_internal\
core_log_no_func\
core_log_max\
checksum\
compat_incompat_features\
Expand Down
4 changes: 2 additions & 2 deletions src/test/core_log/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright 2024, Intel Corporation

TARGET = core_log
OBJS = core_log.o
OBJS = core_log.o core_log_common.o

BUILD_STATIC_DEBUG=n
BUILD_STATIC_NONDEBUG=n
Expand All @@ -11,4 +11,4 @@ BUILD_STATIC_NONDEBUG=n
LIBPMEMCORE=internal-debug

include ../Makefile.inc
LDFLAGS += $(call extract_funcs, core_log.c)
LDFLAGS += $(call extract_funcs, core_log_common.c)
4 changes: 0 additions & 4 deletions src/test/core_log/TESTS.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,4 @@ class TEST5(CORE_LOG):


class TEST6(CORE_LOG):
test_case = 'test_no_log_function'


class TEST7(CORE_LOG):
test_case = 'test_happy_day'
Loading

0 comments on commit 45d4187

Please sign in to comment.