Skip to content

Commit

Permalink
common: core_log tests
Browse files Browse the repository at this point in the history
Signed-off-by: Tomasz Gromadzki <tomasz.gromadzki@intel.com>
  • Loading branch information
grom72 committed Feb 22, 2024
1 parent cda4d06 commit 31bfe2d
Show file tree
Hide file tree
Showing 5 changed files with 419 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ OBJ_TESTS = \
OTHER_TESTS = \
arch_flags\
core_log_max\
core_log\
checksum\
compat_incompat_features\
ctl_prefault\
Expand Down
1 change: 1 addition & 0 deletions src/test/core_log/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
core_log
14 changes: 14 additions & 0 deletions src/test/core_log/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2024, Intel Corporation

TARGET = core_log
OBJS = core_log.o

BUILD_STATIC_DEBUG=n
BUILD_STATIC_NONDEBUG=n

LIBPMEMCORE=internal-debug
EXTRA_CFLAGS=-Dnoreturn="/* noreturn */"

include ../Makefile.inc
LDFLAGS += $(call extract_funcs, core_log.c)
53 changes: 53 additions & 0 deletions src/test/core_log/TESTS.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#!../env.py
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2024, Intel Corporation
#


import testframework as t
from testframework import granularity as g


@g.require_granularity(g.ANY)
# @t.require_build('nondebug')
class CORE_LOG(t.BaseTest):
test_type = t.Short

def run(self, ctx):
ctx.exec('core_log', self.test_case)


class TEST0(CORE_LOG):
test_case = 'test_CORE_LOG_BASIC'


class TEST1(CORE_LOG):
test_case = 'test_CORE_LOG_BASIC_W_ERRNO'


class TEST2(CORE_LOG):
test_case = 'test_CORE_LOG_BASIC_W_ERRNO_BAD'


class TEST3(CORE_LOG):
test_case = 'test_CORE_LOG_BASIC_LONG'


class TEST4(CORE_LOG):
test_case = 'test_CORE_LOG_BASIC_TOO_LONG'


class TEST5(CORE_LOG):
test_case = 'test_CORE_LOG_BASIC_TOO_LONG_W_ERRNO'


class TEST6(CORE_LOG):
test_case = 'test_CORE_LOG_LAST_BASIC_LONG'


class TEST7(CORE_LOG):
test_case = 'test_CORE_LOG_LAST_BASIC_TOO_LONG'


class TEST8(CORE_LOG):
test_case = 'test_CORE_LOG_TRESHOLD'
Loading

0 comments on commit 31bfe2d

Please sign in to comment.