linux-modules.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
diff for duplicates of <20210130023600.24239-1-lucas.demarchi@intel.com>

diff --git a/a/1.txt b/N1/1.txt
index 0d31d0c..c23ab9c 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -1,94 +1,14 @@
-Since the output needs to be the same, regardless if the module is
-compressed, change populate-modules.sh to conditionally compress the
-module if that feature is enabled.
+Hi,
 
-This way we can execute the tests with any build-time configuration and
-it should still pass.
+Reviewed-by: Petr Vorel <pvorel@suse.cz>
+Great, thank you!
 
-Suggested-by: Michal Suchánek <msuchanek@suse.de>
----
- Makefile.am                   |  2 +-
- testsuite/populate-modules.sh | 27 ++++++++++++++++++---------
- testsuite/test-depmod.c       |  2 --
- 3 files changed, 19 insertions(+), 12 deletions(-)
+> +feature_enabled() {
+> +	local feature=$1
+> +	grep KMOD_FEATURES  $CONFIG_H | head -n 1 | grep -q \+$feature
+nit: using grep single time is IMHO enough
+grep -q "define KMOD_FEATURES.*\+$feature" $CONFIG_H
+> +}
 
-diff --git a/Makefile.am b/Makefile.am
-index b29e943..24a586e 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -249,7 +249,7 @@ CREATE_ROOTFS = $(AM_V_GEN) ( $(RM) -rf $(ROOTFS) && mkdir -p $(dir $(ROOTFS)) &
- 				find $(ROOTFS) -type d -exec chmod +w {} \; && \
- 				find $(ROOTFS) -type f -name .gitignore -exec rm -f {} \; && \
- 				$(top_srcdir)/testsuite/populate-modules.sh \
--					$(MODULE_PLAYGROUND) $(ROOTFS) ) && \
-+					$(MODULE_PLAYGROUND) $(ROOTFS) $(top_builddir)/config.h ) && \
- 				touch testsuite/stamp-rootfs
- 
- build-module-playground:
-diff --git a/testsuite/populate-modules.sh b/testsuite/populate-modules.sh
-index b0cc932..ae43884 100755
---- a/testsuite/populate-modules.sh
-+++ b/testsuite/populate-modules.sh
-@@ -4,6 +4,12 @@ set -e
- 
- MODULE_PLAYGROUND=$1
- ROOTFS=$2
-+CONFIG_H=$3
-+
-+feature_enabled() {
-+	local feature=$1
-+	grep KMOD_FEATURES  $CONFIG_H | head -n 1 | grep -q \+$feature
-+}
- 
- declare -A map
- map=(
-@@ -99,15 +105,18 @@ done
- 
- # start poking the final rootfs...
- 
--# gzip these modules
--for m in "${gzip_array[@]}"; do
--    gzip "$ROOTFS/$m"
--done
--
--# zstd-compress these modules
--for m in "${zstd_array[@]}"; do
--    zstd --rm $ROOTFS/$m
--done
-+# compress modules with each format if feature is enabled
-+if feature_enabled ZLIB; then
-+	for m in "${gzip_array[@]}"; do
-+	    gzip "$ROOTFS/$m"
-+	done
-+fi
-+
-+if feature_enabled ZSTD; then
-+	for m in "${zstd_array[@]}"; do
-+	    zstd --rm $ROOTFS/$m
-+	done
-+fi
- 
- for m in "${attach_sha1_array[@]}"; do
-     cat "${MODULE_PLAYGROUND}/dummy.sha1" >>"${ROOTFS}/$m"
-diff --git a/testsuite/test-depmod.c b/testsuite/test-depmod.c
-index 261559c..d7802d7 100644
---- a/testsuite/test-depmod.c
-+++ b/testsuite/test-depmod.c
-@@ -25,7 +25,6 @@
- 
- #include "testsuite.h"
- 
--#ifdef ENABLE_ZLIB
- #define MODULES_ORDER_UNAME "4.4.4"
- #define MODULES_ORDER_ROOTFS TESTSUITE_ROOTFS "test-depmod/modules-order-compressed"
- #define MODULES_ORDER_LIB_MODULES MODULES_ORDER_ROOTFS "/lib/modules/" MODULES_ORDER_UNAME
-@@ -57,7 +56,6 @@ DEFINE_TEST(depmod_modules_order_for_compressed,
- 			{ }
- 		},
- 	});
--#endif
- 
- #define SEARCH_ORDER_SIMPLE_ROOTFS TESTSUITE_ROOTFS "test-depmod/search-order-simple"
- static noreturn int depmod_search_order_simple(const struct test *t)
--- 
-2.30.0
\ No newline at end of file
+Kind regards,
+Petr
\ No newline at end of file
diff --git a/a/content_digest b/N1/content_digest
index c789f6a..8eec0a8 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -1,18 +1,18 @@
 [
-  "From\0Lucas De Marchi <lucas.demarchi\@intel.com>\0"
+  "From\0Petr Vorel <pvorel\@suse.cz>\0"
 ]
 [
-  "Subject\0[PATCH 1/2] testsuite: compress modules if feature is enabled\0"
+  "Subject\0Re: [PATCH 1/2] testsuite: compress modules if feature is enabled\0"
 ]
 [
-  "Date\0Fri, 29 Jan 2021 18:35:59 -0800\0"
+  "Date\0Thu, 4 Feb 2021 11:24:48 +0100\0"
 ]
 [
-  "To\0linux-modules\@vger.kernel.org\0"
+  "To\0Lucas De Marchi <lucas.demarchi\@intel.com>\0"
 ]
 [
-  "Cc\0Michal Such\303\241nek <msuchanek\@suse.de>",
-  " Petr Vorel <petr.vorel\@gmail.com>\0"
+  "Cc\0linux-modules\@vger.kernel.org",
+  " Michal Such\303\241nek <msuchanek\@suse.de>\0"
 ]
 [
   "\0000:1\0"
@@ -21,100 +21,20 @@
   "b\0"
 ]
 [
-  "Since the output needs to be the same, regardless if the module is\n",
-  "compressed, change populate-modules.sh to conditionally compress the\n",
-  "module if that feature is enabled.\n",
+  "Hi,\n",
   "\n",
-  "This way we can execute the tests with any build-time configuration and\n",
-  "it should still pass.\n",
+  "Reviewed-by: Petr Vorel <pvorel\@suse.cz>\n",
+  "Great, thank you!\n",
   "\n",
-  "Suggested-by: Michal Such\303\241nek <msuchanek\@suse.de>\n",
-  "---\n",
-  " Makefile.am                   |  2 +-\n",
-  " testsuite/populate-modules.sh | 27 ++++++++++++++++++---------\n",
-  " testsuite/test-depmod.c       |  2 --\n",
-  " 3 files changed, 19 insertions(+), 12 deletions(-)\n",
+  "> +feature_enabled() {\n",
+  "> +\tlocal feature=\$1\n",
+  "> +\tgrep KMOD_FEATURES  \$CONFIG_H | head -n 1 | grep -q \\+\$feature\n",
+  "nit: using grep single time is IMHO enough\n",
+  "grep -q \"define KMOD_FEATURES.*\\+\$feature\" \$CONFIG_H\n",
+  "> +}\n",
   "\n",
-  "diff --git a/Makefile.am b/Makefile.am\n",
-  "index b29e943..24a586e 100644\n",
-  "--- a/Makefile.am\n",
-  "+++ b/Makefile.am\n",
-  "\@\@ -249,7 +249,7 \@\@ CREATE_ROOTFS = \$(AM_V_GEN) ( \$(RM) -rf \$(ROOTFS) && mkdir -p \$(dir \$(ROOTFS)) &\n",
-  " \t\t\t\tfind \$(ROOTFS) -type d -exec chmod +w {} \\; && \\\n",
-  " \t\t\t\tfind \$(ROOTFS) -type f -name .gitignore -exec rm -f {} \\; && \\\n",
-  " \t\t\t\t\$(top_srcdir)/testsuite/populate-modules.sh \\\n",
-  "-\t\t\t\t\t\$(MODULE_PLAYGROUND) \$(ROOTFS) ) && \\\n",
-  "+\t\t\t\t\t\$(MODULE_PLAYGROUND) \$(ROOTFS) \$(top_builddir)/config.h ) && \\\n",
-  " \t\t\t\ttouch testsuite/stamp-rootfs\n",
-  " \n",
-  " build-module-playground:\n",
-  "diff --git a/testsuite/populate-modules.sh b/testsuite/populate-modules.sh\n",
-  "index b0cc932..ae43884 100755\n",
-  "--- a/testsuite/populate-modules.sh\n",
-  "+++ b/testsuite/populate-modules.sh\n",
-  "\@\@ -4,6 +4,12 \@\@ set -e\n",
-  " \n",
-  " MODULE_PLAYGROUND=\$1\n",
-  " ROOTFS=\$2\n",
-  "+CONFIG_H=\$3\n",
-  "+\n",
-  "+feature_enabled() {\n",
-  "+\tlocal feature=\$1\n",
-  "+\tgrep KMOD_FEATURES  \$CONFIG_H | head -n 1 | grep -q \\+\$feature\n",
-  "+}\n",
-  " \n",
-  " declare -A map\n",
-  " map=(\n",
-  "\@\@ -99,15 +105,18 \@\@ done\n",
-  " \n",
-  " # start poking the final rootfs...\n",
-  " \n",
-  "-# gzip these modules\n",
-  "-for m in \"\${gzip_array[\@]}\"; do\n",
-  "-    gzip \"\$ROOTFS/\$m\"\n",
-  "-done\n",
-  "-\n",
-  "-# zstd-compress these modules\n",
-  "-for m in \"\${zstd_array[\@]}\"; do\n",
-  "-    zstd --rm \$ROOTFS/\$m\n",
-  "-done\n",
-  "+# compress modules with each format if feature is enabled\n",
-  "+if feature_enabled ZLIB; then\n",
-  "+\tfor m in \"\${gzip_array[\@]}\"; do\n",
-  "+\t    gzip \"\$ROOTFS/\$m\"\n",
-  "+\tdone\n",
-  "+fi\n",
-  "+\n",
-  "+if feature_enabled ZSTD; then\n",
-  "+\tfor m in \"\${zstd_array[\@]}\"; do\n",
-  "+\t    zstd --rm \$ROOTFS/\$m\n",
-  "+\tdone\n",
-  "+fi\n",
-  " \n",
-  " for m in \"\${attach_sha1_array[\@]}\"; do\n",
-  "     cat \"\${MODULE_PLAYGROUND}/dummy.sha1\" >>\"\${ROOTFS}/\$m\"\n",
-  "diff --git a/testsuite/test-depmod.c b/testsuite/test-depmod.c\n",
-  "index 261559c..d7802d7 100644\n",
-  "--- a/testsuite/test-depmod.c\n",
-  "+++ b/testsuite/test-depmod.c\n",
-  "\@\@ -25,7 +25,6 \@\@\n",
-  " \n",
-  " #include \"testsuite.h\"\n",
-  " \n",
-  "-#ifdef ENABLE_ZLIB\n",
-  " #define MODULES_ORDER_UNAME \"4.4.4\"\n",
-  " #define MODULES_ORDER_ROOTFS TESTSUITE_ROOTFS \"test-depmod/modules-order-compressed\"\n",
-  " #define MODULES_ORDER_LIB_MODULES MODULES_ORDER_ROOTFS \"/lib/modules/\" MODULES_ORDER_UNAME\n",
-  "\@\@ -57,7 +56,6 \@\@ DEFINE_TEST(depmod_modules_order_for_compressed,\n",
-  " \t\t\t{ }\n",
-  " \t\t},\n",
-  " \t});\n",
-  "-#endif\n",
-  " \n",
-  " #define SEARCH_ORDER_SIMPLE_ROOTFS TESTSUITE_ROOTFS \"test-depmod/search-order-simple\"\n",
-  " static noreturn int depmod_search_order_simple(const struct test *t)\n",
-  "-- \n",
-  "2.30.0"
+  "Kind regards,\n",
+  "Petr"
 ]
 
-cf472c3a20266c9cf3c5eaa8293bdcea9a5a9a7c429f97b444d911937227a185
+195c1ba87a7ed4672ad6439a07f5595e30ea28f4bed38d27f564eccad735292a

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).