This repository was archived by the owner on Nov 12, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 509
This repository was archived by the owner on Nov 12, 2025. It is now read-only.
No checking of all macros in PMDK #6077
Copy link
Copy link
Open
Labels
Priority: 4 lowQA: CI.github/ and utils/ related to automated testing.github/ and utils/ related to automated testingType: BugA previously unknown bug in PMDKA previously unknown bug in PMDKdocumentationdoc/ and other Markdown filesdoc/ and other Markdown fileslibpmem2libpmem- and libpmem2-relatedlibpmem- and libpmem2-relatedpmempoolsrc/libpmempool and src/tools/pmempoolsrc/libpmempool and src/tools/pmempool
Description
In the docs_test.py file in the get_macros() function, we only search the libpmemobj path:
def get_macros(pmdk_path):
"""
Parses all headers from the libpmemobj library, extracts all macros, and
returns them in a list.
"""
macros = []
exceptions = get_exceptions(pmdk_path)
is_macro_in_next_line = False
includes_path = path.join(pmdk_path, 'src', 'include', 'libpmemobj')
# Definition of macro occurs after the phrases: 'static inline' or '#define'
for header_file in listdir(includes_path):
with open(path.join(includes_path, header_file), 'r') as f:
file_lines = f.readlines()
for line in file_lines:
if line.startswith('static inline'):
is_macro_in_next_line = True
elif is_macro_in_next_line:
parse_macro_name(exceptions, line,
EXPRESSION_AT_THE_LINE_START, macros)
is_macro_in_next_line = False
elif '#define' in line:
parse_macro_name(exceptions, line,
EXPRESSION_AFTER_DEFINE_PHRASE, macros)
return macros
Metadata
Metadata
Assignees
Labels
Priority: 4 lowQA: CI.github/ and utils/ related to automated testing.github/ and utils/ related to automated testingType: BugA previously unknown bug in PMDKA previously unknown bug in PMDKdocumentationdoc/ and other Markdown filesdoc/ and other Markdown fileslibpmem2libpmem- and libpmem2-relatedlibpmem- and libpmem2-relatedpmempoolsrc/libpmempool and src/tools/pmempoolsrc/libpmempool and src/tools/pmempool