From 2c9de6cceb0653acbcdd1d8b193cdf87c9cac56e Mon Sep 17 00:00:00 2001 From: Douglas Raillard Date: Fri, 13 Oct 2023 12:11:23 +0100 Subject: [PATCH] lisa._assets.kmodules.lisa: Log content of module sources FEATURE Allow debugging checksum issues by showing the content of the module sources. --- lisa/_assets/kmodules/lisa/Makefile | 2 ++ lisa/_kmod.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/lisa/_assets/kmodules/lisa/Makefile b/lisa/_assets/kmodules/lisa/Makefile index d4274a5c6..0b68c7843 100644 --- a/lisa/_assets/kmodules/lisa/Makefile +++ b/lisa/_assets/kmodules/lisa/Makefile @@ -158,6 +158,8 @@ $(SYMBOL_NAMESPACES_H): $(GENERATED) $(MODULE_VERSION_H): $(GENERATED) printf '#pragma once\n' > $@ printf "#define LISA_MODULE_VERSION \"" >> $@ + # Show the content of the folder to debug mismatching sha1sum issues + ls -laR $(MODULE_SRC) export LC_ALL=C && (cd $(MODULE_SRC) && find -type f '(' -name '*.c' -or -name '*.h' -or -name '*.txt' -or -name '*.json' -or -name '*.py' -or -name '*.sh' -or -name '*.lds' -or -name 'Makefile' -or -name 'vmlinux' -or -name 'kallsyms' ')' -and -not -path './generated/*' -and -not -path './__pycache__/*' | xargs sha1sum) | sort | sha1sum | cut -d' ' -f1 | tr -d '\n' >> $@ printf "\"\n" >> $@ diff --git a/lisa/_kmod.py b/lisa/_kmod.py index 6a9a88549..0076267d8 100644 --- a/lisa/_kmod.py +++ b/lisa/_kmod.py @@ -2673,6 +2673,8 @@ class LISADynamicKmod(FtraceDynamicKmod): src = KmodSrc.from_path(path, extra=extra, name='lisa') + src_list = "\n".join(sorted(src.src.keys())) + cls.get_logger().debug(f'Sources of the {cls.__qualname__} module:\n{src_list}') return cls( target=target, src=src, -- GitLab